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 / SIMTEL / CPMUG / CPMUG084.ARK / MODEM7.DOC < prev    next >
Text File  |  1984-04-29  |  15KB  |  328 lines

  1.               CP/M MODEM PROGRAM DOCUMENTATION
  2.         by Mark M. Zeiger and James K. Mills
  3.               11/04/80
  4.  
  5. This  program  uses  the  file transfer routines  written  by  Ward 
  6. Christensen  in his CP/M file transfer program (V2.0 as of  8/6/79) 
  7. and  is  compatable with his program in single file transfer  mode. 
  8. Multi-file transfers are only possible between two systems  running 
  9. the program described below.
  10.  
  11. This program has three functions:
  12.  
  13.         1.  Communication
  14.         2.  Program transfer
  15.         3.  Modem control (for PMMI Modem)
  16.  
  17.  
  18. COMMUNICATIONS
  19.  
  20. The program may emulate a terminal or echo data back to sender (act
  21. as a computer).
  22.  
  23. Terminal Mode  -  'T' Option
  24.  
  25.         The  terminal mode may be called with or without a file  name. 
  26.         If  a  file  is  specified (it should be  a  new  file),  then 
  27.         anything  received  by the modem may be saved  in  memory  and 
  28.         later  written on disk.  The save feature is toggled ON/OFF by 
  29.         Control-Y.  On  an IMSAI the front panel LEDs  will  indicated 
  30.         that  memory save is toggled on by showing the binary value of 
  31.         the ASCII character received. For those with no front panel, a 
  32.         colon  (:) will be printed at the beginning of each line  when 
  33.         memory save is active.  The colon will not be transmitted over 
  34.         the modem nor will it be saved in memory.
  35.  
  36.         If  a  file  is not specified,  then memory save  can  not  be 
  37.         activated.
  38.  
  39.         If  the memory buffer is full (the buffer is from the  top  of 
  40.         the  program  to  the  bottom  of  BDOS),   the  contents  are 
  41.         automatically  written  to  disk  (but the  file  is  not  yet 
  42.         closed).  Communications  may  then continue with  the  buffer 
  43.         reinitialized.  The  computer with which you are communicating 
  44.         must  accept  the  X-ON and X-OFF  (Control-Q  and  Control-S) 
  45.         conventions or data will be lost.
  46.  
  47.         When  communications are over,  use Control-E to exit from the 
  48.         Terminal  mode and enter the Menu.  The file to which you  are 
  49.         writing  must then be closed by using the  'WRT'  command.  If 
  50.         this  is  not done,  all data will be lost.  I decided not  to 
  51.         close  the file automatically since there will be  times  when 
  52.         you leave terminal mode and then decide to re-enter.  This may 
  53.         be done while in the Menu by using the 'RET' command.  You may 
  54.         re-enter Terminal mode and save in the same file as many times 
  55.         as  you wish as long as you have not closed the file with  the 
  56.         'WRT' command.
  57.  
  58.         While  in  Terminal  mode,  Control-T will  put  you  in  File 
  59.         Transfer mode.  This will allow you to send the contents of an 
  60.         ASCII file over the modem. This routine does no error checking 
  61.         and  there are no protocols specified between this program and 
  62.         the  receiving computer other than that it should be ready  to 
  63.         receive  data  via  the  modem.   Control-X  will  cancel  the 
  64.         transfer.
  65.  
  66.  
  67. Computer mode - 'E' Option
  68.  
  69.         This  mode  echos data received by other  computer.  Only  one 
  70.         computer  may be in this mode at one time.  There is  no  save 
  71.         feature  in this mode.  Useful if you wish to communicate with 
  72.         somebody running the terminal portion of the program.
  73.  
  74. File transfer - 'S' and 'R' Options
  75.  
  76.         These  features  are  the same as in the  CP/M  Modem  program 
  77.         written by Ward Christensen except that upon completion of the 
  78.         transfer, control returns to the Menu unless the secondary 'T' 
  79.         option has been selected.  In the latter case, control returns 
  80.         to Terminal mode.  Remember that if you are operating a remote 
  81.         computer   using   a  timesharing  program   (such   as   Ward 
  82.         Christensen's "BYE"),  the remote should be instructed to send 
  83.         or  receive  in  the  quiet (Q) mode as  a  secondary  option. 
  84.         Examples  of  commands for sending and  receiving  are  listed 
  85.         below.
  86.  
  87. Multi-file transfers
  88.  
  89.         Using  the B (batch) secondary option,  more than one file and 
  90.         ambiguous filenames may be transferred. To send files, use the 
  91.         primary  option  "S" and the secondary option "B" (along  with 
  92.         any  other  secondary options and baudrate).  To  receive  the 
  93.         files  being  sent,  use the "R" primary option  and  the  "B" 
  94.         secondary  option.  Files may not be named since filenames are 
  95.         sent by the sending program, but a disk drive may be specified 
  96.         (or else the files are written to the default drive).
  97.  
  98. Backup option
  99.  
  100.         There  is  a byte at the beginning of the program (106H)  that 
  101.         will  create a backup file if a file on the disk has the  same 
  102.         name  as the file being received in multi-file  transfer  (see 
  103.         MODEM.SET). If this byte is set to 0FFH, a backup file will be 
  104.         created.  If  it is zero the file on the disk will be  deleted 
  105.         before the new file is received. If you are running CP/M 2 and 
  106.         a file on the disk is designated R/O or SYS,  a backup will be 
  107.         created whether the byte at 106H is set or not.
  108.  
  109.         Be  careful - if you are running CP/M 1 and the drive on which 
  110.         you  are receiving has an R/O file with the same name  created 
  111.         by CP/M 2,  the R/O file can not be accessed (found,  changed, 
  112.         erased,  etc.)  by CP/M 1.  You will therefore have two  files 
  113.         with  the same name when you are running CP/M 2.  To fix  this 
  114.         problem, use CP/M 1 to change the name of the file that is not 
  115.         R/O. Then use CP/M 2 to do what you want with the R/O file.
  116.  
  117.         Examples:
  118.  
  119.         The  sender enters    SBOT.600 B:*.COM    to send all the  COM 
  120.         files on disk B.  Also specified were originate mode 600  baud 
  121.         (PMMI modem) and return to terminal mode when done.
  122.  
  123.         The  receiver enters     RBA.600    to receive all  the  files 
  124.         being  sent on the default drive (also answer mode at 600 baud 
  125.         for PMMI).
  126.  
  127.  
  128.         The sender enters the command   SB.600  ASM.COM  *.HEX  B:M*.*
  129.         which  will send ASM.COM from the default drive,  all the  HEX 
  130.         files from the default drive,  and all the files starting with 
  131.         "M" from the B drive.  [note that neither 'A' or 'O' were
  132.     specified: default is to whatever mode the PMMI is in
  133.     currently]
  134.  
  135.         Multifile transfers may only be done from the menu. It may not 
  136.         be specified when the MODEM program is called.  In other words    
  137.         A>MODEM  SAB  *.COM   will result in an INVALID  OPTION  error 
  138.         message.
  139.  
  140.  
  141. Return to Menu - 'M' option
  142.  
  143.         When asked to select an option, 'M' returns to Menu.
  144.  
  145. The MENU
  146.  
  147.         If  the Modem program is entered with no option,  the Menu  is 
  148.         called.  The  Menu gives the choice of selecting the  standard 
  149.         options as defined by Ward Christensen (T,  E,  R, and S). The 
  150.         Terminal  mode has been greatly expanded as  described  above. 
  151.         The "R" and "S" commands must be called with a filename or you 
  152.         will be required to enter the primary command (S or R) and the 
  153.         filename  again (but NOT the secondary options).  If you  want 
  154.         multi-file  transfers,  then  the "R" option does not  need  a 
  155.         filename.
  156.  
  157.   RET - You may also enter terminal mode using the 'RET' command,  but 
  158.         no  data  will  be saved since a file may not  be  named  with 
  159.         'RET'.  Use  the 'RET' command to RE-ENTER Terminal mode after 
  160.         it  has  first been entered with the 'T' option.  If  this  is 
  161.         done, you will still be able to save the communications if you 
  162.         were doing so before you exitted the terminal mode.
  163.  
  164.   WRT - The  'WRT' command must be used after leaving  Terminal  mode. 
  165.         This  writes  the  last buffer to disk and  closes  the  file. 
  166.         Failure  to use the 'WRT' command results in loss of all  data 
  167.         and a file of length zero.
  168.  
  169.   DEL - The  'DEL'  command  erases the most recent file  accessed  in 
  170.         Terminal mode.  Useful if you decide after communications that 
  171.         you don't want to save information just gathered.
  172.  
  173.   CPM - The 'CPM' command reboots and returns to CP/M.
  174.  
  175.   XPR - The  'XPR'  command is a toggle which causes the  menu  to  be 
  176.         printed  or not printed.  Initially the menu is on unless  the 
  177.         program is called with the "X" option (ie.  A>MODEM X ).
  178.  
  179.   DIR - The 'DIR' command lists the directory of a CP/M disk.  A drive 
  180.         may  be specified (ie.  DIR B:) or the default drive  will  be 
  181.         listed.  After  the directory is listed,  the menu will not be 
  182.         printed whether XPR mode is on or off.  If XPR mode is on  and 
  183.         you wish to see the menu, hit return.
  184.  
  185. FOR THE PMMI MODEM
  186.  
  187.   DSC - To disconnect you must use the 'DSC' command in the Menu.
  188.  
  189.         The original secondary options for the PMMI Modem (as  defined 
  190.         by  Ward  Christensen) are "A" (answer mode),  "O"  (originate 
  191.         mode), and baudrate selection. See examples below.
  192.  
  193.         Once  answer  or originate and a baudrate have  been  selected 
  194.         (ie.  SO.450  NAME.TYP),  any subsequent options will use  the 
  195.         same mode and buadrate. If you want to change the baudrate, it 
  196.         may be done without changing the mode.  For instance,  if  you 
  197.         are  in  originate mode at 450 baud,  then the command  'R.600 
  198.         NAME.TYP'  will  allow you to receive a file at  600  baud  in 
  199.         ORIGINATE mode.  If you want to change the ans/orig mode, then 
  200.         you MUST select the baudrate again or it will default to 300.
  201.  
  202.  
  203.   CAL - Allows  dialing  of number.  If a connection to a computer  is 
  204.         established,  you  will  be able to  select  options  (usually 
  205.         TO.xxx).   If no connection is made after 15 seconds, [changed
  206.     to  25  seconds  in  distributed  version]     then  you  will 
  207.         be  informed and be given the option of redialing or returning 
  208.         to the menu.  The dial routine may also be specified when  the 
  209.         Modem  program is called by entering  A>MODEM C.  No secondary 
  210.         options will be accepted when the "C" option is used.   [Note:
  211.     you cannot type:  CAL 312-545-8086  --  well, you can, but the
  212.     number will be ignored and you will have to retype it when the
  213.     program asks for it   --   in  the  latest  version  (11/4/80)
  214.     there is a 'library' feature such as in DIAL.ASM.   To use the
  215.     CAL function, type CAL and a return at the menu.  You will see
  216.     a message   'WAITING FOR DIAL TONE'  then a lot of stuff about
  217.     entering the number.   At this point you may type in a number,
  218.     or  you  may  type  a  letter  which will designate one of the
  219.     library numbers (which you must insert at assembly time).
  220.  
  221.   ^B -  Control-B  while  in Terminal (or Echo) mode allows change  of 
  222.         baudrate "on-the-fly." A carriage return gives 300  baud;  all 
  223.         other rates (110-600) must be explicitely stated.
  224.  
  225.  
  226. LISTING OF COMMANDS AND OPTIONS
  227.  
  228.     Primary options
  229.  
  230.         S - send a CP/M file (must specify file/s)
  231.         R - receive  a CP/M file (must name file unless B sec opt used)
  232.         T - terminal mode (specify file if memory save wanted)
  233.         E - terminal mode with echo
  234.         M - return to menu
  235.         X - used only when program is called to initially
  236.             toggle menu off
  237.  
  238.     Secondary options
  239.  
  240.         B - multi-file mode for sending and receiving files
  241.         T - return to terminal mode after transfer (memory save off)
  242.         R - view what is received in file transfer
  243.         S - view what is being sent in file transfer
  244.         V - view what is being sent or received in file transfer
  245.         T - Terminal mode (used with remotely controlled computer)
  246.         O - originate mode (PMMI modem)
  247.         A - answer mode (PMMI modem)
  248.         .xxx - baud rate xxx (xxx = 110-600  PMMI modem)
  249.  
  250. EXAMPLES        (fn = filename,  ft = filetype)
  251.  
  252.         Send file, originate mode, 300 baud
  253.  
  254.                                    SO fn.ft
  255.  
  256.         Send another file, same mode and baudrate
  257.  
  258.                                    S fn.ft
  259.  
  260.         Receive  file on B drive,  600 baud,  ans mode,  view what  is 
  261.         being received, return to terminal mode 
  262.  
  263.                                RART.600 B:fn.ft
  264.  
  265.         Send all COM files, no messages on console, same baud and mode 
  266.         as last transfer
  267.  
  268.                                   SBQ *.COM
  269.  
  270.         Send two files from two different drives
  271.  
  272.                            SB A:fn1.ft1  B:fn2.ft2
  273.  
  274.         Receive files being sent by above on drive A (baudrate must be 
  275.         same and modes opposite)
  276.  
  277.                                     RB A:
  278.  
  279.         Terminal mode,  save communication in file,  300 baud (default 
  280.         rate),  originate mode (in terminal must type CTRL-Y to  start 
  281.         save, in menu must type "WRT" to close file)
  282.  
  283.                                    TO fn.ft
  284.  
  285.  
  286. ASSEMBLING THE PROGRAM
  287.  
  288.         You  must use Digital Researches' MAC to assemble the program. 
  289.         The  files required are MODEM.ASM and  MODEM.LIB.   MACROS.LIB 
  290.         does not actually contain any macros in the true sense, but it 
  291.         does  contain  routines  that are necessary for the program to
  292.     run (MFACCESS however does use nested macros as real macros).
  293.  
  294.         If you have a PMMI and an IMSAI,  you may assemble the file as 
  295.         is.  If  you do not have an IMSAI with a front  panel,  change 
  296.         IMSAIBYTE  to 'FALSE' (near the beginning of the program).  If 
  297.         you  wish another character instead of the colon  to  indicate 
  298.         when  memory  save  is active,  change "MVI A,':'  "  to  "MVI 
  299.         A,'char'  " in the "TERM" routine where 'char' is the printing 
  300.         character  you would like at the beginning of each  line  when 
  301.         memory save is active.
  302.  
  303.         If you do not have a PMMI,  change the byte to 'FALSE' and put 
  304.         your  modem status and data ports in the appropriate  equates. 
  305.         The  labels  'MODRCVR'  and 'MODSNDR' should be  the  same  as 
  306.         MODRCVB  and  MODSNDB  (the  bits tested) if  your  UART  uses 
  307.         positive  logic  (JZ)  and should be zero if  your  UART  uses 
  308.         negative  logic.  If you have a Z-80 (or maybe a  fast  8085), 
  309.         change  the  'FASTCLK' byte to 'TRUE'.  If any port  or  modem 
  310.         initialization must be done, put the initialization routine in 
  311.         the  area  labeled INITMOD (replacing the PMMI  initialization 
  312.         routine). See MODEM.SET for more details.
  313.  
  314.         If  you  have  a D.C.  Hayes Modem,  you may  incorporate  the 
  315.         routines from MODEM.ASM V2.0 (as of 8/6/79).
  316.  
  317.         You  should also note the comment in the INBUFF  routine  near 
  318.         the end of the program.
  319.  
  320.         Any problems or bugs, please call me:
  321.  
  322.                 Or latest revisor:
  323.         Mark M. Zeiger        James K. Mills
  324.         198-01B 67th Ave.    824 Jordan Place
  325.         Flushing, N.Y. 11365    Rockford, IL  61108
  326.         (212) 454-6985        (815) 398-0579
  327.  
  328.