Documentation for Tinyterm v1.0. Written by Michael Brandon. Tinyterm - a tiny terminal program ---------------------------------- Tinyterm is a tiny terminal program which will allow you to communicate with other computers via a modem or an RS-232 connection, and to download files using the XMODEM file transfer protocol. The reason I wrote Tinyterm is that I had a crude terminal program which would allow me to communicate with a Bulletin Board System, but not to download files; Tinyterm can thus be used to download either source or object code for a sophisticated terminal program such as MODEM7A or YAM. How to get Tinyterm running on your system ------------------------------------------ You will need an 8080 or Z-80 assembler, and either: (i) A friend with a computer who has (or can get hold of) a copy of the source code for Tinyterm or (ii) A hardcopy listing of Tinyterm There are two versions of the source code for Tinyterm - one written in Intel mnemonics (for an 8080 assembler), and one in Zilog mnemonics (for a Z-80 assembler). They are on the files "TINYTERM.ASM" and "TINYTERM.MAC" respectively. Remember to get the right version! In case (i), you can download the source code and documentation for Tinyterm from your friend's computer via a modem or a direct RS-232 connection using STAT and PIP (for CP/M 1.x and 2.x) or DEVICE and PIP (for CP/M 3.0). The files are small enough that most CP/M systems with a reasonable amount of memory will be able to download the files. In case (ii), you will have to type in the source code by hand (minus the comments of course!). This isn't as bad as it seems however, since there are only about 260 lines of actual code. Having procured the source code for Tinyterm, there are some modifications which will have to be made to it before it will run on your system. The following constants will probably have to be changed - mod_data - this is the 8080 or Z-80 I/O port through which your SIO, UART or USART data register (and hence your modem) is accessed. You should be able to find the correct value for this by looking at the Technical Manual for your CP/M system. mod_status - this is the 8080 or Z-80 I/O port through which your SIO, UART OR USART status register is accessed. Look in your Technical Manual for this too. rx_mask - this is the 'mask' which extracts the "receive ready" information from the SIO, UART or USART status byte. It is 'AND'ed with the status byte to determine whether or not a character has been received by the modem. rx_ready - the value of "rx_mask AND status byte" when a character has been received by the modem and is waiting to be read. tx_mask - this is the 'mask' which extracts the "transmit ready" information from the SIO, UART or USART status byte. It is 'AND'ed with the status byte to determine whether or not the modem is ready to transmit a character. tx_ready - the value of "tx_mask AND status byte" when the modem is ready to transmit a character. cpu_speed - this is the speed of your CPU in kHz. The value is not very critical. Note : the values for rx_mask, rx_ready, tx_mask and tx_ready as they stand are correct for a Z-80 SIO; thus, they will only have to be changed if you are not using a Z-80 SIO to access your modem. You may also have to add code to the program, where indicated in the source code, to set up the correct communications parameters, if they are not already set up. The correct parameters are - 300 baud, 8 data bits, 1 stop bit, no parity. Your system may default to this setup, or you may have a system utility to do this from CP/M, or you may be able to do it via hardware jumper leads etc. Add code to the program to set up the correct parameters only if you have to. Once you have made the required changes to the source code, you should be able to assemble the source code and run the program. Using Tinyterm -------------- To run Tinyterm, just type "tinyterm " where is the name of the file which is to contain a downloaded file. To make the program simple, I decided to make specifying the file name compulsory; however, if no downloading is done then the file name specified is not used. Having started the program running, your computer should now behave as a full- duplex terminal i.e. any character you type will be sent out through the modem (but not displayed), and and character received from the modem is displayed on the screen. Two characters have a special meaning to Tinyterm - they are C and R. When C is typed, Tinyterm exits to CP/M; when R is typed, a file is downloaded. Downloading files using Tinyterm -------------------------------- To download a file using Tinyterm, you should ensure that the other computer with which you are communicating is ready to transmit a file using the XMODEM (alias CP/M alias CHRISTENSEN) protocol. Typing " R" starts the file download process. If for instance you ran Tinyterm by typing "tinyterm fred", then when you type " R", any existing file called "fred" is deleted, and the downloaded file will be put onto the file "fred". Note that only one file can be downloaded at a time - if you download two files during the one execution of Tinyterm, then the first file downloaded will be lost. To download more than one file, you will have to repeatedly run the program, download a file, and exit to CP/M. Tinyterm will print various messages during the downloading of a file, the least offensive of which are - "block received" A block was correctly received. "error in block" Part of the block got garbled. "error in block number" The block number got garbled. "file transfer completed" The file has been successfully downloaded; your computer now acts as a terminal again. "no or " The start-of-block indicator got garbled. "timeout" The computer with which you are communicating did not respond within 10 seconds. "(repeated block)" Your acknowledgement for a block got garbled, so the computer with which you are communicating resent the current block. The following messages indicate a more serious error; the file download is aborted, and your computer goes back to acting like a terminal. "aborted" Ten consecutive errors were encountered, so the file download is aborted. "can't close file" The disc file cannot be closed. What to do about this I don't know. "can't create file" The disc file cannot be created. Perhaps the disc is write protected. "disc limit reached" The disc to which you are writing is full.