From: BELONIS 20-MAY-1984 21:53 To: MANAGER Subj: xmodem.cdc 1 University of Washington XMODEM/T77 Academic Computing Center April 1984 ============================================================ XMODEM ============================================================ XMODEM is a Cyber utility that you can use in conjunction with a microcomputer communication program to transfer files between the Cyber and a microcomputer. It can be used to transfer text files, Cyber binaries, and micro binaries. The Academic Computing Center (ACC) currently supports two other packages, RMF and MCOPY, that serve a similar purpose. Which one of these you use depends largely on the type of microcomputer you have. RMF is our best package, since it is both the easiest to use and the most reliable. Unfortunately, the software needed to run RMF is not available for all types of microcomputers. To see if your micro can use RMF, refer to technical note T70 available for reference in the Computing Information Center or on WRITEUP. The next best choice is XMODEM. This utility uses the popular Ward Christensen protocol, and is compatible with a large variety of communication programs available both commercially and through user groups. Some examples of microcomputer packages that will work with XMODEM are MODEM7 (CP/M-80) and PC-TALK (PC-DOS). XMODEM is somewhat more difficult to use and less reliable than RMF. The final alternative, which should work with almost any microcomputer, is MCOPY. MCOPY is a simple "data pump" that will send the contents of a Cyber file out the line with no blocking or error checking. On input it can accept a continuous stream of data at speeds of up to 9600 baud. Because of it's simplicity it is the least expensive and the least reliable of the three. MCOPY is documented in technical note T69, also available for reference in the Computing Information Center or on WRITEUP. To use XMODEM, you will need to acquire a compatible software package for your microcomputer. As mentioned above, these are available from a number of sources. Some excellent ones, MODEM7 and PC-TALK, are available free of charge from user groups and bulletin boards. Others are available through commercial outlets at varying prices. When you go looking for a program, make sure that it uses the Christensen (MODEM7) protocol. 1 1 University of Washington XMODEM/T77 Academic Computing Center April 1984 ------------------------------------------------------------ Using XMODEM ------------------------------------------------------------ Transferring a file with XMODEM is a multiple step process. First use your communication program in terminal mode to log into the Cyber as you would from any "dumb" terminal. Once you are logged in, enter the Cyber XMODEM command to prepare the Cyber to send or receive. Finally, "escape" back to your program's command level, and instruct it to send or receive the file. At this point the transfer should begin and all you need to do is sit back and watch. Since every microcomputer program is somewhat different, the remainder of this document will explain the Cyber XMODEM utility. If you need information about the micro end, you should refer to the documentation that came with your communication program. The syntax of the XMODEM command for sending a file to the micro is XMODEM,lfn/Send,qualifiers and for receiving a file from the micro is XMODEM,lfn/Receive,qualifiers where "lfn" is the name of the file being sent or received. Note that the qualifiers "Send" and "Receive" are relative to the Cyber. When the Cyber is Sending the micro should be Receiving, and vice-versa. In this document, unless stated otherwise, "Sending" means transferring a file from the Cyber to the micro and "Receiving" means transferring a file from the micro to the Cyber. When XMODEM is sending a file, the "lfn" may be the name of a local, permanent, or queue file. XMODEM will search for the file in the same fashion as PRT and SCN. When XMODEM is receiving a file, "lfn" is the name of the local file that will be written. XMODEM always rewinds the Cyber file before it starts. The Send and Receive qualifiers are required, and may be abbreviated to S and R. The other qualifiers are all optional, and are described below. 2 1 University of Washington XMODEM/T77 Academic Computing Center April 1984 ------------------ Command Qualifiers ------------------ The following qualifiers can be abbreviated to the letters shown in upper case. The first qualifier (normally Send or Receive) should be preceded by a slash. Subsequent qualifiers can be separated by slashes or commas. Binary Text Binary specifies that the Cyber file is stored (or will be stored) in binary format, with 7-1/2 eight-bit bytes in each 60 bit Cyber word. This qualifier should be used to transfer files, such as executable Cyber or microcomputer programs, in which all the bits in a word are significant. The opposite of Binary is Text, which should be used when the file contains human-readable text or data. The default is Text. Lowercase NOLowercase When receiving text files, Lowercase or Nolowercase is used to specify the Cyber character set used to write the file. The default is Lowercase, which produces an 8/12 ASCII, upper- and lower-case file. This is the correct setting for documents. Specifying Nolowercase causes the file to be written in display code, with lower-case characters folded to their upper-case equivalent. This is the correct setting for source programs that will be compiled on the Cyber (except for C programs), and for data files that will be read by Cyber programs such as SPSS. When sending a file, Lowercase specifies that the input file is upper- and lower-case 6/12 ASCII, even though it appears to XMODEM to be display code. Likewise, Nolowercase forces the input to be treated as display code even though XMODEM thinks it is 6/12. 8/12 ASCII can be unambiguously recognized, so this qualifier has no effect on 8/12 ASCII files. Crc NOCrc This qualifier is used when receiving files to specify which method to use for detecting transmission errors. Crc specifies the more reliable Cyclic Redundancy Check method, while the alternative, Nocrc, specifies a 3 1 University of Washington XMODEM/T77 Academic Computing Center April 1984 simple checksum. Note that it is always the machine receiving the file that specifies the type of error checking, by sending out the necessary message (NAKs for checksum or Cs for crc) to get the transfer started. It is the responsibility of the machine sending the file to adapt to the requested checking method. Not all microcomputer programs can use Crc error checking. The default is Nocrc. ---------------- Additional Notes ---------------- . If for some reason you should get stuck in XMODEM, you can abort the transfer by typing one or more -X (ASCII CAN) character sequences. This should return you to the NOS command level. The standard NOS -T abort sequence will not work. . When sending a text file to the micro, the Cyber file can be in any of the three Cyber character sets. XMODEM will look at the first part of the file and determine it's character set using the same technique as SCN and PRT. There is some ambiguity between display code and 6/12 ASCII though, so if XMODEM makes the wrong decision, you can override it with the Lowercase or Nolowercase qualifiers. . When sending a file, XMODEM ignores end-of-record and end-of-file marks and copies the file until the end-of-information is reached. When receiving a file, XMODEM writes it as a single NOS record. -------- Examples -------- The following command can be used to have the Cyber receive a binary file with CRC error checking and write it to the local file M7COM: XMODEM,M7COM/R/C/B The following command can be used to have the Cyber send a document file called CDOC: XMODEM,CDOC/S 4 1 University of Washington XMODEM/T77 Academic Computing Center April 1984 The following command can be used to receive a FORTRAN source file called FPROG from the micro for use on the Cyber: XMODEM,FPROG/RECEIVE/NOLOW The following command can be used to send the M7COM file received by the Cyber in the first example back to a microcomputer: XMODEM,M7COM/SEND/BINARY -------------- Sample Session -------------- The following is an example of using a version of MODEM7 to log into the Cyber, copy a Cyber file named TESTDOC to the CP/M file T1.DOC, and copy a CP/M file named SIEVE.C to a Cyber file named SIEVE. Lower-case text indicates your input while upper-case text indicates information the computer displays. Comments are enclosed in square brackets. A>modem7 [start up MODEM7 on the micro] MODEM 7.96 - 12/20/82 VERSION FOR: MORROW MICRODECISION COMMAND (H FOR HELP): t [this command puts you in terminal mode] [dial up the Cyber or connect to the switch] 84/02/23. 19.15.22 A1BAS9 U. W. CYBER 170-750 FAMILY: [go through the usual login process] F>xmodem,testdoc/send [prepare the Cyber to send the file] -e [escape to MODEM7's command level] COMMAND (H FOR HELP): r t1.doc [tell MODEM7 to receive the file] FILE OPEN, READY TO RECEIVE [status lines are displayed CRC IN EFFECT to keep you informed of the AWAITING # NN (00XXH) progress of the transfer] ALL TRANSFERS COMPLETED 5 1 University of Washington XMODEM/T77 Academic Computing Center April 1984 COMMAND (H FOR HELP): t [return to terminal mode] F>xmodem,sieve/receive/crc [prepare the Cyber to receive the file] -e [escape to MODEM7's command level] COMMAND (H FOR HELP): s sieve.c [tell MODEM7 to send the file] FILE OPEN: 21 (0015 HEX) RECORDS AWAITING INITIAL NAK CRC REQUEST RECEIVED SENDING # NN (00XXH) ALL TRANSFERS COMPLETED COMMAND (H FOR HELP): t [return to terminal mode] F>save,sieve [save the transferred file] F>bye [log off the Cyber] -e [escape to MODEM7's command level] COMMAND (H FOR HELP): cpm [exit MODEM7] A> 6 1