Communications Corner

By Al and Dru Simon

Welcome back to Communications Corner. This month we're going to try to clear up some of the mysteries of that dark and sinister tower of complexities, LCOMM.

LCOMM is a communications program which you can use with your LDOS system to allow your TRS-80 to communicate via modem with timesharing systems, other TRS-80s, or remote Bulletin Board Services (such as the Forum network or the like). It also allows you to send or receive programs from these sources as well. Although it seems complicated at first, you'll get the hang of it in a surprisingly short time.

There are a few things you must keep in mind when you use the LCOMM utility. The first thing you must be sure of when using LCOMM is that you have set *KI (the device driver) to the KI/DVR program BEFORE you enter LCOMM. This will allow you to use the special function keys which will be explained below. You must remember NOT to have your Spooler in use since LCOMM has its own spool buffer. It is also a good idea to create a file for receiving large files when using the utility just so you will have the space allocated and available to you. The syntax of the LCOMM command is clearly defined in the LDOS Manual in a specific section called (cryptically enough) LCOMM UTILITY. LCOMM does not directly interface with the RS232 hardware. It uses what we like to call *CL. (We're not being mysterious, it just means "Communications Line".)

OK, now let's get down to business. LCOMM uses your top row of keys as PROGRAMMED FUNCTION keys in conjunction with your <CLEAR)key. (From now on we'll call this the <CLR> since our fingers get tired easily.) You can call up the menu of the programmed functions at any time by simultaneously pressing the <CLR>, (SHIFT), and (?) keys. The manual refers to the programmed function keys as PF keys, so for clarity's sake we'll do the same here. The functions of these PF keys are varied. Some control parameter selection for filespecs, others turn logical devices on or off, and others are utilities for ease of interface. Let's go over these PF functions:

Hitting your (BREAK) key will send a true break (i.e. an extended Null). In order to send a TRS-80 break (01H) you can use a "Control A."

