XTERM1.COM - The second generation Terminal with XModem and Text File Transfer for the Atari/DIP Portfolio. by Jim Straus November 24, 1989 Copyright 1989 by Jim Straus All rights reserved Certain portions of the code are (c) 1989 by Atari and DIP. This program is placed in the public domain by Atari Corporation and is not for sale. No warranty is given or implied for this programming system. In no event shall Atari be held liable for any damages incurred from misuse of this program. The user assumes all risk and responsibility. This program will only work on the Atari Portfolio computer. It is a simple terminal program for the Serial Interface. It allows files to be sent or received using the XModem protocol. It also allows files to be sent with no translation and files to be captured. To use the program, select serial port parameters from the built-in Setup program. The Initialize! command does not need to be given as the program will attempt to initialize the serial port itself. You may also want to set the External Display to Tracked (80x25). Then start the program by typing XTERM1 at the DIP-DOS prompt. You will see a greeting, and anything you type is sent out the serial port. F1 may be used to exit the program (Note that the Atari key also generates an F1 key code). During the session, F2 may be used to start receiving a file using the XModem protocol. You will be prompted for a file name, and then the program will wait for the file to be transferred. Each block successfully received will cause a period to be displayed. When the file is done, "Done" will be displayed and you will be back in the terminal portion. While the program is transferring, the F1 key may be used to abort the transfer. Sending a file is started with the F3 key and proceeds in a similar fashion. If the file was not found, you will just see "Done" displayed. Note that XModem always transfers files in 128 byte blocks, so files will tend to be rounded up to the nearest 128 byte length. When receiving text files, you may also see extra space on the end, depending on whether or not the sending end put in a Control-Z terminating character. XTERM1 does not put in such characters and just pads with zeros. The XModem time out values in this program have not been tested with a packet network (such as that used by Compuserve), but have been adjusted to Compuserve's suggested values. SHIFT-F1 displays the commands available to you. Capturing text is controlled with the SHIFT-F2 key. The first time it is pressed, you will be prompted for a file name. From then on anything received is also saved in the file. To stop capturing, use the SHIFT-F2 key again. It will tell you it is "Done". Text may be captured through XModem transfers and text sending, but only received text that is displayed will be saved in the capture file. SHIFT-F3 is used to send a text file. It prompts for a file name and the file is sent. When the file is done, you will again see "Done". XTERM1 will also take command line options. The three forms are: XTERM1 -r filename XTERM1 -s filename XTERM1 -h The -r option will enter the XModem receive state, and when it is done receiving the file, the program will exit. The -s option enters the XModem send state. The -h option displays a help message of various options. In the case of a Macintosh running the Red Ryder (tm of FreeSoft Inc.) terminal program, the Portfolio should have a BACKUP.BAT file that looks like: echo RECX filename.txt>aux XTERM1 -s filename.txt with the above lines repeated for each file to be backed up. Red Ryder is left in HOST mode, so the above sequence should automatically send FILENAME.TXT to the Macintosh. A similar process is used to restore the files: echo SENDX filename.txt>aux XTERM1 -r filename.txt Occasional hangs can be alleviated by stopping the transfer on the Macintosh and sending two Control-Xs to cancel that file. Try to build scripts to drive other host machine terminal programs too and post them here as well.