=============================== XMODEM for the TRS-80 Model 100 =============================== Version of 5/7/84 (c) Rick Perry, CIS-75665,1045 This version performs auto-dial-redial, auto-logon, terminal emulation,and text file transfers ( .DO) using the Christensen checksum protocol. Communication parameters are 8N1D for file transfer and 7I1E for terminal emulation. The program will operate using the 300 baud internal modem or a 1200 baud external modem (Novation Smart-Cat or equivalent). Files may be Up/Down loaded directly from/to RAM, disk or cassette. AUTO-DIAL/LOGON: The program starts with a "Find:" prompt and will attempt to retrieve a phone number and auto- logon sequence from the ADRS.DO file and logon to a host computer. When using the internal modem, if no carrier is detected within 20 seconds after dialing, or if you press any key, the program will hang up the phone. After waiting 20 seconds more, it will retry the number unless you press any key. If the carrier is detected, it will BEEP and proceed through the auto-logon sequence as specified in the ADRS line, then jump to the terminal emulation mode of the program. At the "Find:" prompt, enter a string to search for in the ADRS file or press F8 (or enter "Menu" ) to return to the Menu. When the string is found press "M" to begin auto-dial using the internal modem, or press "S" to dial through an external 1200 baud Novation Smart-Cat modem, or press ESC to return to the "Find:" prompt, or press any other key to continue searching. If you wish to manually dial a telephone number, enter "Dial" at the "Find:" prompt. After dialing and hearing the carrier tone, press "M" or "S" to allow the program to Connect, or press any other key to return to the "Find:" prompt. The control sequences used with the Novation modem appear around the last twelve lines of the program. This code may be modified to work properly with other smart modems. When dialing through an external modem, code around the last eight lines of the program allow you to directly enter commands to the modem and optionally press CTRL/R to restart the program or CTRL/E to exit to the Menu. TERMINAL EMULATION: The program is not transparent to CTRL/C, i.e. BREAK will halt the program but leave you connected to the host. Function key F5 (Brk) is used to send CTRL/C to the host. Additionally, F1 ( Paus) will alternately send CTRL/S & CTRL/Q (XOFF/XON) each time it is pressed. If you accidently press CTRL/C or BREAK, enter CONT to return to the program. If you press CTRL/ S, just press it again to continue. F4 (Term) is used to jump directly to TELCOM's Term mode while remaining connected to the host. Once in TELCOM you cannot return to the program without logging off and disconnecting from the host unless you are connected through an external modem. From TELCOM you can UPload and DOWNload text files with the regular ASCII XON/XOFF protocol. F6 (Free) provides a display of how many bytes of RAM are currently available. F7 (Dir) lists the RAM file directory in the same way as the BASIC FILES command. F8 (Bye) is used to exit the program and return F2 (Down) will initiate a file download transfer and F3 (Up) will initiate uploading. DOWNLOADING: The program will prompt for a valid file name and proceed through the XMODEM protocol with the host. The host should be ready to send the file before entering this mode. While downloading, the received file is not displayed on the screen. When a NAK (negative acknowledge) is sent, the program prints an "X". When ACK (acknowledge) is sent, the program prints ".". You can abort the download at any time by pressing F8 (Abrt). The program itself will automatically abort the download only if one of the following circumstances occur: - The host sends a CANcel. - The received block number is neither the current block number nor the previous block n - An error trap occurs in the program (this could be caused by an "Out of Memory" condition on the Model 100). UPLOADING: The program will prompt for a valid file name and proceed through the S2251 TRSEIG.SIG/G'day. See ya. Just leaving. XMODEM protocol with the host. The host should be ready to receive the file before entering this mode. While uploading, the transmitted file is not displayed on the screen. When a NAK is received, the program prints an "X". When ACK is received, the program prints ".". If nothing is received after waiting 10 seconds, or if anything other than NAK, ACK or CAN is received, the program prints a "?". You can abort the upload at any time by pressing F8 (Abrt). The program itself will automatically abort the upload only if the host sends a CANcel or if an error trap occurs (e.g. due to an IO Error when uploading from cassette). PROGRAM NOTES: The program itself does not count the number of NAK's sent or received per block and will not automatically abort if an excessive number of NAK's occur. It is up to you to use F8 (Abrt) to cancel the file transfer if you feel that too many NAK's are oc curing. When aborting a file transfer the program sends a single CANcel character (CTRL/X) to the host and returns to its terminal emulation mode. If you then notice that the host has not responded to the CANcel, you may send additional CAN's by pressing CTRL/ X. MAXFILES is set to 3 at the beginning and reset to 2 upon normal exit to the Menu. Function key definitions are restored to their previous user-defined values upon exit from the program to the Menu.