The following article was printed in issue 72, October 1982, of the magazine „Dr. Dobb's Journal of Computer & Orthodontia".
How to exchange data through a serial interface.

CP/M EXCHANGE

by Gene Head

Mail received after the first CP/M Exchange was encouraging. There is heavy interest in modem communication and program exchange. The most often asked question was, "How do I get started using my modem?" Well, it may be as simple as one, two three. I say may because each modem installation is different. If you have a basic understanding of the following three steps, you should be able to get signed-on to a Remote CP/M (RCP/M) system using the MBOOT3 program (listing begins on page 47).
  1. Modem Status
  2. Modem Input
  3. Modem Output

If you understand how the CP/M functions CONSOLE STATUS, CONSOLE INPUT and CONSOLE OUTPUT operate, you also understand how the modem should operate. (Note: CONSOLE routines use only seven bits of data and the MODEM routines must use all eight bits.) Don't be put off if you fail to understand how to get the CP/M CONSOLE functions to operate. You'll need special assistance to get your modem functional, but I have a plan for you too!

MBOOT3 is a simple, stripped-down, receive-only version of Ward Christensen's MODEM program. The idea is to get MBOOT3 operating and use it to download (receive) a full MODEM program from an RCP/M System. If you have a modem, the software to simulate a terminal and the ability to "capture" received data into a file, just log on to an RCP/M and command the remote computer to list the MBOOT3 file using the CP/M command TYPE. Otherwise, spend an hour or so and type in MBOOT3.
Customize the hardware-dependent equates, assemble, and load MBOOT3. Follow the instructions on the facing page, remembering that each RCP/M system may be slightly different. Use your head. Don't be discouraged. Try to get the SYStem OPerator's help by using the CHAT command, or try ringing his bell by typing control-G. You can't hurt the remote system, and every RCP/M I've ever used has been very forgiving of errors and even untimely disconnections.

Modem Hint # 1

You will probably need cooperation from someone with a modem to test your system out before making long-distance calls to RCP/M's. If you can't get that special help, consider this: colleges with computer departments usually have a modem telephone for remote users. Without an account number and/or password you can't do much but you can at least verify that the basic communication, modem-to-modem, is operating. Execute the MBOOT3 program as directed in the source listing and then access any modem line by telephone. Try a few carriage returns to get the remote system "talking" to your system. Words like FULL and HALF and HELP might get results. Check it out...

Special Assistance

Here is where the novice can be helped by the experienced modem user. If you have the MODEM program working on your system, send me a card with all the details about your specific hardware, the source listing of just the hardware-dependent equates and any unique hardware-dependent code, and how they are configured for your set-up.

Likewise, if you have the hardware but don't know exactly how to customize the software, send me a card with your specific hardware specifications. (Keep it simple!) I'll match your request with a known working system and send you the customization details. If I can't get an exact match, I'll send along the best data I have available. Be sure to enclose an SASE with your request. I'll do free photocopying (but no free postage) as long as this doesn't get too involved...

If you can offer help or need help, let the "CP/M Exchange" know! Be sure to include your disk format and complete modem configuration. Send your complete name, address, city, state, zip, and phone with area code.

Exchange Mail

The first response to the CP/M Exchange came from DDJ contributor Bob Blum. Bob suggested electronic mail for communication. If the interest is there, we might be able to compile a directory of those using this form of communication. I will make my RCP/M system available if there is serious interest. Anyone else have ideas along these lines? Bob is also preparing a contribution on keyboard buffering in a modified CCP for CP/M that will be included in a future "CP/M Exchange."

The most specific letter seeking help came from Charles Henderson of Midland, Texas. Charles is interested in why SPEED and FAST won't work with CP/M 2.x. He suspects the track buffering is involved but doesn't understand all the implications. A definitive article on track and sector skewing, interleaving, sector tables, etc. would be most appropriate. If you have a solid understanding of these principles, write a paper and send it in! Share with others what you have learned.

Dana Trout of Goleta, California, notes that CP/M Function #37 does not work as described in the manual. This function to reset the disk drives will reset all drives except the current default drive. If the current default drive is set to R/O and function thirty-seven is executed, the default drive is still in R/O! Anyone have a fix and/or explanation for this?

Roland Lupient, KB9RR, has ham radio gear, an Altair 8800 and CP/M User's Group volume 41. He would like to hear from anyone who can help interface the ham gear and computer (address: 1953 Graham Lane, Mosinee, WI 54455).

Finally, William Burnett of Sinton, Texas, wonders if there are any Superbrain users out there who have access to the CP/M User's Library? The same question can be asked about North Star, Osborne, and all the other five-inch formats. If you can copy the CP/M User's Library to any of the many five-inch disk formats, let me know. I suspect you will be in great demand, and while you may not make a lot of money at this, a couple of bucks copying fee seems reasonable.

That covers it for now. Every letter to the "CP/M Exchange" has received either a personal response or was noted in this column. If you have something to contribute, a question or comment, let's hear from you!

Downloading MODEM Using MBOOT3

First, execute MBOOT3 as instructed in the source listing (begins on page 47). It will sign on, but there will be no screen activity after the sign-on messages. In the TERMINAL mode, all displayed console characters corne from the remote system. Even keys from your keyboard are "echoed" back, so if there is no remote system to echo back the keystrokes, you won't see them on your CRT.

Now, call a remote CP/M System (see list on page 44), when you hear the remote modem carrier tone, connect your modem to the phone line. The two modems are now connected and your computer is "talking" to the remote computer. Press the Return key once a second until you see the remote computer's sign-on message, usually asking how many nulls you need. (Answer 0 to the nulls question if you're using a video terminal.)

Follow the host computer's instructions until you finally reach the CP/M operating level with the expected A>. You are now in control of the remote machine.

To find the MODEM program type:
     DIR MODEM *.*

This will show you the exact name of the MODEM files available. You should see in the listing the MODEM.ASM file or some similar source code file.

To receive the file type:
     XMODEM filename.type

The remote system should teil you that XMODEM is ready to send the requested file, then it will wait. There will be no further screen activity from the host computer. It will look as though you have lost control, but don't fret. The host is waiting for your MBOOT3 program to send special protocol characters to begin the transfer and won't respond to your keyboard characters until the transfer is completed or aborted.

Now that you know the host is ready to send and is waiting for you to be ready to receive, press your ESCape key. This key tells MBOOT3 to receive the file the host is sending.

Most CP/M commands are available to remote users, so use the remote system just as you would your local computer. Be sure to sign off by typing BYE and disconnect your modem from your phone line, if it isn't automatically disconnected by your software.

As with any new operation, practice and experience are the best teachers.
[8080 assembler listing, 8080 source and Z80 source]

Scanned by Werner Cirsovius
August 2002
© Dr. Dobb's Journal