VAXCOM: PDP8 - VAX 11 Communications Program Version: March 82 Authors: RM Doesburg, AT Wallis Wellcome Medical Research Institute, University of Otago, Dunedin, New Zealand. Abstract VAXCOM is a PDP8 program that allows terminal operations with a remote VAX 11, and transfer of ASCII files. A standard DEC KL8-J serial interface board is used to connect the VAX communication line to the PDP8. The program sends all input from the PDP8 keyboard to the VAX and relays the VAX responses to the PDP8 terminal display. ASCII files can be transmitted in either direction between computers, using any OS/8 device as source or destination. File transfer is initiated and synchronised by a VAX/VMS DCL Command Procedure, which transmits a code that causes the PDP8 program to call the OS/8 command decoder. The XON/XOFF protocol is used to control the rate of data transmission. VAXCOM Page 2 Introduction This is a description of a program to perform computer-to-computer communications between a DEC VAX-11 and PDP-8. Use is made of a data-communications line from the VAX terminal handler, which is connected by a KL8-J serial interface board to the PDP8. The problem of synchronising the transfer of files between the computers is simplified with the use of VAX/VMS Command Procedures to provide a software interface. Program VAXCOM is designed to perform two functions: 1.Link the PDP8 terminal directly to the VAX. The program initially runs in this mode, in which all characters typed at the PDP8 keyboard are transmitted to the remote VAX 11 and responses from the VAX are displayed on the PDP8 terminal. 2.Transfer ASCII files between the VAX and PDP8 computers. Transfers are initiated by running a VAX command procedure, which sends a code character to the PDP8 so that an OS/8 file name can be requested from the operator. The command procedure also modifies the characteristics of the terminal interface for the duration of the file transfer, and sends an end-of-file character on completion of a transfer to the PDP8. VAXCOM Page 3 Using the program Before running the program, the KL8-J interface board (or its equivalent) should be adjusted and installed. The device number of the board should be changed to the value used by the program; alternatively the source program can be re-assembled using IOT's altered to use the existing device number (see "Setting up", below). When the VAX 11 communications line has been connected to the PDP8 interface, start the program by typing R VAXCOM Normal terminal operations with the VAX will now be available. An initial null character is sent by the program, and the response from the VAX depends on whether this terminal line is currently logged on. -If not logged on, the VAX will ask for user name and password. -If already logged on by other means, the VAX will now respond with the prompting '$'. The PDP8 terminal acts as if it is directly connected to the VAX. With one exception, any typed character will be transmitted. The only character not passed on is the control character CTRL/B which forces an immediate jump to the OS/8 keyboard monitor. The VAX may be left in a logged-on state - this might be useful if using the VAX handler (DECUS 8-921). VAXCOM Page 4 File transfers A file is sent as a stream of characters, using a set of OS/8 routines (ref 2) to pack and unpack normal blocks of OS/8 data. With a few exceptions, any ASCII character may be transmitted. The longest permitted line (a string terminated by line-feed) is 511 characters. Null characters are not transmitted, and the character CTRL/Z (ASCII ) is recognised as end-of-file. To begin a file transfer, the program has to receive a special control character from the VAX. Receipt of the code character leads to a jump to one of the file transfer routines, which call the OS/8 command decoder. During transfer from the VAX, all data received is sent to the specified OS/8 file until an end-of-file character (CTRL/Z, ASCII ) arrives. During transfer to the VAX, data from the named OS/8 file is transmitted and a CTRL/Z sent at the end-of-file. File transfers are performed under the control of Command Procedures running on the VAX. A different procedure is used for each direction, and example listings are given below. Command files containing these procedures must be present on the VAX for transfers to take place. The VAX editor may be used to load these small files. After the command procedures have been loaded to the VAX directory (with the filenames VAXTOPDP8.COM and PDP8TOVAX.COM) file transfers may be performed. A command procedure is run by using the DCL @ command in front of the procedure name, with the name of the source or destination VAX file typed afterwards. The proper formats are given below, and some examples. (Note that it is not necessary to type the .COM extension, which is the default assumed for a command procedure). Transfer from PDP8 to VAX Type @PDP8TOVAX vax-file-name (OS/8 Command Decoder prompt '*' appears) Type OS/8 file name or device name (transfer takes place) (VAX/VMS prompt '$' re-appears at completion) Transfer from VAX to PDP8 Type @VAXTOPDP8 vax-file-name (OS/8 command decoder prompt appears) Type destination OS/8 file name or device (transfer takes place) ('$' appears at completion) VAXCOM Page 5 For example, to transfer a file called DATA.DA from PDP8 device RXA1: into the VAX file DATA.DAT: $ @PDP8TOVAX DATA.DAT (return) ('$' is printed by the VAX) *RXA1:DATA.DA (return) ...transfer takes place $ To print a file from the VAX on the PDP8 line-printer: $ @VAXTOPDP8 PRINTOUT.LIS (return) *LPT:< (return) ...transfer $ Aborting transfer The operator may stop a file transfer at any time by typing the control character CTRL/Y or CTRL/Z. The effect of CTRL/Y differs depending on the direction of transfer; the VAX will close the file as it exists, so no information is lost. A CTRL/Y does not close an output file on the PDP8. Typing CTRL/Z will ensure that a PDP8 output file is closed. (The familiar CTRL/C does work, but may lead to a return to the OS/8 monitor if received while a device handler is running. It would then be necessary to run VAXCOM again, and type CTRL/Y to return to the VAX monitor) VAXCOM Page 6 Setting up The program VAXCOM has been set up to use an interface board with device numbers 36 (input) and 37 (output). The KL8-J board can be given these values using jumpers, and the baud rate and data formats (parity, start and stop bits) set (ref 1). If the above device numbers are already in use, the PAL8 source program should be altered and re-assembled. The four IOT's to be modified are at the beginning of the source VAXCOM.PA. VKSF test input flag VKRB read input register VTSF test output flag VTLS write to output register The keyboard and display are assumed to have the standard device numbers 03 and 04. The IOT's KSF, KRB, TSF and TLS are used to access these devices, and should be re-defined if the terminal interface has a non-standard device number. After assembly, the binary file VAXCOM.BN should be saved with the following addresses: SAVE SYS VAXCOM 200-777,16000-17377;200 VAXCOM Page 7 DCL Command Procedures Listings are given below of two Command Procedures which are used to control the transfer of files between computers. They must be present on the VAX before a file transfer can be performed. The functions of these procedures are: Transfer to VAX (procedure PDP8TOVAX) -obtain name of VAX file to be created -alter line width of terminal to maximum allowed; suppress echoing of input and broadcasts to terminal -send control character (ASCII or ) to indicate readiness for transfer from PDP8 -COPY input from PDP8 to the named file -restore normal terminal characteristics at end-file Transfer to PDP8 (procedure VAXTOPDP8) -obtain name of VAX file to be copied -set maximum line-width for terminal, allow form-feed characters, suppress broadcasts, insert nulls after line-feed -send control character (ASCII ) to signal impending transfer to PDP8 -COPY file to PDP8 -send end-of-file code (CTRL/Z, ASCII ) -restore normal terminal characteristics It is assumed that the XON/XOFF protocol is in effect (HOSTSYNC and TTSYNC set in the terminal characteristics) VAXCOM Page 8 These DCL procedures should be created with the .COM extension using the DCL CREATE command or the VAX editor. The second to last line in each, which restores the normal terminal characteristics, should be altered if the PDP8 terminal in use is different from a VT52. See the DCL "SET TERMINAL" command for information about alternative terminal types (ref 3). Information about Command Procedures may be found in the DEC manual "Guide to using Command Procedures" (ref 4) NB (1) Each line of a command procedure begins with '$'. (2) '%O' is the symbol for an Octal literal. PDP8TOVAX.COM $ ON ERROR THEN GOTO RESTORE $ ON CONTROL_Y THEN GOTO RESTORE $ IF P1 .EQS. "" THEN INQUIRE P1 "FILE NAME" $ SET TERMINAL/NOECHO/WIDTH=511/NOBROADCAST $ XON[0,32]=%O21 $ WRITE SYS$OUTPUT XON $ COPY SYS$OUTPUT 'P1' $RESTORE: $ SET TERMINAL/VT52 $ EXIT VAXTOPDP8.COM $ ON ERROR THEN GOTO RESTORE $ ON CONTROL_Y THEN GOTO RESTORE $ IF P1 .EQS. "" THEN INQUIRE P1 "FILE NAME" $ SET TERM/FORM/WIDTH=511/LFFILL=2/NOBROADCAST $ STX[0,32]=%O2 $ SUB[0,32]=%O32 $ WRITE SYS$OUTPUT STX $ COPY 'P1' SYS$OUTPUT $ WRITE SYS$OUTPUT SUB $RESTORE: $ SET TERMINAL/VT52 $ EXIT VAXCOM Page 9 Acknowledgements This work was supported by the Medical Research Council of New Zealand. We would like to thank Professor FO Simpson for his encouragement and support of the project. VAXCOM Page 10 References (1) KL8-J Engineering Drawings (C)1975 Digital Equipment Corporation (2) OS/8 Software Support Manual DEC-S8OSSMA-A-D Appendix F: OS/8 Input/Output Routines (3) VAX/VMS Command Language User's Guide DEC AA-D023B-TE (March 1980) (4) VAX/VMS Guide to Using Command Procedures DEC AA-H782A-TE (March 1980)