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 / MODEMS / MODEM7 / BATPROT.COL < prev    next >
Text File  |  2000-06-30  |  2KB  |  67 lines

  1. Batch protocol for MODEM7 and XMODEM multi-file transfer
  2.  
  3. Each must specify batch since different treatment of ACK
  4. as first character of "block" is needed.
  5.  
  6. CAN character is frequently tested for and interpreted as cancel everything
  7. 1 sec timeout on characters usually
  8.  
  9. CHECKSUM used on filename sequence even if CRC to be used in file transfer
  10.  
  11. on error during filename sequence, both return to beginning
  12.     sender returns to NAK wait
  13.     and receiver returns to NAK send
  14.  
  15. Time sequence of transfer:
  16. SENDER                    RECEIVER
  17.  
  18. waits for NAK with 80 sec timeout
  19. clear checksum
  20.                     NAK  at 10 sec interval 'til ACK or CAN
  21. ACK                    
  22.                     waits for filename chars 1 sec timeout
  23.                     on error goes to above NAK
  24. Loop 11 times (though filename buffer
  25.     allows more)
  26.  
  27.     (Strip parity bit)
  28.     send next filename character
  29.     (in CP/M FCB form, no dot,
  30.     blank filled, last 3 bytes
  31.     are type)
  32.     add to checksum
  33.     await ACK 1 second timeout
  34.                     add to checksum
  35.                     ACK
  36. End Loop
  37.  
  38. EOF (CTRL-Z)
  39. add to checksum
  40.                     add to checksum
  41.                     send Checksum byte
  42.                     await ACK
  43.                     (note: if receives noise here,
  44.                     one end may proceed to
  45.                     normal file transfer, and other to
  46.                     restart filename and hang)
  47. verifies checksum
  48. OKNMCH (ACK) or BDNMCH ("u")
  49.  
  50.         Normal file transfer starts
  51.                     NAK or "C"
  52. SOH   start of block
  53. .
  54. .
  55. .
  56. EOT   end of file
  57.                     ACK
  58.  
  59.  
  60. expects NAK to start next filename
  61.                     NAK
  62. ACK  set up receiver for filename
  63. EOT  as first char of filename 
  64.     terminates batch transfer
  65.     (possibly as ANY character
  66.     of filename)
  67.