# converse command

The converse BASIC program links the
current process to a device. The *target* or *slave* device
is put into a pass-through mode, allowing data in and out in *raw* mode.

**For Windows:** Supports the converse command when
the D3 process is connected to the virtual machine and when it is
not connected. The port must be connected but not logged on.

**For UNIX:**If the D3 process is not connected to the virtual
machine, then converse is not allowed, even if
the where command with a z option displays the port
as being available.

The converse command
stores the PIB number of the port being conversed to in attribute
17 of the dm,pibs file. This information helps
track down the converse ports that have been logged off.

## Syntax

```
converse port.number{(options}
```
The target device (the one being linked to the current
device) must be available on the given the port number. It cannot
be already attached or linked to another process.

A hot key,
or termination, sequence disconnects the link. The default hot key
sequence is pressing ESC, followed by X. The default can be modified
by using the d option.

If the termination
sequence contains an escape, as in the default, an esc-data command is issued automatically, so the process does not get locked
out from being able to suspend converse.

When the device is successfully attached, line attached displays on the master terminal, unless the (s option is used.

Warning: Pressing BREAK on the master
terminal, sends a break to the slave port.

Note: This feature
only works for processes connected to a COM port (serial line).

## Parameter(s)

| options | c | Captures all output on the (slave) screen and writes it to an item in the dm,cap-file file, using theitem-ID * n, where n is the current port number. |
| --- | --- | --- |
| d/hexnum{, hexnum ...} | Designates the sequence of characters to terminate converse mode. Each character is provided in its hexadecimal equivalent of its ASCII value. Each character is separated by a , (comma). Note: A / is required after the d option and before the first hexadecimal number. For example, d/41,42,43,44, indicates that an "ABCD" disconnects the link. | |
| i | Same as the c option, except that output from the master process is captured. | |
| n | Suppresses capturing on converse mode. This is the default. | |
| s | Suppresses the message when the process terminates. | |
| x | Terminates converse mode on target device number and returns target device to logon. | |
| z | Used in conjunction with i or c, translate the nonprintable characters into a period, the carriage returns into an attribute mark, and suppresses the line feeds. Without this option, if a character x'ff' is captured, the item is truncated. | |
Note: If the termination sequence contains an escape character
(X is the default), it is not easy to send an escape by itself to
the target port. This is due to the fact that, since an escape starts
the termination sequence, the system waits for the second character.
If a character other than X is typed, then escape and the character
are sent together. This can create some unexpected results. If an
escape is to be used as a regular character, it is preferable to define
a less used character for the termination sequence, such as the DELETE
key. Unlike some other implementations, a break is not generated by
a special escape character sequence. Press BREAK on the master terminal
to send a break signal to the slave device. If the slave device is
not a serial line, the break is interpreted accordingly. For instance,
if the target is a telnet entity, the break generates the appropriate
telnet message. When capturing is in effect, the data is not stored
in real time to the dm,cap-file item. There may
be a delay of a few seconds. This is done to reduce the number of
file accesses in case of heavy traffic.

## Example(s)

Attaches the current process
to port 16.

```
converse 16
```
Attaches the current process to port 33, capturing screen
output from the slave process.

```
converse 33 (c
```
Attaches to port 3 and sets the hot key sequence to *++.

```
converse 3 (d/2a,2b,2b
```
Attaches to port 42 and captures the screen output from
the master process, making sure all data is displayed.

```
converse 42 (iz
```
Terminates converse on port 42 and returns port to the
logon prompt.

```
converse 42 (x
```

## See also

- [:reset-async command](https://d3codex.com/tcl/colon-reset-async-command/)
- [cap-file File](https://d3codex.com/systemfiles/cap-file-file/)
- [dev-att command](https://d3codex.com/tcl/dev-att-command/)
- [dev-det command](https://d3codex.com/tcl/dev-det-command/)
- [devs file](https://d3codex.com/systemfiles/devs-file/)
- [link-pibdev command](https://d3codex.com/tcl/link-pibdev-command/)
- [mirror command](https://d3codex.com/tcl/mirror-command/)
- [Port number](https://d3codex.com/definitions/port-number/)
- [System privileges](https://d3codex.com/definitions/system-privileges/)
- [tandem command](https://d3codex.com/tcl/tandem-command/)
- [unlink-pibdev command](https://d3codex.com/tcl/unlink-pibdev-command/)

---
Source: https://d3codex.com/tcl/converse-command/ - part of the D3Codex reference.
