.AP .PR .t DUPLEX Documentation Author: Martin Heller, New England Nuclear Corporation Modified by: Glenn Everhart, RCA Date: 24-Oct-79 Date: 23-March-1983 Last source edit: 23-March-83 Source version: 1.20 Documentation edit date: 23-Mar-83 Purpose: to provide the capability of having two computers talk to one another over serial lines, while having access to file facilities. Operating System: RSX-11M Source Language: Macro-11 Units: .LIST .LE terminal at which user is typing .LE line to another computer .LE file to be transmitted .LE RECEIVED.DAT .ELS Usage: .LIST .LE Define logical units .LE Hook up cables and/or dial other computer .LE Set characteristics of terminal ports as needed .LE Run DUPLEX .LE Type away -- you will effectively be talking to the other computer .LE Use control characters as needed to control DUPLEX .ELS Control characters used: .LIST .LE Control-B: exit from DUPLEX. Terminal talks to MCR. .LE Control-T: transmit a file. Program will prompt for an input file specification, i.e. DUPLEX>=SY0:[100,200]FileName.Typ;4. The equals sign is necessary for the file to be recognized as input. .LE Control-P: toggle between line-by-line and whole-file transmission. .LE Control-N: transmit one line in line-by-line transmission mode. .LE Control-A: abort transmission of a file. .LE Control-F: open/close file RECEIVED.DAT of characters received from unit 2. This file is also closed by Control-B. .LE Control-]: Sets up line delay value by reading 1 character and subtracting 48. from it (ASCII 0). If negative sets line delay to 4 ticks. .LE Control-\: Toggles line delay off/on. In line mode, if line delay is on, the file is transmitted 1 line at a time but with automatic proceeding after "delay" ticks between lines. This defaults to 4 ticks but may be set by control-] to anything reasonable. .LE Control-^: Toggles character delay. This will insert a 1 tick delay between sending characters if set. Note this forces single character QIO$s and is expensive of CPU time, however is provided for remote computers where the delay is needed. When turned off, transmission is by qio$ of a line at a time. The line delay is more likely to be useful for general purposes. .ELS Internal mechanics of program: The program initializes its buffers, attaches units 1 and 2, and declares AST handlers for both units. It then clears event flag 3 and waits for event flag 3 to be set. A character at either port will be delivered to the AST handler. Normal characters will be queued for output to the other port; special control characters will cause the AST handler to set event flag 3, mark the appropriate words to vector the main program, and exit. When the main program regains control it will perform the required control function, clear event flag 3, and return to a wait state. Control-B, of course, will cause the main program to clean up outstanding I/O operations, close open files, and exit, returning control of the terminal to MCR. Notes: Custom tailoring of the program can be done most effectively by adding to the list of special characters in one or the other of the AST handlers. Special functions can be indexed through TABLE, with indexing passed from the AST handler to the main program through SENTIN. CIRSIZ and BUFSIZ could be enlarged if necessary, although on my PDP-11/34 they are sufficient for 9600 baud operation under normal system loads. Once DUPLEX is running, the user's terminal should remain at its normal speed and parity, but should be set for full or half duplex (no echo or echo) appropriate to the computer on the remote port. The program's default settings are appropiate for talking to DEC computers; when addressing IBM systems, a single control-P at run time will set file transmission to line-by-line mode. When talking to a VAX, set the VAX port to have HOSTSYNC, and the control-s and control-q mechanism will keep both computers from overflowing their buffers. It is also possible to activate the RECEIVED.DAT file and then to control-O your own terminal, if you don't want to waste paper. DUPLEX has been used successfully with computers hard-wired and connected via modems and ordinary phone lines. It has had both ports at the same speed, and the ports set to different speeds. DEC, IBM, CDC, and even Motorola systems have been successfully interfaced to PDP-11's. File transfer from microprocessors has turned out to be highly useful: the micro is then given the advantage of hard disks, high speed printers, and other mini-computer peripherals, albeit via a 9600 baud serial line. The incoming Bell 103 on a DZ-11 port has turned out to function perfectly well as an outgoing modem port. There is no reason auto-dialing and such features should not work without any changes to the software. For further documentation, please refer to the source listing. Note: DUPLEXX should normally be run with a fast terminal. If your console is slower than (or even the same speed as) the remote line, it can behave strangely. Speed combinations have not been well investigated but running a 1200 baud line from a 9600 baud terminal works well. Be careful of buffered I/O. You may want to run Duplex noncheckpointable and/or at higher priority than usual. It's I/O bound so high priority is normally not a bad idea. Making it non- checkpointable improves AST throughput and (on older RSXes) allows multiple outstanding QIOs.