*KI (CLR>(1> This designates the keyboard device.

When you enter LCOMM it is ON. If you wish to turn off the keyboard device use this command followed by a (CLR>(->. Turning off this device at this point will not turn off any of the other PF keys. *DO (CLR>(2> Video display device. When you enter LCOMM it is ON. To turn it off use the (CLR>(2> followed by (CLR>(->. Turn it on again by using the (CLR>(2> followed by (CLR>(:>.

*PR (CLR>(3> Printer device. When you enter LCOMM the device is off. To turn it on, do a (CLR> (3> then a (CLR> (: >. (Do you see a pattern emerging with these "ON/OFF" commands?). Don't worry about the speed of your printer either, by the way. Output to the printer is fully buffered.

*CL (CLR)(4) Communications Line device. If you want to review a file before you transmit it, you would want to block it from being transmitted so you may turn off the CL. After it is off you can go to half-duplex and do a File Send (FS) which would put the file on your screen without sending it through the CL. Remember though, that as long as the CL is off you will not receive any transmission from the remote source and depending on who you're communicating with, you might miss a good offer!

*FS (CLR>(5> File Send device. This is used as the first step in a two part process for the purpose of sending a file. You would first use the (CLR>(5>, followed by another PF key appropriate to the function you wish to perform, which will be discussed as the specific functions are listed below.

*FR (CLR>(6> Yes, you can guess it. File Receive. It uses the same PF keys as the FS function listed above.

DTD (CLR>(7> Dump to Disk is used to write the memory buffer used with FR to the disk. DTD may be turned on before or after a file has been received.

MENU (CLR>(8> As we mentioned at the start, this displays your command menu. We will duplicate here the neat little chart which is in the LCOMM section of the LDOS manual:

ID (CLR>(9> Identification. Used with FS and FR. Its function is to designate and open a file. When receiving a file from a bulletin board for example, you would perform an FR-ID. You would then be prompted to enter a file name. After you enter the filename you desire, the file opens and is ready, but is NOT turned on. (Remember, ON is (CLR>(:>.)

RESET(CLR>(0> This function closes files. A received file MUST be turned "OFF" and then closed.

ON (CLR>(:> You already had this one figured out, but we thought we'd mention it anyway. It is used in conjunction with other PF keys, as you doubtless figured out already. Re-

member that devices must be "ON" before they will function! OFF <CLR><-> Naturally this works the same way as the ON PF key; that is in conjunction with other keys.

Okay, all that was easy enough, so now we're going to get to some of the good stuff. There are additional functions available to you, which you may access by using <CLR><SH> (which means Clear-Shift) functions. They are as follows:

DUPLEX <CLR)<SH><!> This performs like a toggle switch for half or full duplex. In LCOMM ON/OFF mode, DUPLEX ON means half duplex, and DUPLEX OFF is full duplex. You start in LCOMM in the full duplex state. If you prefer half duplex you would perform the function as follows: <CLR><SH><!> then <CLR><:> The above (freely translated) means DUPLEX ON

ECHO <CLR><SH><"> When you turn on your echo everything that you receive from the remote computer is re-transmitted. If both your computer and the remote one are in Echo On state however, the first character sent will be echoed back and forth incessantly until one of you turns off your echo. ECHO-LINEFEED <CLR><SH><#> This is needed when communicating with a dumb hard-copy-only terminal (no offense) which expects line feeds to be sent by the host computer. When this function is ON, a line feed will be added to any transmitted carriage return. ACCEPT-LINEFEED <CLR><SH><$> Turning this function ON will cause all line feeds to be accepted. (LCOMM normally ignores the first line feed received after carriage returns.) REWIND <CLR><SH><%> This function, used with either the FR or FS devices, "rewinds" a file to its beginning.

PEOF <CLR> < SH > < &> This function positions a file to its end in case you wish to add to it. DCC<CLR)<SH)<')This function will force a display of any character received that has a value less than an X'20' as a two digit hexadecimal number surrounded by braces. CLS <CLR)<SH)<()This function will erase the contents of the screen without transmitting any character to communications line. 8-BIT <CLR><SH><)> This function is ONLY used when the RS232 word length is set to 8. It makes certain that transmitted characters are valid. If it is not turned on, bit 7 is stripped from each character received. HANDSHAKE <CLR><SH><*> When you turn on the handshake function there are four control code options which LCOMM responds to when received from the CL: X'l 1' DC1 Resume transmission X'12' DC2 *FR ON X'l 3' DC3 Pause transmission X'14' DC4 *FR OFF

DC2 and DC4 function in exactly the same way as the PF keys for FR ON and FR OFF do. The DC3 control stops transmission through the CL until a DC 1 is received. DC3 can also be overridden by the *CL ON command as well. EXIT <CLR)<SH>< = > Easy. This function returns you to the LDOS command level.

DUPIX ECHO ECOLF ACCLF REW1JD PEOF DCC CLS 6 BIT HNDSH EXIT

"Kl 'DO "PR "CL 'FS TR DIFJ ID RFS OH OFF

Of course the middle row is for the number keys themselves, the bottom row for the "lower case" commands, and the top line for the <SHIFT>ed commands. You may call up this menu at any point without LCOMM losing any other data. It is only for your quick reference, and of course, each of these commands is clearly explained in the LCOMM section of the LDOS manual.

FILE TRANSFERRING

Please remember that files must be in ASCII to be transmitted.

It is very easy to receive (download) a file using LCOMM. First you must identify the file by using FR, then ID. As we mentioned above you will be prompted to enter the filespec but just doing that does NOT start the transmission of data. In orderto accomplish that you must do FR ON. Once yourfile is received, don't forget to do FR OFF and then FR RESET when you wish to close the file.

When you wish to send (upload) a file, the procedure is slightly different. You must perform FS-ID and enter the filename you wish to send. Then you must provide a 10 second pause. After this, you start to transmit by entering FS-ON. If both sending and receiving computers are in half duplex mode (DUPLEX-ON), you will see your file on your screen while it is transmitted. Always be certain that your entire file has been received on the other end before performing your FS-OFF.

That's all there is to it! You thought it was as complex and sinister as a Russian historical novel, but it's really quite simple, isn't it?

You will find the LCOMM section of the LDOS manual quite helpful and not difficult to read or understand.

In next month's column we will start a two-part discussion of the basic theory of Asyncronous Communication. Watch for it!

0 0

Post a comment