home *** CD-ROM | disk | FTP | other *** search
- (*============== **** PMODEM.DOC **** =================*
- * *
- * Modem utility vers. 1.1b *
- * Written by Phillip Hansford, October 1984, *
- * revised 11/9/86, 2/22/87. *
- * *
- * This program works with a modem to conveniently access *
- * remote computers and modems. It includes a host mode *
- * to answer incomming calls. Provision for automatic *
- * logon is also included. The program is written in *
- * Turbo Pascal 3.0 for CP/M-80 (Z-80) and uses the *
- * ROS.MCH and ROS.MDM drivers (include files from the *
- * ROS bbs program) to match the specific modem and *
- * computer. *
- * *
- * ==> This program is free. It may be used for any *
- * purpose. However, the distribution of this program is *
- * restricted to free remote computer systems and free *
- * non-commercial means. This program is not to be sold, *
- * nor may charges of any kind be made for its *
- * distribution without permission from author. *
- *--------------------------------------------------------*)
-
- Although this program is released as vers. 1.1b,
- it should be considered experimental.
-
- PMODEM is supplied in source code. To run it on
- your computer the program should be configured for your
- system and then compiled with a Turbo Pascal compiler
- which was installed for your computer. If you compile
- PMODEM without first configuring it for your system it
- probably won't work; you'll get the menus but won't be
- able to communicate with the modem. (A compiled version
- of PMODEM has been included with this release for a
- Kaypro II computer and an ADC modem, although you should
- re-compile it to utilize your own phone directory.)
-
- The original version of this program was
- developed and released in 1984 as an extension of my
- PBOOT.PAS program. It has been in continuous use since
- then, and I have gradually implemented a number of
- changes. However, this is the first official release of
- the revised program.
-
- The package contains the following files:
-
- Source code files --
-
- PMODEM.PAS {list of include files}
-
- EQUATES.INC {constants & initial values}
- I/O.INC {modem port drivers}
- OPEN.INC {disk access}
- TERMINAL.INC {terminal mode section}
- DIAL.INC {auto dial section}
- DIRECTRY.INC {custom phone directory}
- SEND.INC {send file}
- RECEIVE.INC {receive file}
- ASCII.INC {ASCII file section}
- HOST.INC {host mode section}
- DEFAULT.INC {defaults menu section}
- MAIN.INC {main program & menu}
-
- PMODEM.COM {compiled for a Kaypro II and
- ADC modem}
-
- doc file --
-
- PMODEM.DOC {this documentation}
-
- As you can see, there is a main file (PMODEM.PAS) and a
- number of include (.INC) files which are combined by
- Turbo Pascal at compilation. The resulting .COM file
- stands alone, requiring no other files to run. Since the
- entire program is memory resident, disks may be removed
- or changed once the .COM file is loaded. For the same
- reason, PMODEM operation is very fast with negligible
- delay between menues.
-
- THE CARRIER FUNCTION
-
- Basicly, the modem operates in one of two
- states -- 1) the command state in which you may enter
- commands directly to the modem (via terminal mode),
- and; 2) the data state, in which the modem is in
- communication with another modem. Most commands to the
- modem during data state are ignored (they're actually
- passed as data!). PMODEM can tell which state the modem
- is in by checking the modem's carrier status bit. The
- carrier function does this and returns a boolean true
- if the carrier is present (signifies data state).
- The carrier function is used throughout the
- program. It is used by the auto dialing routine to
- determine if the connection has been made (and therefor
- pass automatically to terminal mode). It's also used in
- the host mode to signal when a call is received. And
- even the main menu uses the carrier function to display
- the appropriate menu selections.
-
- RUNNING PMODEM
-
- On start up from CP/M prompt the program checks
- for a command tail (as '/CB' for example), so could be
- begun with a submit, alias, synonym, or autoboot. Normal
- start up of the program skips the main menu and enters
- the phone directory (CALL mode). Any number from the
- directory may be auto dialed by specifying its letter.
- Default operation is 1200 baud. (You 2400 baud people
- will want to change that, as well as the baud rate
- select in the DEFAULTS menu.) Certain phone numbers in
- the directory (designated with a tilde (~)) auto change
- baud rate to 300 baud; the baud rate is reset to
- original value on exit from call mode. Auto logon is
- designated in the directory with an '@' character. Once
- you have auto logon set up for a given number the
- program can call the number and sign on for you all by
- itself. (This can be handy. For example, I use a
- synonym --'LIT', which loads the CP/M command line
- 'PMODEM /CF'-- to startup PMODEM, call, and logon my
- favorite RCP/M.) Phone numbers may also be dialed by
- inputing the number instead of directory choice. A <RET>
- will exit to the main menue. If the number is not
- reached it may be dialed again ('Y' option) or redialed
- every three minutes ('R' option). A ^X exits R. Hit
- any key to interrupt wait. The last number dialed is
- stored in a buffer and may be redialed from CALL mode at
- any time by entering a space <RET>.
-
- THE MAIN MENU
-
- The main menu is the heart of the program and is
- the main program loop. There are actually two modes
- for the main menu -- 'carrier' and 'no carrier' which
- reflect the carrier present status bit of
- the modem and restrict menue choices to logical ones.
- The menu 'knows' if you are connected to a remote
- computer and will not permit you to call out until you
- are disconnected. Similarly, file transfers are not
- permitted if you are not connected to a remote computer
- etc. Actually, the case statement does permit these
- 'wrong' choices if you know what they are (for test
- purposes).
-
- Main Menu (no carrier)
-
- This menu mode shows the following choices:
-
- (C)all (H)ost mode
- (T)erminal mode (D)efaults
- (W)ait (Q)uit.
-
- The choice is selected by entering the letter
- shown in parenthesis (upper or lower case). CALL was
- already discussed. TERMINAL mode is automatically
- entered when a CALL is successful, or it can be entered
- directly from the MAIN MENUE. TERMINAL mode connects the
- computer and keyboard to the modem. Keyboard echoe,
- auto line feed, and upper case are auto engaged in
- TERMINAL mode (if no carrier). Standard modem commands
- ('AT' etc.) may be sent to the modem if there is no
- carrier. Carrier or no carrier is indicated on title
- line when terminal mode is entered. Special conrol codes
- operate within the TERMINAL mode. They are ^E to return
- to the main menue, and ^P to toggle the printer on or
- off. (The printer toggle from the TERMINAL mode is not
- buffered, so if data runs ahead of printer, you will
- need to do a ^S for most remote systems.) All other
- functions must be performed through the main menue. Note
- that these two control codes are not sent to the modem.
- All other control codes go to the modem. Certain default
- settings will apply to the TERMINAL mode. These can be
- changed by exiting to the MAIN MENUE, entering DEFAULTS
- mode for the changes, then returning to the MAIN MENUE
- and TERMINAL mode. Note that all incoming modem
- characters are normally filtered to remove control codes
- (except CR, LF, Backspace, Tab, Bell, and Null). The
- filter actually converts other control codes to Null.
- This is to prevent remote sent control codes or phone
- line noise from doing strange things to your screen or
- printer. The filter may be switched off in the DEFAULTS
- section.
- WAIT may be used to signal a designated number
- of minutes.
- HOST mode permits the modem to answer incoming
- calls (all other modes ignore incoming calls). It is
- presently set for 4 rings. The use of a password is
- optional at entry. The password is preset within the
- source (presently 'FOOBAR'). Operation of this section
- may be tested with a ^T. This section could be expanded
- into a full remote BBS.
- DEFAULTS mode is used to inspect or change baud
- rate and other default parameters. Parameters are
- numbered. To change a parameter, type its number and the
- parameter will 'toggle' to the other values. Capture
- mode is not provided in the present program version
- despite its inclusion in the DEFAULTS.
- Use '(Q)uit' to exit the modem program back to
- CP/M. Make sure your disk is in the default drive.
-
- Main Menu (carrier)
-
- This menu mode shows the following choices:
-
- (T)erminal mode (W)ait
- (S)end a file (XMODEM) (D) Defaults
- (SA) ASCII text (X) Disconnect
- (R)eceive a file (XMODEM) (Q)uit.
- (RC) checksum (RX) CRC
-
- TERMINAL mode, WAIT, DEFAULTS, and QUIT were
- discussed above. SEND a file and RECEIVE a file are used
- for XMODEM type file transfers with the host computer.
- They are entered from the TERMINAL mode through the
- menue at the time transfer is desired. SEND a file will
- upload a file to the host computer. RECEIVE a file will
- download a file from the host computer. 'R' or 'RX' is
- CRC protocol. 'RC' is checksum. 'SA' enables you to
- upload an ASCII text file (useful for entering
- prewritten messages). 'S' or 'R' will prompt for name of
- file to be sent or received. You can also specify the
- drive ('B:FILENAME' for example). These functions reset
- the disks, so swaping of disks is allowed. SEND checks
- to be sure file name exists. RECEIVE checks to be sure
- file name does not exist on the disk. Exit from SEND or
- RECEIVE a file returns to TERMINAL mode. A ^X may be
- used to abort the transfer. Errors in transfer are shown
- with a '.' (period), as the protocol resends the data; a
- long line of dots probably means the transfer should be
- aborted.
- (X) DISCONNECT mode is intended to disconnect
- the modem. This is automatically executed on QUIT from
- carrier menu.
-
- INSTALLATION
-
- To install PMODEM on your computer you will need
- to modify the source code before compiling.
- The modem driver routines are the ones used by
- the ROS 3.4 bulletin board program. You can select or
- modify these routines to match your system...
- You will want to customize the phone directory
- (DIRECTRY.INC), since it compiles into the program; and
- change the Host mode title line and password
- (HOST.INC). Some modems may require tweaking in the
- phone directory and auto dialing sections to get things
- working properly. The default is set up for pulse
- dialing and you may want to change that to touch tone
- (auto dialing or defaults section).
-
- CRT RESET (MODEM1.INC)
-
- There is a procedure designed to reset the
- Heath/Zenith CRT. The procedure is called 'resetCRT'.
- It clears the screen AND resets all startup values for
- the CRT. If you do not use a Heathkit or Zenith
- screen, you should change the procedure to match your
- equipment; or if you prefer to simply clear the screen
- instead, replace the 'write(ESC, 'z')' and 'delay(...'
- lines with 'clrScr;'.
-
- DISK DRIVES (MODEM2.INC)
-
- The CCS S-100 controller is able to shut off
- the motor for 5 inch drives when disk access is not
- required. The 8 inch drives are unaffected. Provision
- for this on a CCS controller is within the procedures
- 'timein' and 'timeout' under 'disk utilities' in
- MODEM2.INC. These procedures output to port 34 hex. If
- you do not use this controller and that port is unused
- on your computer these procedures will have no effect.
- If you wish to remove them the easiest thing would be
- to delete the line 'port[$34]:=...' but leave the
- remainder.
-
- PRELIMINARY TEST
-
- Once everything is set you should be able to
- compile PMODEM.PAS and run a prelimianary test.
- Running the compiled program should initialize your
- modem. It should be onhook and ignore incomeing calls.
- When the program starts, it enters the phone directory.
- Do a <RET> to get to the main menu, then select terminal
- mode. Echoe is auto engaged, auto upper case. Now modem
- commands should be accepted and acknowledged. For
- example, 'AT' <RET> should answer 'OK' (if your modem is
- Hayes compatible). The next step is to return to the
- main menu and try out the other functions. It is
- important that the program can read the modem carrier
- status; otherwise it will not function properly.
-
- ==> Updates of this program will follow from time
- to time.
-
- ========
- Phillip Hansford, 2/22/87
- THE OUTPOST ROS - ROS #38
- (818) 353-8891 (modem)
- P.O. Box 83
- Tujunga, CA 91042