.comment last edited 18-jul-80. .COMMENT INS-P TITLE PAGE. .COMMENT **************** Institute of Nuclear Sciences INS-P--150 NET A Simple Communications Program M. R. Manning May 1980 Institute of Nuclear Sciences D.S.I.R. Lower Hutt, New Zealand Page 2 .title NET CONTENTS: 1. Introduction 2. Running the Program 3. NET Commands 3.1 Command Syntax 3.2 Command Summary 3.3 Data Transfer Commands 3.4 Mode Setting Commands 3.5 Miscellaneous Commands 4. NET Messages and their Interpretation 5. Examples of Specific Uses of NET 5.1 Transferring an RT-11 File to the IBM370 5.2 Transferring an IBM370 File back to RT-11 5.3 Transferring a File Between Two PDP-11 Systems 6. Changes from NET V2E to NET V3.03 7. Patching NET's Start-up Default modes 8. Technical Notes 8.1 Program Structure 8.2 Foreground Operation - FGNET 8.3 Processor Dependence 8.4 Serial Line Interface 8.5 Tests Performed This report describes version V3.03 of the program NET which runs under the RT-11 V3B operating system. - NET was originally designed to connect a PDP-11 running RT-11 to the New Zealand DSIR computer network. The NET program enables the RT-11 terminal to appear as a terminal on the network and communicate with host computers of the network. The program also enables data in an RT-11 file to be sent down the Page 3 communications line to the network as if it had been typed on the terminal. In addition data coming from the communications line can be captured into an RT-11 file. Once an initial version of the program was working, it was realized that there were a number of other applications for which the program could be used. These include such things as capturing data from an audio cassette through a DL-11; data transfer to and from a VDU in block mode; and other situations in which data comes through a DL-11 at reasonably high speed with no facility for the PDP-11 to turn on or off the flow. The main feature of NET was just that - that it had to accept anything coming from the network at any time. As a result NET was modified progressively allowing other modes of operation and additional flexibility. However, the user may still use NET solely for its network facilities; block mode VDU transfers; or for downline loading between RT-11 systems etc; and the other aspects of NET can be ignored. The author would appreciate any feedback from users, including criticisms, bugs, improved programs etc. NET may be distributed freely provided this or equivalent documentation accompanies the copy of the program (source or runnable form). - NET is started by typing the RT-11 command: .R NET (if NET is on the System device) or .RU NET (if NET is on the default disk) or .RU dev:NET (if NET is on device "dev:") NET can be configured to start up in a wide variety of default modes, however, we assume throughout this documentation that the defaults set are those of the distributed form of NET. When NET starts up it types its name and version number on the terminal, then sends the network status query (DLE, ?) down the line and the next thing the user should see is the network's response (provided the network is up!). Once NET is running, the RT-11 terminal appears as if it is connected directly to the default communications line. Characters typed on the terminal will be passed to the network and echoes from the network are passed back to appear on the terminal. Because of the special significance of the DC1 (X-ON) control character as a prompt for further input, it will be passed to the terminal as a BELL character thus providing an audible prompt. Apart from DC1 all characters received from the line are passed to the terminal without change. This allows appropriate RT-11 terminals to respond properly to Tektronix (PLOT-10) graphics commands or escape sequences etc from a remote system. Commands may now be directed to NET to change its mode of operation, start transmission of a file etc. Commands to NET are started with a special command prefixing character. The default command character is the ESCAPE control character (which echoes as the $-sign). The command character is always echoed on a new line and NET takes all subsequent characters until a carriage-return Page 4 as a NET command to be interpreted by the program and not transmitted to the communications line. While the command is being entered the delete-key can be used to delete the previous character(s) and a control-U or another command character will cancel the command line and start a new one. During entry of a NET command lower case letters will be treated as upper case, thus there is no need to explicitly change case to enter RT-11 file names etc. NET can be given commands from the RT-terminal at any time, even during file transfers. Details of the individual commands are given in the next chapter. Commands not conforming to the formats given cause an error message to be printed and the command line is ignored. During entry of a command NET echoes characters received from the terminal. This local echoing mode can also be switched on explicitly for everything entered at the RT-11 terminal, and this is useful in situations where the remote system does not supply echoes. In local echo mode a rubout echoes as backslash (\) or as the sequence (Backspace, space, Backspace) depending on the setting of VDU mode. The control characters are echoed in '^x' format with the exception of RETURN, LINEFEED and BELL which are unmapped and ESCAPE which echoes as '$'. When used in its default 'network' mode NET carries out some character conversions between the terminal or RT-11 file and the communications line. These conversions are detailed in the next chapter under the DUMP command, but they generally translate from RT-11 conventions to those of the DSIR network and need not concern the user in detail. Typical of the character conversions involved is the mapping from the DELETE character which erases the last character typed in RT-11, to the (DLE, Bell) sequence which does that in the network. If required all these character conversions can be eliminated and NET will transfer 8-bit bytes of data transparently from RT-11 to the communications line. This is called DUMP mode, and is used for example to transfer binary data between two RT-11 systems both running NET. The various other modes of NET will be covered in the next chapter under the appropriate mode changing commands. - .hl 1 Command Syntax A command to NET can be started at any time by entering the command prefixing character. This must be followed immediately by a command word of which only the first two characters are significant. Some commands require a parameter which follows the command word and must be separated from it by one or more spaces. Details of the parameters are given below for each command separately. The command is terminated by the RETURN key and will not be executed until RETURN is entered. Data transfer commands... $TR transmit from a file $RE receive to a file $CL close any transmit and receive files $CT close any transmit file $CR close any receive file Mode setting commands... $MT set Page 5 terminal monitoring of transmit files $MR set terminal monitoring of receive files $SP set terminal output in spy mode $LE set local echoing of RT-terminal $VD set VDU mode $TE set TAB expansion mode $DU set dump mode for transmit and receive Miscellaneous commands... $HE help gives brief details of commands $EX exit back to RT-11 $PO set the DL-11 port to use $CC set the command prefixing character $ST give an internal status report This command opens a pre-existing RT-11 file, and starts to send it down the communications line. The format is... $TR dev:filnam.ext where 'dev:filnam.ext' is a standard RT-11 file name, with default extension 'DAT'. Examples.. $TR MT:MYPROG.FOR $TR TEST An error will be reported immediately if a file is already being transmitted, the file name syntax is incorrect, the file does not exist, or the device handler cannot be used. Any error in reading the file will be reported when it occurs. See the chapter on NET Messages for further details. An informative message will be given when the end of the file is reached and the file will be automatically closed. During transfer of data from a file, data cannot be entered from the terminal. However, further NET commands can be given at any time. The transfer of data from a file is turned off and on by any DC3 (X-OFF) and DC1 (X-ON) characters received by the PDP-11. However when NET is first started it assumes that the line is clear to send, i.e. the last character was an X-ON (this normally causes no problems). The data transfer initiated by the $TR command may be monitored or not, on the terminal using the $MT command, and closed (i.e. stopped) by either the $CL, $CT or $EX commands. This command opens a new RT-11 file for output, which will erase any previous file of the same name. Subsequent characters from the communications line will be passed to the file until the file is closed by one of the NET commands $EX, $CL, or $CR, or until the file becomes full. The file size will default (on standard RT-11 directory devices) to the bigger of half the largest free space or the entire second largest free space on the device used. This default file size can be overriden by entering the number of blocks to be allocated for the file in square brackets immediately after the file name. The format is... $RE dev:filnam.ext or $RE dev:filnam.ext[size] where 'dev:filnam.ext' is a standard RT-11 file name, the default extension being 'DAT', and 'size' when specified is a decimal number. Examples.. $RE NEWFIL $RE MT:VERYL.ONG $RE IBMPGM.FOR[200] An Page 6 error will be reported immediately if a file is still open to receive data, the file name syntax is incorrect, or the device handler cannot be used. Any error in writing to the file will be reported when it occurs. See the chapter on NET Messages for further details. If the receive file becomes full an error message is printed at the time that NET is unable to write the next 512 byte buffer to the file after the last block allocated to the file has been filled. Thus the 512 characters received from the communications line just prior to the error message will not be stored in the file. In 'network' mode (see DUMP below) NET does not pass to the file, characters arising as echoes from the network of characters entered at the terminal. Thus in typical use the receive file gets only what originates from the host computer. Before using the $RE command with high speed lines one should consider using the $LC command - see below. This command will close any file open either for transmission or reception. The command has no following parameters and gives no error messages. If no files are open then no action is taken. The format is... $CL See the $CT and $CR commands for details about file closure. The $CL command is contained implicitly in the $EX command. This command will close any file being used for transmission. The command has no following parameters and gives no error messages. If no file is open for transmission then no action is taken. The format is... $CT Note that closing a file that is being transmitted leaves that file unchanged, and merely stops the transmission. Any file being transmitted will also be closed implicitly by the $EX command. This command will close any file receiving data from the communications line. The command has no following parameters and gives no error messages. If no file is open for reception then no action is taken. The format is... $CR Note that closing the receive file outputs any characters still held in NET's buffer for the file and then makes the file permanent in the RT-11 directory. An implicit close for the receive file will be done by the $EX command. This means that once a file is opened for output by NET there is no way that one can prevent the file becoming a permanent entry in the RT-11 directory and erasing any previous file of that name. If a file name is entered inadvertently and the original file of that name should be retained, one must exit from NET and then recover the erased file using the standard RT-11 recovery techniques (e.g. with .DIR/DELETED and using DUP to re-establish the directory entry). Each of the commands in this section takes a single parameter that must be either the word 'OFF' or the word 'ON'. Thus the format is... $XX OFF or Page 7 $XX ON where 'XX' is one of the command words below. The command will set an internal mode switch to the corresponding state. The only error condition for each of these commands arises if the parameter is not one of the words 'ON' or 'OFF'. In such a case no change is made in the mode switch and the error is reported. Note that the command itself merely changes a mode which will effect subsequent data transfers. The current setting of all the mode switches can be displayed with the $ST command described in the next section. When Monitor Transmit mode is ON, data being transmitted to the communications line from a file is also displayed on the terminal. When this mode is OFF, it is not. The default setting for Monitor Transmit is ON. Note that when the terminal runs at a slower speed than the communications line the data transmission from the file will not wait for the terminal. In this case the terminal can only display some of the characters transmitted. Although the display on the terminal is therefore garbled it can be used to show the rate at which data is being sent. For example when the network response is slow there may be pauses during transmission. It should be noted that there is an interaction between Monitor Transmit and Local Echo modes. When Local Echo is OFF it is assumed that remote echoes are being supplied by whatever is at the other end of the communications line. The effect of Monitor Transmit ON is to allow these echoes to appear on the terminal. If Monitor Transmit is OFF they are prevented from appearing on the terminal. When Local Echo is ON however, the effect of Monitor Transmit ON, is to display characters from the file directly on the terminal as if they had been entered from the terminal. Because of this interaction, if Monitor Transmit is ON when Local Echo is OFF, and remote echoes are not being supplied, then the transmited data does not appear on the terminal. When Monitor Receive mode is ON data being received from the communications line and stored in a file is also displayed on the terminal. When this mode is OFF it is not. The default setting for Monitor Receive is ON. Note that when the terminal runs at a slower speed than the communications line the data being received into the file will not wait for the terminal. In this case the terminal can only display some of the characters transmitted. Although the display on the terminal is therefore garbled it can be used to show the rate at which data is being received. For example when the network response is slow there may be pauses during reception. When SPY mode is ON data from the communications line that is displayed on the terminal is displayed as a 3 digit octal number. The default setting for SPY mode is OFF in which case the normal ASCII characters are displayed. When Local Echo mode is ON characters entered on the terminal are echoed immediately by NET. The default setting for LOcal Echo mode is OFF which is appropriate in situations where echoes are being supplied Page 8 remotely (e.g. the DSIR network). Note that unless DUMP mode is ON the DELETE (Rubout) key is echoed locally anyway - see the DUMP mode command below. When Line Control mode is ON, NET will automatically send a DC3 (X-OFF) character back down the communications line when its internal ring buffer for receiving characters becomes 2/3rds full. When the buffer drops to 1/3rd full again a DC1 (X-ON) character is sent. These control characters are intended to stop and restart the device at the other end of the communications line. In particular when another PDP-11 running NET is at the other end, these characters are effective and prevent overflow of the receive buffer. The default setting of Line Control mode is OFF in which case NET does not send the X-OFF/ON control characters. When Line Control mode is OFF and it is suspected there may have been a buffer overflow problem, the $STATUS command can be used to report the number of ring buffer overflows (i.e. the number of characters lost). ***NOTE*** the present implementation of this Line Control feature is only a simple one and there is at least one problem to watch for. If the remote device is echoing characters sent to it, Line Control should not be used. This is because the echoed X-OFF characters will turn off NET's transmission and a lockout will result! When VDU mode is ON the DELETE (Rubout) character from the terminal is echoed as the sequence (Backspace, Space, Backspace) appropriate for a screen. When VDU mode is OFF, DELETE is echoed as the backslash character (\). The default setting for VDU mode is OFF. When Tab Expansion mode is ON, and DUMP mode is OFF, then TAB characters from either the terminal or a transmit file are converted to spaces to produce tab-stops at columns 9, 17, 25, etc. The default setting for Tab Exapansion mode is OFF in which case TAB's are transmitted without conversion. Note that when DUMP mode is ON, TAB characters are never converted, so this mode has no effect. The DUMP command is used to switch between the default 'Network' mode (DUMP OFF) and 'Dump' mode (DUMP ON). 'Network' mode is used in conjunction with the DSIR network and causes certain character conversions between RT-11 and the communications line. 'Dump' mode is used when no character conversions are required. Details of these two modes are as follows... In 'Network' mode (DUMP OFF) the following character conversions take place... A DELETE (Rubout) from the terminal is transmitted as the pair of characters (DLE, BELL) the network's character delete sequence, and is echoed directly on the terminal by NET according to the setting of VDU mode (see above). LINEFEED characters from a file are not sent down the communications line. Blank lines in a file are padded out to contain a single space. That is two successive RETURN characters will be separated by a space. This is to prevent INPUT/EDIT transitions when using the TSO editor. TAB characters will be expanded to an appropriate number of spaces if the Tab Expansion mode is ON (see $TE command). DC3 (X-OFF) and NUL characters received from the communications line will be Page 9 ignored, i.e. are not passed either to the terminal or a receive file. All characters received while the communications line is clear to send are assumed to be echoes of characters just sent by NET, and are not passed to a receive file. If NET starts up in 'Network' mode it will send the network status query (DLE, ?) down the line so that the first thing the user should see is the network's reply to that. In 'Dump' mode (DUMP ON), any 8-bit byte can be sent from a file without conversion, and from the terminal any 7-bit ASCII character can be sent with the following exceptions... The current command prefix character cannot be sent, but the command prefix character can be changed. STX (CTRL/B) and ACK (CTRL/F) can only be sent under RT-11 F/B if a SET TT NOFB is in effect. DC1 (X-ON or CTRL/Q) and DC3 (X-OFF or CTRL/S) can only be sent if a SET TT NOPAGE is in effect and NET is running under the F/B monitor. These characters cannot be sent under the S/J monitor. As far as I am aware there is no way to transfer SI (CTRL/O) from the keyboard to a RT-11 program, so that character can not be sent at all. The HELP command prints on the terminal a summary of NET's commands, the syntax of their parameters, and their function. The command format is simply... $HE and produces approximately 18 lines of information on the terminal. Note that NET can be compiled with no HELP support to save memory space and if the HELP command is given to such a version of NET a one line apology is printed. The EXIT command terminates NET and returns to the RT-11 monitor command level. Before terminating, NET will close any current files open for transmission or reception and will release the communications line interface. The format of the command is simply... $EX See the $CT and $CR commands above for details about file closure, and the $PO command below for details of releasing the communications line interface. The PORT command selects a new serial line port to be used as the communications line. This is for use where the PDP-11 or LSI-11 system has more than one DL-11 serial line interface available (apart from the RT-11 terminal that is). The format of the command is... $PO n where 'n' is the number of the port to be connected. The distributed version of NET allows for 3 ports as follows... Port Trap vector CSR address 1 300 776500 2 310 776510 3 320 776520 The number of ports and their interface addresses can however be tailored to individual systems (see Chapter 7). The PORT command will issue an immediate error if the parameter given is not a number between 1 and the highest port number allowed. Otherwise the current port is released and the new one connected. Releasing a port means that the interrupts are disabled and the trap vectors returned to the values they had before NET used them. Connecting a new port means that NET Page 10 takes over the trap vectors and enables the interrupts on the interface. Note that NET will release a port in the orderly way described above when an EXIT command is given. The $CC command is used to change the current command prefixing character. The command format is... $CC x where 'x' is the new command prefixing character. The default command character is ESCAPE which echoes as a $-sign. If one wants to send the ESCAPE character from the terminal (as opposed to sending it from a file) the command prefix character must first be changed to something else. If the parameter of the $CC command is not a single character an error message is given. Note that a control character can be used as the command prefix character and most control characters echo as an '^' followed by the appropriate printing character. That is CTRL/C will echo as '^C' etc. Although two characters are echoed this counts logically as one character. Because lower case characters (strictly characters with ASCII codes from 140 to 177 octal) are mapped to upper case during command input these cannot be used as command prefixing characters. Also the RETURN key cannot be the command character but note that a LINEFEED can. The STATUS command gives a report of NET's internal status on the terminal. The command format is simply... $ST and produces the following information... and if so which block is being transmitted and if so which block is being filled If any then the number of receive buffer overflows (i.e. characters lost) since the last $STATUS or $PORT command. If any then the number of DL-11 overrun errors since the last $STATUS or $PORT command. All the values printed by NET are octal numbers, in particular the error counts for items 6 and 7 above are. Buffer overflows refer to characters received by NET and then lost either because the receive file device or terminal could not keep up. DL-11 errors refer to any errors signalled by bit 15 of the interface buffer register (i.e. parity, framing or overrun) but we only expect overrun errors. These are normally due to system latency problems. That is NET itself cannot keep up with the input, for example; because of Foreground job intervention; UNIBUS timing problems; or too fast an input line etc. Both error counts are always zeroed by the $STATUS and $PORT commands. Note that NET can be compiled with no STATUS support to save memory space. If the STATUS command is given to such a version of NET a one line apology is printed. - NET issues error and information messages to the terminal. These all begin with the character '$' on a new line. The following list of messages in alphabetical order is accompanied by some notes on interpretation. $COMMAND Page 11 CHARACTER: ... (etc) This is NET's status report in response to the $STATUS command. It should be self explanatory - if not read this document again. $FILE ALREADY BEING TRANSMITTED A $TR command has been given while a previous one is still outstanding. The outstanding transmit can be closed with the $CT command and then the $TR command may be given. $FILE ALREADY RECEIVING A $RE command has been given while a previous one is still in effect. The current receive file can be closed with the $CR command and then the $RE command given to receive to the new file. $FILE OPEN FAILED NET was unable to open either a transmit or receive file. This usually means that a receive file was not found - check that the file name is properly specified and that it actually exists. $FILE SPECIFICATION ERROR The file name given after a $RE or $TR command had invalid syntax. The format must be standard RT-11 [DEV:]FILNAM[.EXT] where DEV: defaults to the default disk DK: and .EXT defaults to .DAT. Only alphanumeric characters are allowed. A size may be specified for receive files and must be given in square brackets after the file name with no separating spaces. $HANDLER FETCH ERROR This implies a system error in loading the device handler required to access a transmit or receive file. One should abandon NET ($EXIT command) and fix the RT-11 system! $ILLEGAL COMMAND The first two characters of the command word following a command prefix character did not match any of NET's commands. $INVALID PORT NUMBER The parameter given after the $PORT command was not a number between 1 and the highest port available. $MUST GIVE ON OR OFF The parameter word after a mode switch command was not one of 'ON' or 'OFF'. $NET COMMANDS ARE... (etc). This is the response to the $HELP command. It should be self explanatory - if not read this document again! $NET V3.03 This is NET's start up message on the RT-11 terminal. $NO HELP AVAILABLE This message is printed in response to the $HELP command when NET has been compiled with no HELP support. $NO ROOM FOR HANDLER The handler required for access to a transmit or receive file cannot be loaded by NET because there is not enough memory space. This error only occurs when NET is run as a background program and means that either your PDP-11/LSI-11 system is too small to do what you are trying to do or the foreground job is taking up too much memory. Page 12 $NO STATUS REPORT AVAILABLE This message is printed in response to the $STATUS command when NET has been compiled with no STATUS support. $NO SUCH DEVICE This message occurs when the device given for a transmit or receive file does not exist on the system - check the spelling of the device mnemonic before the colon. It will also occur when no device/file is specified for the $TR or $RE commands. FGNET (see chapter 8) will give this error message when a device is requested that has not been explicitly loaded with the RT-11 LOAD command - remember that a foreground job cannot load a device handler itself. $ONLY SINGLE CHARACTER ALLOWED The parameter given in a $CC command was not a single character. The comand prefix character will not have been changed. $RECEIVE FILE FULL An attempt has been made to write a block past the last block allocated for a receive file. When the error message occurs the last 512 characters and subsequent ones are not able to be saved in the RT-11 file. See the $RE command. $RECEIVE FILE WRITE ERROR An error has occurred in attempting to write a block buffer of 512 characters to the receive file. This usually implies a device error of some kind. Data received from the communications line will be lost and the receive file closed. The receive file will however contain previous data. $TRANSMIT FILE ENDED The file being transmitted in response to the last $TR command has all been sent. The file will be automatically closed. $TRANSMIT FILE READ ERROR An error has occurred in attempting to read a block buffer of 512 characters from the transmit file. This usually implies a device error of some kind. The transmit file will be closed and no further data is transmitted from it. - Assuming a system connected to the DSIR network, and an RT-11 file 'GEOTHM.DAT' to be sent to the IBM computer at Cumberland Computer Centre, the NET session might look like... .R NET ( ** Note 1) $NET V3.03 GR TIME = 1628 ** OUR LINE PRINTER IS UP AND WELL AGAIN :*tso,c ( ** Note 2) CCC TSO LINE ACTIVE CCC TSO PORT 014 ALLOCATED TO: 023 , 076 [GT1] TSB, TSO AND BATCH UP 0810 :logon srgimrm/password ( ** Note 3) SRGIMRM LOGON IN PROGRESS AT 16:28:31 ON MAY 19, 1980 NO BROADCAST MESSAGES READY :edit geothm.data nonum new ( ** Note 4) INPUT : ( ** Note 5) $TR GEOTHM this is the first line of file 'geothm.dat' :and this is the second and so on. :.... $TRANSMIT FILE ENDED : ( ** Note 6) EDIT :end save ( ** Note 7) READY :logoff SRGIMRM LOGGED OFF TSO AT 16:38:53 ON MAY 19, 1980 ****** THIS TERMINAL IS LOGGED ON TO THE NETWORK SOLICITOR : ( ** Note 8) CCC TSO PORT 014 Page 13 FREE : ( ** Note 9) $EX . ( ** Note 10) Notes... Here we are starting at the RT-11 command level and NET is on the system device (SY:). At this point, and whenever the colon prompt occurs below, the terminal bell will ring. This is caused by NET's conversion of the DC1 (X-ON) character to a bell, it implies that you can enter another line to the network. The standard network command is given to connect to a TSO port at Cumberland. Now we LOGON to TSO - I am not going to tell you my password! We are using the 'NONUM' TSO edit mode to save time while the file is being transmitted. The file could be renumbered later. At this stage we enter a NET command which echoes on a new line, does not get sent to the IBM machine, and starts the file transfer. When the transmit file has all been sent NET types this message. The editor is still in INPUT mode however and we must enter a blank line from the keyboard to go to EDIT mode. This ends the edit session - we could do other things at this stage though (e.g. RENUMBER, $TRANSMIT another file etc.) At this stage we enter the network port release sequence (CTRL/P, T) on the keyboard to free the port. Now exit from NET. We are here back to the RT-11 command level. Page 14 Assuming the same system as in the previous section, and a file 'GEOTHM.DATA' on the IBM machine that we want to bring back, the NET session would look like... .R NET $NET V3.03 GR TIME = 1350 ** OUR LINE PRINTER IS UP AND WELL AGAIN :*tso,c CCC TSO LINE ACTIVE CCC TSO PORT 014 ALLOCATED TO: 023 , 076 [GT1] TSB, TSO AND BATCH UP 0810 :logon srgimrm/password SRGIMRM LOGON IN PROGRESS AT 13:51:03 ON MAY 19, 1980 NO BROADCAST MESSAGES READY : ( ** Note 1) $RE GEOTHM[-1] list geothm.data snum ( ** Note 2) GEOTHM.DATA THIS IS THE FIRST LINE OF FILE 'GEOTHM.DAT' AND THIS IS THE SECOND AND SO ON. ... READY : ( ** Note 3) $CL logoff ( ** Note 4) SRGIMRM LOGGED OFF TSO AT 14:05:23 ON MAY 19, 1980 ****** THIS TERMINAL IS LOGGED ON TO THE NETWORK SOLICITOR : ( ** Note 5) Notes... Here we give NET the command to receive everything into the RT-11 file GEOTHM.DAT. The value -1 used for the size allocation makes RT-11 use the largest free space available for the file. This line goes through to the IBM computer and starts the listing. We use the 'SNUM' keyword to prevent line numbers being put in the listing on the left hand side. We could also use 'NONUM' which, if the file were line-numbered would put the line numbers on the right hand side of the listing and allow some checking that all the file was properly transferred. The echoes returned from the network of this IBM command line do not go into the file! Everything received from the IBM computer between and including the file name line 'GEOTHM.DATA' and the last colon has gone to the receive file - the first and last lines may need to be edited out. This command to NET closes the receive file. This line goes through to the IBM machine. We can terminate the session with (DLE, T) and $EX as in the previous section. Page 15 Given two systems A and B running NET and a file ADVENT.SAV to be transferred from system A to system B, the NET sessions could look like... System A --- .R NET $NET V3.03 GR TIME = 1421 ** FANOUT CRASH FIXED : ( ** Note 1) $PO 3 $DU ON System B --- .R NET $NET V3.03 $DU ON ( ** Note 2) $RE ADVENT.SAV $MR OFF ( ** Note 3) $LC ON ( ** Note 4) System A --- $TR ADVENT.SAV ( ** Note 5) $TRANSMIT FILE ENDED $EX . System B --- $EX . Notes... System A's default port is connected to the DSIR network, we switch to port 3 to connect to the other PDP-11 system, and set DUMP mode. System B's default port is connected to System A. We set DUMP mode on. At this stage the connection between the systems could be tested. Anything typed on System B's terminal should appear on System A's terminal and vice versa. Once satisfied that things are OK we set the receive file ADVENT.SAV. We set Monitor Receive OFF at System B to avoid the terminal echoing binary data. Note that we do not need to worry about Monitor Transmit OFF at System A because System B is not supplying remote echoes back to System A (see the $MT command for details). Line Control mode should be set ON at the receive end when two NET systems are communicating. This prevents overflows of the NET receive buffer at System B if the output device for the receive file is slower than the communications line. The transfer is started at System A, and we wait for the message to say it has ended. During this period the terminal may display ^S and ring its bell. This is due to the X-OFF and X-ON characters issued by System B. When the file has ended both NET sessions are terminated with the $EX command. - For those who had previously used NET V2E or similar releases of NET, the following is a summary of the changes in NET V3.03. Tab conversion to spaces when transmitting in 'network' mode can now be disabled/enabled with the $TE command. All device interface addresses and default values for software status flags are collected together and start at location 1000 (octal) for convenient patching of the distributed 'SAV' module. When switching ports or terminating NET the trap-vectors for the DL-11 port are reset to what they were before NET used them and the interface is properly disabled. NET V2E left the interrupts enabled when an exit was forced with CTRL/C, with unpredictable but usually disastarous results. Note that now.... NET V3.03 treats CTRL/C from the keyboard like any other character and the only way to exit from NET is with the $EX command. Local echoing and rubout DELETE handling has been improved. The $VDU command now has some effect! Furthermore when transmitting in 'network' mode a DELETE at the terminal sends the network delete sequence of (DLE, BELL) and then NET does its own erase echo on the terminal. The command prefix character can be changed from its default of ESCAPE with the $CC command. The old $DU and $ST commands have been dropped and instead $DUMP is now implemented as a mode switching command. This seems less likely to cause confusion. A new command $ST has been implemented to give a report of NET's internal status and any buffer overflows or DL-11 Page 16 errors. A new command $CL has been implemented to close both transmit and receive file operations. A new command $LC has been implemented which can be used to make NET issue X-OFF and X-ON control characters in an attempt to prevent overflow of its receive buffer. This is necessary when doing NET to NET transfers with two PDP-11 systems and a high speed line (e.g. 9600 baud) going to a slower device (e.g. a floppy disk). When giving a specific file size for the $RE command the final '=' sign is no longer needed and in fact must not be given! The source file for NET is coded with some compile time options; retrofitting to RT-11 V2C which disables some features; setting Foreground mode (see Chapter 8); disabling the $HELP and/or $STATUS commands (to save core); and choosing the DL-11 input ring buffer size. A serious though surprisingly seldom reported bug in the fetching of device handlers has been fixed. NET V2E actually overwrote itself when it needed one! The RETURN key on the terminal is now regarded as producing just a carriage-return not followed by a line-feed (which RT-11 always puts in). Various minor consequent changes have been made to the treatment of local echoing. These may give slightly different behaviour when doing odd things but the new treatment is generally cleaner and it should be easy to understand what is going on. - NET can be tailored to some extent by patching values starting at location 1000 (octal) using the RT-11 utility program PATCH. The locations that may be patched and their significance are as follows... Address Type 1000 word Number of ports defined in following table of 2 word entries. 1002 word Trap vector address for 1st port. 1004 word CSR address for 1st port. 1006 .to. Trap vectors and CSR for ports 2 to 6. 1030 (NET can be recompiled to allow for more than 6 ports) 1032 word Default port number to connect to at start-up. 1034 word Priority for DL-11 interrupt service routine (bits 5 to 7) The following 7 bytes are the start-up settings for NET's operating modes. A value of zero implies the mode is OFF, and non-zero implies ON. 1036 byte Monitor Receive mode 1037 byte Monitor Transmit mode 1040 byte VDU mode 1041 byte SPY mode 1042 byte Local Echo mode 1043 byte Line Control mode 1044 byte Tab Expansion mode 1045 byte DUMP mode 1046 byte Start-up command prefix character - .hl 1 Program structure The design of this program is largely dictated by the following considerations... When the RT terminal is attched directly to the DL-11 its response should be as if the PDP-11 were not there. This means that character echoing may be done remotely not locally. As a result RT terminal input has to be done character by character and in special TTY mode. As characters must be sent to tbe DL-11 individually the overhead of RT-11 '.WRITE' requests every time would be silly. Thus we do not use a device driver for output to the DL-11 and the program handles the Page 17 corresponding interrupts directly. Because characters must be transferred individually in the reverse direction also, we do not use a driver for input from the DL-11 either. The program handles these interrupts directly also. In order to allow for both line speeds greated than the terminal speed and for delays during output of RT-11 file blocks, we use a large ring buffer for DL-11 input. The RT terminal must be able to break in while we are receiving from the DL-11 and to issue supervisory commands. However terminal input cannot be recognized in RT-11 as an interrupting event, this means the program has to be written to continuously monitor the terminal. Note that this is a privileged program in the sense that it needs to address the I/O page directly. NET may be compiled to run in the Foreground of RT-11 F/B. Before doing this the line defining the symbol '.FG' should be edited to set '.FG' to 1. This will cause some minor changes to the code produced. After compilation and linking the resulting program should be called FGNET to avoid confusion with the Background version. FGNET allows the Background of RT-11 some processor time by issuing a timed wait in its main loop. NET V2E did not do this, so when run as a Foreground program it blocked the Background completely. Use of FGNET with high data rates should be approached with caution as the timed wait implies that not all the processor time can be devoted to FGNET. In the current release FGNET gives rise to a fatal monitor error if a receive or transmit file is specified on a device 'owned' by the background job. Something may be done about this in later releases. NET uses a macro .MTPS to load the processor status priority bits. In the distributed source this macro is defined using the MTPS instruction availables on the PDP-11/34 and LSI-11 processors. This is believed to be the only processor dependent coding in NET. If NET is to be run on another PDP-11 series processor the source should be changed deleting the definition of the .MTPS macro on page 2. This causes MACRO to use the SYSMAC version of .MTPS which works on any machine. NET is designed to use a simple DL-11A, B, C or D interface without modem support. The program could be modified to support similar interfaces without much trouble. The NET modules to be changed in this case are the input and output handling sections TONT and FMNT and the interface initialization module DLSETU. Thanks to discussions with David Couch NET is fairly careful in connecting to a DL-11 interface and allows for it to be doing anything at the time. NET also attempts to put the trap vectors back the way it found them and so could be used to some extent alongside other software using the same interfaces. For example regular RT-11 drivers, spoolers etc. The DL-11 input buffer register bit 15 is checked at every interrupt for an error. This is a logical OR of overrun, parity and framing errors - but we report the count for such errors as overrun errors in the $STATUS command report. NET has been used at the Institute of Nuclear Sciences in most of the situations it is designed for. Our typical uses of NET are; with a 1200 baud line to the DSIR network; with a 4800 baud line to a Tektronix 4025 terminal having a large text buffer; and with 9600 baud lines to LSI-11 systems. We have sucessfully used the 4025 terminal through NET and the DSIR network as a graphics terminal on the IBM370 (with PLOT-10 graphics codes). We have also run a VT100 terminal through NET as the console of Page 18 a remote RT-11 system running KED. Both these arrangements made use of NET's ability to pass special control characters from the host to the terminal. As part of our own testing of NET, the program was used with a DL-11 wired back to itself thus directly echoing everything sent. Approximately 2 Mbytes of data was transmitted at 9600 baud using the $TR command and recaptured with the $RE command in a new file. Comparison of the transmitted and received files showed no errors. During this test a Foreground job was competing for both the CPU and the disk used by NET. In our environment the major cause of problems with NET is loss of characters due to Foreground jobs that leave too little CPU time or UNIBUS time for the Background. This problem is usually signalled by DL-11 overrun errors in the $STATUS report. -