HOST.DOC REMOTE ACCESS INTERFACE for CP/M 2.x computers. 10/11/89 Roy Lipscomb [] Transparent to most other programs. [] Needs no customization or reassembly for different brands of computer. [] For help, type HOST and press return. ***************************************************************************** * * * Copyright 1989, Logic Associates, 1433 W. Thome, Chicago, IL 60660 * * (312) 274-0531. (Contact us about our other packages for CP/M.) * * * * Permission is granted to distribute free copies of the HOST package. * * All other rights are reserved. * * * * HOST package includes-- * * * * HOST.ASM * * HOST.DOC * * HOST.COM * * HOSTTEST.SUB * * PASSWORD.ASM * * PASSWORD.DOC * * PASSWORD.COM * * 2CON.ASM * * * * (We are interested in your comments and suggestions about this program.) * * * ***************************************************************************** HOST is based on 2CON.ASM, an earlier dual-console program by the same author. =============================================================================== PURPOSE HOST allows for dual-console operation of your computer, through a serial or parallel link to a 2nd console. The 2nd console becomes an exact work-alike with the first, and may be a modem, a printer, a local video terminal, a computer emulating a video terminal, etc. In short, HOST makes your computer a bare-bones "remote access system." ------------------------------------------------------------------------------- REQUIREMENTS [] Any version of CP/M 2.x that implements the I/O byte at address 3H. (True of most CP/M 2.x systems.) [] Availability of all (and only) low-memory locations 8H through 37H for HOST's exclusive use. (True of most CP/M 2.x systems.) ------------------------------------------------------------------------------- FEATURES HOST is designed to be small, unobstrusive, and easy to use. [] Unlike most bulletin board programs, HOST does not need to be customized for each brand of computer. The reason is that HOST does not access external ports directly, but takes advantage of CP/M's ability to do so. Instead, HOST manipulates the I/O-byte that CP/M uses to remember where the console is. By flipping this byte, and duplicating each input/output operation, HOST makes CP/M operate with two consoles simultaneously, though CP/M thinks it's using only one. [] Unlike BYE, HOST does not diminish space usable by other programs. HOST loads itself into the interrupt-vector area in low memory, at addresses 8H through 37H. These locations are normally unused. (HOST does not interfere with DDT, ZSID, or other debugger.) [] Because it does not use program space, and leaves no "footprints" in CP/M, once HOST is loaded successfully it is totally transparent to most other programs. The only known exception are programs that directly access the same port that has been attached to HOST. Modem communications programs are of this type. (See "PROBLEMS AND REMEDIES," below.) ------------------------------------------------------------------------------- LIMITATIONS [] Some CP/M implementations do not implement all four possible devices properly. In such systems, attaching a wrong device (or executing "HOST AUTO") may hang your system. This will be due to CP/M's receiving a false "character ready for input" signal, which causes CP/M to futilely sit and wait for a character that never arrives. (If such a defect is present in your system, it will show itself during your initial use of HOST. See "INSTRUCTIONS" below.) [] It is conceivable (though unlikely) that your system does not implement your serial device as a possible console device. If this is the case, none of the HOST options will succeed in linking to the remote console. [] HOST will not switch baud rates or perform any other configuration of your serial port. [] HOST does not support binary-file transfers. To circumvent this limitation, see the "PROBLEMS AND REMEDIES" section, below. ------------------------------------------------------------------------------- INSTRUCTIONS FOR HOST.COM [] The following approach will help discover which device to attach: a. Establish a successful link to the remote console with any communications program. b. Exit the communications program without disconnecting the connection to the remote console. c. While the user at the remote console repeatedly presses the return key, execute one of the HOST options. The HOST options are listed in the next section. (If you have already tried all the HOST options, quit: Host will not work on your system. Try 2CON.AQM, its predecessor.) d. If the system hangs: Press reset and go to step "a" above. e. If you do not see carriage returns echoed from the remote console: Type HOST OFF and go to step "c" above. f. If the successful option was HOST AUTO, make a note of the device listed as "Remote" on the second line of the HOST display. This is the device you should "attach" when you execute HOST in the future. [] Options for using HOST are displayed by typing the word HOST, then pressing the return key. The following message will be displayed: ------------------------------------------------------------ | HOST Copyright 1989 Logic Associates, Chicago | | Active consoles: Local = --- Remote = --- | | | | HOST makes your system accessible to a remote terminal, | | by "attaching" one of the four console devices of CP/M. | | | | OPTION: ACTION: | | --------- ---------------------------------------- | | HOST Show attached consoles and help screen. | | HOST TTY Attach the "Teletype" device. | | HOST CRT Attach the "Video" device. | | HOST BAT Attach the "Batch" device. | | HOST UC1 Attach the "User Console 1" device. | | HOST AUTO Attach first device that sends a char. | | HOST OFF Remove HOST. | | | | Notes: 1. HOST will not configure the serial port. | | 2. If attaching a wrong device hangs your | | system: Press reset, reinitialize the | | port, and try a different device. | | 3. Designed for any CP/M 2.x system that-- | | a. Implements the I/O byte feature, and | | b. Does not use low memory, 8H to 37H. | | | ------------------------------------------------------------ NOTE: The alternate console-devices are the same ones listed by STAT.COM, a utility program distributed as part of CP/M. To see the list, type-- STAT VAL: For further information about STAT, consult your CP/M manual. [] HOST does not initialize or reconfigure ports. If you need to initialize a serial port that will be used by HOST, this should be done by other software. The serial port may be initialized at any time, whether or not HOST is active. For instance, you might use the following procedure: a. Run MDM740 (or MEX, IMP, etc.). b. Set the desired baud rate and other port parameters. c. Exit from MDM740 (or MEX, IMP, etc.). d. Run HOST. All this may be accomplished easily via a batch job, if desired. [] Run HOSTTEST.SUB to see the results of invoking various HOST options, both valid and invalid. (Be sure SUBMIT.COM is on the default drive.) Use the following command: SUBMIT HOSTTEST local remote where "local" is the local device appropriate to your system, and "remote" is the remote device appropriate to your system. ------------------------------------------------------------------------------- INSTRUCTIONS FOR PASSWORD.COM PASSWORD.COM provides an elementary level of security for a system that uses HOST to make itself available by modem to remote callers. PASSWORD allows you to set a password that the remote caller must provide in order to gain access to CP/M. If the caller makes three failed attempts to enter the password, the keyboard will lock, and the only way to return to CP/M is to press reset. This safeguards against an unauthorized caller who attempts to use his computer to call your system and to try all possible passwords. Such a person would get no more than three attempts per night. For more details on use of PASSWORD, see PASSWORD.DOC, or type-- PASSWORD on the CP/M command line. ------------------------------------------------------------------------------- PROBLEMS AND REMEDIES [] HOST does not support binary-file transfers. Attempting to use XMODEM, ZMD, or other file transfer program while HOST is active will most likely be unsuccessful. The reason is that HOST and the modem program will be in contention for use of the same port, and it is possible that each program will get only some of the characters it expects. To perform such a transfer, create a batch file that-- a. Executes-- HOST OFF (This will not affect the modem carrier-signal.) b. Executes XMODEM or other file transfer program. c. Executes--- HOST dev where "dev" is the name of the device originally in use. [] If the remote console drops characters when HOST is active, set the serial ports on the two consoles to a lower baud rate. You need not exit from HOST to reset the baud rate. [] Cursor control may not operate correctly from the 2nd console. This depends on the cursor-control protocol of the 2nd console and (if it's a computer) its terminal-emulation program. In terminal-emulation mode, some modem programs filter out received control codes instead of sending them to the console. [] The system may drop characters or exhibit other anomolies if you execute a communications program (MODEM740, MEX, IMP, etc) or a file transfer program (XMODEM, ZMD, etc) on the local sytem while HOST is active. For file transfers, refer to the "LIMITATIONS" section above. ------------------------------------------------------------------------------- MESSAGES: Successful result. ----------------------------- --> dev ATTACHED as remote console. <-- Successful attachment of device named "dev." --> dev DETACHED; HOST removed. <-- Successful completion of "OFF" option, and detachement of "dev". ------------------------------------------------------------------------------- MESSAGES: Unsuccessful result. ------------------------------- --> No action: dev device already active. <-- Attempt to attach local console as the remote. --> No action: HOST already active. <-- Attempt to execute HOST though already active. --> No action: HOST not active. <-- User requested HOST OFF though HOST not active. --> No action: Invalid option. <-- Option not recognized. --> WAITING for input from any device... <-- AUTO option requested. Device that sends next character will be used as remote HOST device. -->ABORTED: Character was from local console.<-- The user aborted HOST during its WAITING mode by pressing a key on the local console. --------------------------------------------------------------------------[end]