Contents of the CRCTEST.DOC file
Somehow I became interested in writing a terminal program in
QuickBASIC and also wanted to include Xmodem. So I searched around
and found all the information I could on Xmodem. I downloaded several
text files from CIS which were extremely helpful. I also bought
"Mastering Serial Communications" by Peter W. Gofton (Sybex). This book
was very helpful and I highly recommend it.
At any rate, I discovered that to implement Xmodem I had to do
checksum and, alternatively, CRC on the 128 byte data block. The ADVAS
library (also available on CIS) has assembly routines for both and I tried
them (successfully). But I also wanted to see if I could implement Xmodem
in 'pure' BASIC.
Subsequently, I ran across an IBM PC BASIC implementation of a CRC
algorithm. It was in Peter Boswell's "Xmodem, CRC Xmodem, Wxmodem File
Transfer Protocols" (available on CIS, IBMCOM dl10). This is an excellent
discussion and I recommend it to anyone trying to learn more about
Xmodem. The next step was to modify his BASIC code to QuickBASIC, which
I did. The result is CRCTEST.BAS. Anyone wondering what in the world the
DATA statements are all about, I would refer to Peter Boswell's discussion.
Comments are welcome.