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 / MODEM2 / ROBUST.EOT < prev    next >
Internet Message Format  |  2000-06-30  |  2KB

  1. Date: Saturday, 14 December 1985
  2. From: Keith Petersen, W8SDZ
  3. Re:   MODEM/XMODEM robustness improvement on EOT tests successful
  4.  
  5. One of the most serious shortcomings of the Christensen protocol is
  6. that a single EOT (04h) received during a protocol transfer is taken
  7. by the receiver as end-of-file.  In the presense of noise, this can -
  8. and does occur.  The result is an incomplete file on the receiving end
  9. and an abort after ten retries on the sending end.
  10.  
  11. Frank Wancho and I have been experimenting with the idea of the
  12. receiving end sending a NAK when it gets the first EOT (or what it
  13. thinks is an EOT).  The sender will send another EOT in response to
  14. this if it's really EOT.  Otherwise, it will send SOH and the next
  15. record, thus allowing the receiver to recover from a false EOT.
  16.  
  17. I have tried this with an experimental version of XMODEM (no source
  18. for IMP or MEX, so can't try them).  It works perfectly.
  19.  
  20. The code looks something like this:
  21.  
  22. [Already have character here, expecting SOH for new record]
  23.  
  24. TSTSOH    if SOH then Jump to GOTSOH which gets rest of header, etc.
  25.     if not EOT then Jump to SENDNAK
  26.  
  27.     else wait for one second of no received chars, send NAK
  28.  
  29.     then do:
  30.  
  31.     quick purge of input port to clear garbage
  32.     wait up to 10 seconds for another character
  33.     if timeout Jump to timeout routine
  34.     if character is EOT return to caller with flag set
  35.     Character was not EOT, Jump to TSTSOH to test for others
  36.  
  37. --END OF ROUTINE--
  38.  
  39. SENDNAK is same as always, wait for one second of no characters, send
  40. NAK, increment error count, Jump to receive loop.
  41.  
  42. The only visable evidence that this improved code is in place is that
  43. the sender shows one error message: ** NAK received, not ACK **
  44. after it sends the real EOT.  It just sends another, so no problem.
  45.  
  46. Earlier versions of various Christensen MODEM programs would send EOTs
  47. forever (it was a closed loop).  I have a max ten counter in the
  48. SENDEOT routine.  The latest versions of IMP and KMD have only a three
  49. counter there, which I consider too low.  The program should attempt
  50. to send EOT ten times, same as it does for any other received NAK
  51. during the file transfer.
  52.  
  53. After we're through testing it, Frank will be releasing the improved
  54. Tops-20 MODEM program.  I am still working on XMODEM for CP/M-80.  It
  55. has so many conditional assembly switches and code dependant on other
  56. programs, such as BYE and ZCPR, that I am making a new program without
  57. all this rampent featuritus, which I will be releasing soon as XMD.
  58.  
  59. --Keith
  60.