[net.micro.apple] Data Protocol Question - xmodem/Christensen

brian@sdcsvax.UUCP (Brian Kantor) (11/05/85)

In article <947@utcs.uucp> flaps@utcs.UUCP (Alan J Rosenthal) writes:
>In article <557@ihlpm.UUCP> terry2@ihlpm.UUCP (t. nelson) writes:
>>I am now exploring the world of Bulletin Boards.  Most seem to 
>>use various forms of data exchange protocol like XMODEM or
>>XMODEM/CRC.  Access II uses Christensen (sp?) protocol.  I have
>>been told that XMODEM and Christensen protocols are the same.
>>Is this true?  What's the difference between XMODEM, XMODEM/CRC
>>and some other popular protocols?
>
>XMODEM describes how each individual block is sent.  Ward Christensen
>is XMODEM protocol with a particular description of block 0, and the
>fact that the other blocks are data blocks.
>I will post a (technical) description of the protocol if requested.
>
>CRC stands for Cyclic Redundancy Check.  It is a complex form of checksum.
>I would assume that XMODEM/CRC is just an XMODEM that outputs the CRC after
>transmission.

Gad, if people don't know what they are talking about, they should
remain silent.

The Christensen Protocol is named after Ward Christensen, who developed
it in the late 70's as a file transfer protocol for cp/m microcomputer
systems.  It consists of blocks of data prefixed with a simple header,
and suffixed with a check sum.

In its original form, each packet consisted of the ascii SOH (01 hex), 
followed by an 8-bit block count and its complement, 128 bytes of 8-bit 
data, and a single 8-bit checksum.  

Note carefully that there are some clever things going on here:  The sum
of the three header characters is always zero, so that it doesn't matter
if you include them in the simple checksum or not.  Also note that the
data block is 128 bytes, which is the size of a cp/m logical disk sector.

Timeouts and ACK/NAK responses are also specified.

Later extensions to the protocol replaced the trailing checksum byte
with a two-byte (16 bit) CRC.  Most programs implementing the
Christensen protocol accept either checksum or CRC at operator request,
and send whichever was requested by the receiving host.

``MODEM'' and ``XMODEM'' were the two programs developed to speak this
protocol originally.  Modem was the manually operated program; xmodem
(named for, I'm told, eXternal Modem) was the remotely operated slave.

Lots of other programs use this protocol; literally dozens of them are
in current circulation.  There are variations that use larger
blocksizes, automatically insert file names for batch transmission, 
windowing, etc.  All are outgrowths of Ward's original programs, at least 
in the protocol they use.  Adaptations have been made for non-cp/m
systems and for other uses than file transfer (I even made one that
spoke SMTP for mailing).  I know of versions for just about every one of
the popular microcomputers, for unix, for vms, etc.

A complete specification of the protocol was recently circulating on the
net; check back a few weeks in your archives.

	Brian Kantor	UCSD Office of Academic Computing
			Network Services Group  (619) 452-6865
			UCSD B-028, La Jolla, CA 92093

	decvax\ 	brian@ucsd.arpa
	akgua  >---  sdcsvax  --- brian
	ucbvax/		Kantor@Nosc