home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / TURBOPAS / PMODEM.ARK / PMODEM.DOC < prev    next >
Text File  |  1987-02-22  |  13KB  |  300 lines

  1. (*==============  **** PMODEM.DOC ****    =================*
  2. *                             *
  3. *        Modem utility vers. 1.1b         *
  4. * Written by Phillip Hansford, October 1984,         *
  5. * revised 11/9/86, 2/22/87.                 *
  6. *                             *
  7. * This program works with a modem to conveniently access *
  8. * remote computers and modems. It includes a host mode     *
  9. * to answer incomming calls. Provision for automatic     *
  10. * logon is also included. The program is written in     *
  11. * Turbo Pascal 3.0 for CP/M-80 (Z-80) and uses the     *
  12. * ROS.MCH and ROS.MDM drivers (include files from the     *
  13. * ROS bbs program) to match the specific modem and     *
  14. * computer.                         *
  15. *                             *
  16. * ==> This program is free. It may be used for any     *
  17. * purpose. However, the distribution of this program is  *
  18. * restricted to free remote computer systems and free     *
  19. * non-commercial means. This program is not to be sold,  *
  20. * nor may charges of any kind be made for its         *
  21. * distribution without permission from author.         *
  22. *--------------------------------------------------------*)
  23.  
  24.     Although this program is released as vers. 1.1b,
  25. it should be considered experimental.
  26.  
  27.     PMODEM is supplied in source code. To run it on
  28. your computer the program should be configured for your
  29. system and then compiled with a Turbo Pascal compiler
  30. which was installed for your computer. If you compile
  31. PMODEM without first configuring it for your system it
  32. probably won't work; you'll get the menus but won't be
  33. able to communicate with the modem. (A compiled version
  34. of PMODEM has been included with this release for a
  35. Kaypro II computer and an ADC modem, although you should
  36. re-compile it to utilize your own phone directory.)
  37.  
  38.     The original version of this program was
  39. developed and released in 1984 as an extension of my
  40. PBOOT.PAS program. It has been in continuous use since
  41. then, and I have gradually implemented a number of
  42. changes. However, this is the first official release of
  43. the revised program. 
  44.  
  45. The package contains the following files:
  46.  
  47. Source code files --
  48.  
  49.     PMODEM.PAS    {list of include files}
  50.  
  51.     EQUATES.INC    {constants & initial values}
  52.     I/O.INC     {modem port drivers}
  53.     OPEN.INC    {disk access}
  54.     TERMINAL.INC    {terminal mode section}
  55.     DIAL.INC    {auto dial section}
  56.     DIRECTRY.INC    {custom phone directory}
  57.     SEND.INC    {send file}
  58.     RECEIVE.INC    {receive file}
  59.     ASCII.INC    {ASCII file section}
  60.     HOST.INC    {host mode section}
  61.     DEFAULT.INC    {defaults menu section}
  62.     MAIN.INC    {main program & menu}
  63.  
  64.     PMODEM.COM    {compiled for a Kaypro II and
  65.                ADC modem}
  66.  
  67. doc file --
  68.  
  69.     PMODEM.DOC    {this documentation}
  70.  
  71. As you can see, there is a main file (PMODEM.PAS) and a
  72. number of include (.INC) files which are combined by
  73. Turbo Pascal at compilation. The resulting .COM file
  74. stands alone, requiring no other files to run. Since the
  75. entire program is memory resident, disks may be removed
  76. or changed once the .COM file is loaded. For the same
  77. reason, PMODEM operation is very fast with negligible
  78. delay between menues.
  79.  
  80. THE CARRIER FUNCTION
  81.  
  82.     Basicly, the modem operates in one of two
  83. states -- 1) the command state in which you may enter
  84. commands directly to the modem (via terminal mode),
  85. and; 2) the data state, in which the modem is in
  86. communication with another modem. Most commands to the
  87. modem during data state are ignored (they're actually
  88. passed as data!). PMODEM can tell which state the modem
  89. is in by checking the modem's carrier status bit. The
  90. carrier function does this and returns a boolean true
  91. if the carrier is present (signifies data state).
  92.     The carrier function is used throughout the
  93. program. It is used by the auto dialing routine to
  94. determine if the connection has been made (and therefor
  95. pass automatically to terminal mode). It's also used in
  96. the host mode to signal when a call is received. And
  97. even the main menu uses the carrier function to display
  98. the appropriate menu selections.
  99.  
  100. RUNNING PMODEM
  101.  
  102.     On start up from CP/M prompt the program checks
  103. for a command tail (as '/CB' for example), so could be
  104. begun with a submit, alias, synonym, or autoboot. Normal
  105. start up of the program skips the main menu and enters
  106. the phone directory (CALL mode). Any number from the
  107. directory may be auto dialed by specifying its letter.
  108. Default operation is 1200 baud. (You 2400 baud people
  109. will want to change that, as well as the baud rate
  110. select in the DEFAULTS menu.) Certain phone numbers in
  111. the directory (designated with a tilde (~)) auto change
  112. baud rate to 300 baud; the baud rate is reset to
  113. original value on exit from call mode. Auto logon is
  114. designated in the directory with an '@' character. Once
  115. you have auto logon set up for a given number the
  116. program can call the number and sign on for you all by
  117. itself. (This can be handy. For example, I use a
  118. synonym --'LIT', which loads the CP/M command line
  119. 'PMODEM /CF'-- to startup PMODEM, call, and logon my
  120. favorite RCP/M.) Phone numbers may also be dialed by
  121. inputing the number instead of directory choice. A <RET>
  122. will exit to the main menue. If the number is not
  123. reached it may be dialed again ('Y' option) or redialed
  124. every three minutes ('R' option). A ^X exits R.  Hit
  125. any key to interrupt wait. The last number dialed is
  126. stored in a buffer and may be redialed from CALL mode at
  127. any time by entering a space <RET>. 
  128.  
  129. THE MAIN MENU
  130.  
  131.     The main menu is the heart of the program and is
  132. the main program loop. There are actually two modes
  133. for the main menu -- 'carrier' and 'no carrier' which
  134. reflect the carrier present status bit of
  135. the modem and restrict menue choices to logical ones.
  136. The menu 'knows' if you are connected to a remote
  137. computer and will not permit you to call out until you
  138. are disconnected. Similarly, file transfers are not
  139. permitted if you are not connected to a remote computer
  140. etc. Actually, the case statement does permit these
  141. 'wrong' choices if you know what they are (for test
  142. purposes).
  143.  
  144. Main Menu (no carrier)
  145.  
  146.     This menu mode shows the following choices:
  147.  
  148. (C)all            (H)ost mode
  149. (T)erminal mode     (D)efaults
  150. (W)ait            (Q)uit.
  151.  
  152.     The choice is selected by entering the letter
  153. shown in parenthesis (upper or lower case). CALL was
  154. already discussed. TERMINAL mode is automatically
  155. entered when a CALL is successful, or it can be entered
  156. directly from the MAIN MENUE. TERMINAL mode connects the
  157. computer and keyboard to the modem. Keyboard echoe,
  158. auto line feed, and upper case are auto engaged in
  159. TERMINAL mode (if no carrier). Standard modem commands
  160. ('AT' etc.) may be sent to the modem if there is no
  161. carrier. Carrier or no carrier is indicated on title
  162. line when terminal mode is entered. Special conrol codes
  163. operate within the TERMINAL mode. They are ^E to return
  164. to the main menue, and ^P to toggle the printer on or
  165. off. (The printer toggle from the TERMINAL mode is not
  166. buffered, so if data runs ahead of printer, you will
  167. need to do a ^S for most remote systems.) All other
  168. functions must be performed through the main menue. Note
  169. that these two control codes are not sent to the modem.
  170. All other control codes go to the modem. Certain default
  171. settings will apply to the TERMINAL mode. These can be
  172. changed by exiting to the MAIN MENUE, entering DEFAULTS
  173. mode for the changes, then returning to the MAIN MENUE
  174. and TERMINAL mode. Note that all incoming modem
  175. characters are normally filtered to remove control codes
  176. (except CR, LF, Backspace, Tab, Bell, and Null). The
  177. filter actually converts other control codes to Null.
  178. This is to prevent remote sent control codes or phone
  179. line noise from doing strange things to your screen or
  180. printer. The filter may be switched off in the DEFAULTS
  181. section.
  182.     WAIT may be used to signal a designated number
  183. of minutes.
  184.     HOST mode permits the modem to answer incoming
  185. calls (all other modes ignore incoming calls). It is
  186. presently set for 4 rings. The use of a password is
  187. optional at entry. The password is preset within the
  188. source (presently 'FOOBAR'). Operation of this section
  189. may be tested with a ^T. This section could be expanded
  190. into a full remote BBS.
  191.     DEFAULTS mode is used to inspect or change baud
  192. rate and other default parameters. Parameters are
  193. numbered. To change a parameter, type its number and the
  194. parameter will 'toggle' to the other values. Capture
  195. mode is not provided in the present program version
  196. despite its inclusion in the DEFAULTS.
  197.     Use '(Q)uit' to exit the modem program back to
  198. CP/M. Make sure your disk is in the default drive.
  199.  
  200. Main Menu (carrier)
  201.  
  202.     This menu mode shows the following choices:
  203.  
  204. (T)erminal mode         (W)ait
  205. (S)end a file (XMODEM)        (D) Defaults
  206.    (SA) ASCII text        (X) Disconnect
  207. (R)eceive a file (XMODEM)   (Q)uit.
  208.    (RC) checksum (RX) CRC
  209.  
  210.     TERMINAL mode, WAIT, DEFAULTS, and QUIT were
  211. discussed above. SEND a file and RECEIVE a file are used
  212. for XMODEM type file transfers with the host computer.
  213. They are entered from the TERMINAL mode through the
  214. menue at the time transfer is desired. SEND a file will
  215. upload a file to the host computer. RECEIVE a file will
  216. download a file from the host computer. 'R' or 'RX' is
  217. CRC protocol. 'RC' is checksum. 'SA' enables you to
  218. upload an ASCII text file (useful for entering
  219. prewritten messages). 'S' or 'R' will prompt for name of
  220. file to be sent or received. You can also specify the
  221. drive ('B:FILENAME' for example). These functions reset
  222. the disks, so swaping of disks is allowed. SEND checks
  223. to be sure file name exists. RECEIVE checks to be sure
  224. file name does not exist on the disk. Exit from SEND or
  225. RECEIVE a file returns to TERMINAL mode. A ^X may be
  226. used to abort the transfer. Errors in transfer are shown
  227. with a '.' (period), as the protocol resends the data; a
  228. long line of dots probably means the transfer should be
  229. aborted. 
  230.     (X) DISCONNECT mode is intended to disconnect
  231. the modem. This is automatically executed on QUIT from
  232. carrier menu. 
  233.  
  234. INSTALLATION
  235.  
  236.     To install PMODEM on your computer you will need
  237. to modify the source code before compiling.
  238.     The modem driver routines are the ones used by
  239. the ROS 3.4 bulletin board program. You can select or
  240. modify these routines to match your system...
  241. You will want to customize the phone directory
  242. (DIRECTRY.INC), since it compiles into the program; and
  243. change the Host mode title line and password
  244. (HOST.INC). Some modems may require tweaking in the
  245. phone directory and auto dialing sections to get things
  246. working properly. The default is set up for pulse
  247. dialing and you may want to change that to touch tone
  248. (auto dialing or defaults section).
  249.  
  250. CRT RESET (MODEM1.INC)
  251.  
  252.     There is a procedure designed to reset the
  253. Heath/Zenith CRT. The procedure is called 'resetCRT'.
  254. It clears the screen AND resets all startup values for
  255. the CRT. If you do not use a Heathkit or Zenith
  256. screen, you should change the procedure to match your
  257. equipment; or if you prefer to simply clear the screen
  258. instead, replace the 'write(ESC, 'z')' and 'delay(...'
  259. lines with 'clrScr;'. 
  260.  
  261. DISK DRIVES (MODEM2.INC)
  262.  
  263.     The CCS S-100 controller is able to shut off
  264. the motor for 5 inch drives when disk access is not
  265. required. The 8 inch drives are unaffected. Provision
  266. for this on a CCS controller is within the procedures
  267. 'timein' and 'timeout' under 'disk utilities' in
  268. MODEM2.INC. These procedures output to port 34 hex. If
  269. you do not use this controller and that port is unused
  270. on your computer these procedures will have no effect.
  271. If you wish to remove them the easiest thing would be
  272. to delete the line 'port[$34]:=...' but leave the
  273. remainder.
  274.  
  275. PRELIMINARY TEST
  276.  
  277.     Once everything is set you should be able to
  278. compile PMODEM.PAS and run a prelimianary test.
  279. Running the compiled program should initialize your
  280. modem. It should be onhook and ignore incomeing calls.
  281. When the program starts, it enters the phone directory.
  282. Do a <RET> to get to the main menu, then select terminal
  283. mode. Echoe is auto engaged, auto upper case. Now modem
  284. commands should be accepted and acknowledged. For
  285. example, 'AT' <RET> should answer 'OK' (if your modem is
  286. Hayes compatible). The next step is to return to the
  287. main menu and try out the other functions. It is
  288. important that the program can read the modem carrier
  289. status; otherwise it will not function properly.
  290.  
  291.     ==> Updates of this program will follow from time
  292. to time.
  293.  
  294. ========
  295. Phillip Hansford, 2/22/87
  296. THE OUTPOST ROS - ROS #38
  297. (818) 353-8891 (modem)
  298. P.O. Box 83
  299. Tujunga, CA 91042
  300.