8 XMODEM/YMODEM PROTOCOL REFERENCE
9 A compendium of documents describing the
13 File Transfer Protocols
18 This document was formatted 10-14-88.
26 Edited by Chuck Forsberg
36 This file may be redistributed without restriction
37 provided the text is not altered.
39 Please distribute as widely as possible.
41 Questions to Chuck Forsberg
48 The High Reliability Software
49 17505-V Sauvie Island Road
51 VOICE: 503-621-3406 :VOICE
52 TeleGodzilla BBS: 503-621-3746 Speed 19200(Telebit PEP),2400,1200,300
53 CompuServe: 70007,2304
55 UUCP: ...!tektronix!reed!omen!caf
76 A "YMODEM Tower of Babel" has descended on the microcomputing community
77 bringing with it confusion, frustration, bloated phone bills, and wasted
78 man hours. Sadly, I (Chuck Forsberg) am partly to blame for this mess.
80 As author of the early 1980s batch and 1k XMODEM extensions, I assumed
81 readers of earlier versions of this document would implement as much of
82 the YMODEM protocol as their programming skills and computing environments
83 would permit. This proved a rather naive assumption as programmers
84 motivated by competitive pressure implemented as little of YMODEM as
85 possible. Some have taken whatever parts of YMODEM that appealed to them,
86 applied them to MODEM7 Batch, Telink, XMODEM or whatever, and called the
89 Jeff Garbers (Crosstalk package development director) said it all: "With
90 protocols in the public domain, anyone who wants to dink around with them
93 Documents containing altered examples derived from YMODEM.DOC have added
94 to the confusion. In one instance, some self styled rewriter of history
95 altered the heading in YMODEM.DOC's Figure 1 from "1024 byte Packets" to
96 "YMODEM/CRC File Transfer Protocol". None of the XMODEM and YMODEM
97 examples shown in that document were correct.
99 To put an end to this confusion, we must make "perfectly clear" what
100 YMODEM stands for, as Ward Christensen defined it in his 1985 coining of
103 To the majority of you who read, understood, and respected Ward's
104 definition of YMODEM, I apologize for the inconvenience.
108 ARC ARC is a program that compresses one or more files into an archive
109 and extracts files from such archives.
111 XMODEM refers to the file transfer etiquette introduced by Ward
112 Christensen's 1977 MODEM.ASM program. The name XMODEM comes from
113 Keith Petersen's XMODEM.ASM program, an adaptation of MODEM.ASM
114 for Remote CP/M (RCPM) systems. It's also called the MODEM or
115 MODEM2 protocol. Some who are unaware of MODEM7's unusual batch
116 file mode call it MODEM7. Other aliases include "CP/M Users'
117 Group" and "TERM II FTP 3". The name XMODEM caught on partly
118 because it is distinctive and partly because of media interest in
123 1. Page C/12, PC-WEEK July 12, 1987
136 X/YMODEM Protocol Reference June 18 1988 3
140 bulletin board and RCPM systems where it was accessed with an
141 "XMODEM" command. This protocol is supported by every serious
142 communications program because of its universality, simplicity,
143 and reasonable performance.
145 XMODEM/CRC replaces XMODEM's 1 byte checksum with a two byte Cyclical
146 Redundancy Check (CRC-16), giving modern error detection
149 XMODEM-1k Refers to the XMODEM/CRC protocol with 1024 byte data blocks.
151 YMODEM Refers to the XMODEM/CRC (optional 1k blocks) protocol with batch
152 transmission as described below. In a nutshell, YMODEM means
155 YMODEM-g Refers to the streaming YMODEM variation described below.
157 True YMODEM(TM) In an attempt to sort out the YMODEM Tower of Babel, Omen
158 Technology has trademarked the term True YMODEM(TM) to represent
159 the complete YMODEM protocol described in this document, including
160 pathname, length, and modification date transmitted in block 0.
161 Please contact Omen Technology about certifying programs for True
162 YMODEM(TM) compliance.
164 ZMODEM uses familiar XMODEM/CRC and YMODEM technology in a new protocol
165 that provides reliability, throughput, file management, and user
166 amenities appropriate to contemporary data communications.
168 ZOO Like ARC, ZOO is a program that compresses one or more files into
169 a "zoo archive". ZOO supports many different operating systems
170 including Unix and VMS.
202 X/YMODEM Protocol Reference June 18 1988 4
206 2. YMODEM MINIMUM REQUIREMENTS
208 All programs claiming to support YMODEM must meet the following minimum
211 + The sending program shall send the pathname (file name) in block 0.
213 + The pathname shall be a null terminated ASCII string as described
216 For those who are too lazy to read the entire document:
218 + Unless specifically requested, only the file name portion is
221 + No drive letter is sent.
223 + Systems that do not distinguish between upper and lower case
224 letters in filenames shall send the pathname in lower case only.
227 + The receiving program shall use this pathname for the received file
228 name, unless explicitly overridden.
230 + When the receiving program receives this block and successfully
231 opened the output file, it shall acknowledge this block with an ACK
232 character and then proceed with a normal XMODEM file transfer
233 beginning with a "C" or NAK tranmsitted by the receiver.
235 + The sending program shall use CRC-16 in response to a "C" pathname
236 nak, otherwise use 8 bit checksum.
238 + The receiving program must accept any mixture of 128 and 1024 byte
239 blocks within each file it receives. Sending programs may
240 arbitrarily switch between 1024 and 128 byte blocks.
242 + The sending program must not change the length of an unacknowledged
245 + At the end of each file, the sending program shall send EOT up to ten
246 times until it receives an ACK character. (This is part of the
249 + The end of a transfer session shall be signified by a null (empty)
250 pathname, this pathname block shall be acknowledged the same as other
253 Programs not meeting all of these requirements are not YMODEM compatible,
254 and shall not be described as supporting YMODEM.
256 Meeting these MINIMUM requirements does not guarantee reliable file
268 X/YMODEM Protocol Reference June 18 1988 5
272 transfers under stress. Particular attention is called to XMODEM's single
273 character supervisory messages that are easily corrupted by transmission
334 X/YMODEM Protocol Reference June 18 1988 6
340 Since its development half a decade ago, the Ward Christensen modem
341 protocol has enabled a wide variety of computer systems to interchange
342 data. There is hardly a communications program that doesn't at least
343 claim to support this protocol.
345 Advances in computing, modems and networking have revealed a number of
346 weaknesses in the original protocol:
348 + The short block length caused throughput to suffer when used with
349 timesharing systems, packet switched networks, satellite circuits,
350 and buffered (error correcting) modems.
352 + The 8 bit arithmetic checksum and other aspects allowed line
353 impairments to interfere with dependable, accurate transfers.
355 + Only one file could be sent per command. The file name had to be
356 given twice, first to the sending program and then again to the
359 + The transmitted file could accumulate as many as 127 extraneous
362 + The modification date of the file was lost.
364 A number of other protocols have been developed over the years, but none
365 have displaced XMODEM to date:
367 + Lack of public domain documentation and example programs have kept
368 proprietary protocols such as Blast, Relay, and others tightly bound
369 to the fortunes of their suppliers.
371 + Complexity discourages the widespread application of BISYNC, SDLC,
372 HDLC, X.25, and X.PC protocols.
374 + Performance compromises and complexity have limited the popularity of
375 the Kermit protocol, which was developed to allow file transfers in
376 environments hostile to XMODEM.
378 The XMODEM protocol extensions and YMODEM Batch address some of these
379 weaknesses while maintaining most of XMODEM's simplicity.
381 YMODEM is supported by the public domain programs YAM (CP/M),
382 YAM(CP/M-86), YAM(CCPM-86), IMP (CP/M), KMD (CP/M), rz/sz (Unix, Xenix,
383 VMS, Berkeley Unix, Venix, Xenix, Coherent, IDRIS, Regulus). Commercial
384 implementations include MIRROR, and Professional-YAM.[1] Communications
400 X/YMODEM Protocol Reference June 18 1988 7
404 programs supporting these extensions have been in use since 1981.
406 The 1k block length (XMODEM-1k) described below may be used in conjunction
407 with YMODEM Batch Protocol, or with single file transfers identical to the
408 XMODEM/CRC protocol except for minimal changes to support 1k blocks.
410 Another extension is the YMODEM-g protocol. YMODEM-g provides batch
411 transfers with maximum throughput when used with end to end error
412 correcting media, such as X.PC and error correcting modems, including 9600
413 bps units by TeleBit, U.S.Robotics, Hayes, Electronic Vaults, Data Race,
416 To complete this tome, edited versions of Ward Christensen's original
417 protocol document and John Byrns's CRC-16 document are included for
420 References to the MODEM or MODEM7 protocol have been changed to XMODEM to
421 accommodate the vernacular. In Australia, it is properly called the
422 Christensen Protocol.
425 3.1 Some Messages from the Pioneer
427 #: 130940 S0/Communications 25-Apr-85 18:38:47
429 Fm: Ward Christensen 76703,302 [2]
432 Be aware the article[3] DID quote me correctly in terms of the phrases
433 like "not robust", etc.
435 It was a quick hack I threw together, very unplanned (like everything I
436 do), to satisfy a personal need to communicate with "some other" people.
438 ONLY the fact that it was done in 8/77, and that I put it in the public
439 domain immediately, made it become the standard that it is.
447 __________________________________________________________________________
449 1. Available for IBM PC,XT,AT, Unix and Xenix
451 2. Edited for typesetting appearance
453 3. Infoworld April 29 p. 16
466 X/YMODEM Protocol Reference June 18 1988 8
470 I think its time for me to
472 (1) document it; (people call me and say "my product is going to include
473 it - what can I 'reference'", or "I'm writing a paper on it, what do I put
474 in the bibliography") and
476 (2) propose an "incremental extension" to it, which might take "exactly"
477 the form of Chuck Forsberg's YAM protocol. He wrote YAM in C for CP/M and
478 put it in the public domain, and wrote a batch protocol for Unix[4] called
479 rb and sb (receive batch, send batch), which was basically XMODEM with
480 (a) a record 0 containing filename date time and size
481 (b) a 1K block size option
484 He did some clever programming to detect false ACK or EOT, but basically
487 People who suggest I make SIGNIFICANT changes to the protocol, such as
488 "full duplex", "multiple outstanding blocks", "multiple destinations", etc
489 etc don't understand that the incredible simplicity of the protocol is one
490 of the reasons it survived to this day in as many machines and programs as
493 Consider the PC-NET group back in '77 or so - documenting to beat the band
494 - THEY had a protocol, but it was "extremely complex", because it tried to
495 be "all things to all people" - i.e. send binary files on a 7-bit system,
496 etc. I was not that "benevolent". I (emphasize > I < ) had an 8-bit UART,
497 so "my protocol was an 8-bit protocol", and I would just say "sorry" to
498 people who were held back by 7-bit limitations. ...
500 Block size: Chuck Forsberg created an extension of my protocol, called
501 YAM, which is also supported via his public domain programs for UNIX
502 called rb and sb - receive batch and send batch. They cleverly send a
503 "block 0" which contains the filename, date, time, and size.
504 Unfortunately, its UNIX style, and is a bit weird[5] - octal numbers, etc.
505 BUT, it is a nice way to overcome the kludgy "echo the chars of the name"
506 introduced with MODEM7. Further, chuck uses CRC-16 and optional 1K
507 blocks. Thus the record 0, 1K, and CRC, make it a "pretty slick new
508 protocol" which is not significantly different from my own.
510 Also, there is a catchy name - YMODEM. That means to some that it is the
511 "next thing after XMODEM", and to others that it is the Y(am)MODEM
516 4. VAX/VMS versions of these programs are also available.
518 5. The file length, time, and file mode are optional. The pathname and
519 file length may be sent alone if desired.
532 X/YMODEM Protocol Reference June 18 1988 9
536 protocol. I don't want to emphasize that too much - out of fear that
537 other mfgrs might think it is a "competitive" protocol, rather than an
538 "unaffiliated" protocol. Chuck is currently selling a much-enhanced
539 version of his CP/M-80 C program YAM, calling it Professional Yam, and its
540 for the PC - I'm using it right now. VERY slick! 32K capture buffer,
541 script, scrolling, previously captured text search, plus built-in commands
542 for just about everything - directory (sorted every which way), XMODEM,
543 YMODEM, KERMIT, and ASCII file upload/download, etc. You can program it
544 to "behave" with most any system - for example when trying a number for
545 CIS it detects the "busy" string back from the modem and substitutes a
546 diff phone # into the dialing string and branches back to try it.
598 X/YMODEM Protocol Reference June 18 1988 10
602 4. XMODEM PROTOCOL ENHANCEMENTS
604 This chapter discusses the protocol extensions to Ward Christensen's 1982
605 XMODEM protocol description document.
607 The original document recommends the user be asked whether to continue
608 trying or abort after 10 retries. Most programs no longer ask the
609 operator whether he wishes to keep retrying. Virtually all correctable
610 errors are corrected within the first few retransmissions. If the line is
611 so bad that ten attempts are insufficient, there is a significant danger
612 of undetected errors. If the connection is that bad, it's better to
613 redial for a better connection, or mail a floppy disk.
618 The YAM and Professional-YAM X/YMODEM routines recognize a sequence of two
619 consecutive CAN (Hex 18) characters without modem errors (overrun,
620 framing, etc.) as a transfer abort command. This sequence is recognized
621 when is waiting for the beginning of a block or for an acknowledgement to
622 a block that has been sent. The check for two consecutive CAN characters
623 reduces the number of transfers aborted by line hits. YAM sends eight CAN
624 characters when it aborts an XMODEM, YMODEM, or ZMODEM protocol file
625 transfer. Pro-YAM then sends eight backspaces to delete the CAN
626 characters from the remote's keyboard input buffer, in case the remote had
627 already aborted the transfer and was awaiting a keyboarded command.
632 The XMODEM protocol uses an optional two character CRC-16 instead of the
633 one character arithmetic checksum used by the original protocol and by
634 most commercial implementations. CRC-16 guarantees detection of all
635 single and double bit errors, all errors with an odd number of error
636 bits, all burst errors of length 16 or less, 99.9969% of all 17-bit error
637 bursts, and 99.9984 per cent of all possible longer error bursts. By
638 contrast, a double bit error, or a burst error of 9 bits or more can sneak
639 past the XMODEM protocol arithmetic checksum.
641 The XMODEM/CRC protocol is similar to the XMODEM protocol, except that the
642 receiver specifies CRC-16 by sending C (Hex 43) instead of NAK when
643 requesting the FIRST block. A two byte CRC is sent in place of the one
644 byte arithmetic checksum.
646 YAM's c option to the r command enables CRC-16 in single file reception,
647 corresponding to the original implementation in the MODEM7 series
648 programs. This remains the default because many commercial communications
649 programs and bulletin board systems still do not support CRC-16,
650 especially those written in Basic or Pascal.
652 XMODEM protocol with CRC is accurate provided both sender and receiver
656 Chapter 4 XMODEM Protocol Enhancements
664 X/YMODEM Protocol Reference June 18 1988 11
668 both report a successful transmission. The protocol is robust in the
669 presence of characters lost by buffer overloading on timesharing systems.
671 The single character ACK/NAK responses generated by the receiving program
672 adapt well to split speed modems, where the reverse channel is limited to
673 ten per cent or less of the main channel's speed.
675 XMODEM and YMODEM are half duplex protocols which do not attempt to
676 transmit information and control signals in both directions at the same
677 time. This avoids buffer overrun problems that have been reported by
678 users attempting to exploit full duplex asynchronous file transfer
679 protocols such as Blast.
681 Professional-YAM adds several proprietary logic enhancements to XMODEM's
682 error detection and recovery. These compatible enhancements eliminate
683 most of the bad file transfers other programs make when using the XMODEM
684 protocol under less than ideal conditions.
687 4.3 XMODEM-1k 1024 Byte Block
689 Disappointing throughput downloading from Unix with YMODEM[1] lead to the
690 development of 1024 byte blocks in 1982. 1024 byte blocks reduce the
691 effect of delays from timesharing systems, modems, and packet switched
692 networks on throughput by 87.5 per cent in addition to decreasing XMODEM's
693 3 per cent overhead (block number, CRC, etc.).
695 Some environments cannot accept 1024 byte bursts, including some networks
696 and minicomputer ports. The longer block length should be an option.
698 The choice to use 1024 byte blocks is expressed to the sending program on
699 its command line or selection menu.[2] 1024 byte blocks improve throughput
700 in many applications.
702 An STX (02) replaces the SOH (01) at the beginning of the transmitted
703 block to notify the receiver of the longer block length. The transmitted
704 block contains 1024 bytes of data. The receiver should be able to accept
705 any mixture of 128 and 1024 byte blocks. The block number (in the second
706 and third bytes of the block) is incremented by one for each block
707 regardless of the block length.
709 The sender must not change between 128 and 1024 byte block lengths if it
710 has not received a valid ACK for the current block. Failure to observe
715 1. The name hadn't been coined yet, but the protocol was the same.
717 2. See "KMD/IMP Exceptions to YMODEM" below.
722 Chapter 4 XMODEM Protocol Enhancements
730 X/YMODEM Protocol Reference June 18 1988 12
734 this restriction allows transmission errors to pass undetected.
736 If 1024 byte blocks are being used, it is possible for a file to "grow" up
737 to the next multiple of 1024 bytes. This does not waste disk space if the
738 allocation granularity is 1k or greater. With YMODEM batch transmission,
739 the optional file length transmitted in the file name block allows the
740 receiver to discard the padding, preserving the exact file length and
743 1024 byte blocks may be used with batch file transmission or with single
744 file transmission. CRC-16 should be used with the k option to preserve
745 data integrity over phone lines. If a program wishes to enforce this
746 recommendation, it should cancel the transfer, then issue an informative
747 diagnostic message if the receiver requests checksum instead of CRC-16.
749 Under no circumstances may a sending program use CRC-16 unless the
750 receiver commands CRC-16.
752 Figure 1. XMODEM-1k Blocks
756 "foo.bar open x.x minutes"
758 STX 01 FE Data[1024] CRC CRC
760 STX 02 FD Data[1024] CRC CRC
762 STX 03 FC Data[1000] CPMEOF[24] CRC CRC
767 Figure 2. Mixed 1024 and 128 byte Blocks
771 "foo.bar open x.x minutes"
773 STX 01 FE Data[1024] CRC CRC
775 STX 02 FD Data[1024] CRC CRC
777 SOH 03 FC Data[128] CRC CRC
779 SOH 04 FB Data[100] CPMEOF[28] CRC CRC
788 Chapter 4 XMODEM Protocol Enhancements
796 X/YMODEM Protocol Reference June 18 1988 13
800 5. YMODEM Batch File Transmission
802 The YMODEM Batch protocol is an extension to the XMODEM/CRC protocol that
803 allows 0 or more files to be transmitted with a single command. (Zero
804 files may be sent if none of the requested files is accessible.) The
805 design approach of the YMODEM Batch protocol is to use the normal routines
806 for sending and receiving XMODEM blocks in a layered fashion similar to
807 packet switching methods.
809 Why was it necessary to design a new batch protocol when one already
810 existed in MODEM7?[1] The batch file mode used by MODEM7 is unsuitable
811 because it does not permit full pathnames, file length, file date, or
812 other attribute information to be transmitted. Such a restrictive design,
813 hastily implemented with only CP/M in mind, would not have permitted
814 extensions to current areas of personal computing such as Unix, DOS, and
815 object oriented systems. In addition, the MODEM7 batch file mode is
816 somewhat susceptible to transmission impairments.
818 As in the case of single a file transfer, the receiver initiates batch
819 file transmission by sending a "C" character (for CRC-16).
821 The sender opens the first file and sends block number 0 with the
822 following information.[2]
824 Only the pathname (file name) part is required for batch transfers.
826 To maintain upwards compatibility, all unused bytes in block 0 must be set
829 Pathname The pathname (conventionally, the file name) is sent as a null
830 terminated ASCII string. This is the filename format used by the
831 handle oriented MSDOS(TM) functions and C library fopen functions.
832 An assembly language example follows:
834 No spaces are included in the pathname. Normally only the file name
835 stem (no directory prefix) is transmitted unless the sender has
836 selected YAM's f option to send the full pathname. The source drive
837 (A:, B:, etc.) is not sent.
839 Filename Considerations:
845 1. The MODEM7 batch protocol transmitted CP/M FCB bytes f1...f8 and
846 t1...t3 one character at a time. The receiver echoed these bytes as
847 received, one at a time.
849 2. Only the data part of the block is described here.
854 Chapter 5 XMODEM Protocol Enhancements
862 X/YMODEM Protocol Reference June 18 1988 14
866 + File names are forced to lower case unless the sending system
867 supports upper/lower case file names. This is a convenience for
868 users of systems (such as Unix) which store filenames in upper
871 + The receiver should accommodate file names in lower and upper
874 + When transmitting files between different operating systems,
875 file names must be acceptable to both the sender and receiving
878 If directories are included, they are delimited by /; i.e.,
879 "subdir/foo" is acceptable, "subdir\foo" is not.
881 Length The file length and each of the succeeding fields are optional.[3]
882 The length field is stored in the block as a decimal string counting
883 the number of data bytes in the file. The file length does not
884 include any CPMEOF (^Z) or other garbage characters used to pad the
887 If the file being transmitted is growing during transmission, the
888 length field should be set to at least the final expected file
891 The receiver stores the specified number of characters, discarding
892 any padding added by the sender to fill up the last block.
894 Modification Date The mod date is optional, and the filename and length
895 may be sent without requiring the mod date to be sent.
897 Iff the modification date is sent, a single space separates the
898 modification date from the file length.
900 The mod date is sent as an octal number giving the time the contents
901 of the file were last changed, measured in seconds from Jan 1 1970
902 Universal Coordinated Time (GMT). A date of 0 implies the
903 modification date is unknown and should be left as the date the file
906 This standard format was chosen to eliminate ambiguities arising from
907 transfers between different time zones.
915 3. Fields may not be skipped.
920 Chapter 5 XMODEM Protocol Enhancements
928 X/YMODEM Protocol Reference June 18 1988 15
932 Mode Iff the file mode is sent, a single space separates the file mode
933 from the modification date. The file mode is stored as an octal
934 string. Unless the file originated from a Unix system, the file mode
935 is set to 0. rb(1) checks the file mode for the 0x8000 bit which
936 indicates a Unix type regular file. Files with the 0x8000 bit set
937 are assumed to have been sent from another Unix (or similar) system
938 which uses the same file conventions. Such files are not translated
942 Serial Number Iff the serial number is sent, a single space separates the
943 serial number from the file mode. The serial number of the
944 transmitting program is stored as an octal string. Programs which do
945 not have a serial number should omit this field, or set it to 0. The
946 receiver's use of this field is optional.
949 Other Fields YMODEM was designed to allow additional header fields to be
950 added as above without creating compatibility problems with older
951 YMODEM programs. Please contact Omen Technology if other fields are
952 needed for special application requirements.
954 The rest of the block is set to nulls. This is essential to preserve
955 upward compatibility.[4]
957 If the filename block is received with a CRC or other error, a
958 retransmission is requested. After the filename block has been received,
959 it is ACK'ed if the write open is successful. If the file cannot be
960 opened for writing, the receiver cancels the transfer with CAN characters
963 The receiver then initiates transfer of the file contents with a "C"
964 character, according to the standard XMODEM/CRC protocol.
966 After the file contents and XMODEM EOT have been transmitted and
967 acknowledged, the receiver again asks for the next pathname.
969 Transmission of a null pathname terminates batch file transmission.
971 Note that transmission of no files is not necessarily an error. This is
972 possible if none of the files requested of the sender could be opened for
979 4. If, perchance, this information extends beyond 128 bytes (possible
980 with Unix 4.2 BSD extended file names), the block should be sent as a
981 1k block as described above.
986 Chapter 5 XMODEM Protocol Enhancements
994 X/YMODEM Protocol Reference June 18 1988 16
998 Most YMODEM receivers request CRC-16 by default.
1000 The Unix programs sz(1) and rz(1) included in the source code file
1001 RZSZ.ZOO should answer other questions about YMODEM batch protocol.
1003 Figure 3. YMODEM Batch Transmission Session (1 file)
1007 "sending in batch mode etc."
1009 SOH 00 FF foo.c NUL[123] CRC CRC
1012 SOH 01 FE Data[128] CRC CRC
1014 SOH 02 FC Data[128] CRC CRC
1016 SOH 03 FB Data[100] CPMEOF[28] CRC CRC
1023 SOH 00 FF NUL[128] CRC CRC
1026 Figure 7. YMODEM Header Information and Features
1028 _____________________________________________________________
1029 | Program | Length | Date | Mode | S/N | 1k-Blk | YMODEM-g |
1030 |___________|________|______|______|_____|________|__________|
1031 |Unix rz/sz | yes | yes | yes | no | yes | sb only |
1032 |___________|________|______|______|_____|________|__________|
1033 |VMS rb/sb | yes | no | no | no | yes | no |
1034 |___________|________|______|______|_____|________|__________|
1035 |Pro-YAM | yes | yes | no | yes | yes | yes |
1036 |___________|________|______|______|_____|________|__________|
1037 |CP/M YAM | no | no | no | no | yes | no |
1038 |___________|________|______|______|_____|________|__________|
1039 |KMD/IMP | ? | no | no | no | yes | no |
1040 |___________|________|______|______|_____|________|__________|
1042 5.1 KMD/IMP Exceptions to YMODEM
1044 KMD and IMP use a "CK" character sequence emitted by the receiver to
1045 trigger the use of 1024 byte blocks as an alternative to specifying this
1046 option to the sending program. This two character sequence generally
1047 works well on single process micros in direct communication, provided the
1048 programs rigorously adhere to all the XMODEM recommendations included
1052 Chapter 5 XMODEM Protocol Enhancements
1060 X/YMODEM Protocol Reference June 18 1988 17
1064 Figure 4. YMODEM Batch Transmission Session (2 files)
1067 "sb foo.c baz.c<CR>"
1068 "sending in batch mode etc."
1070 SOH 00 FF foo.c NUL[123] CRC CRC
1073 SOH 01 FE Data[128] CRC CRC
1075 SOH 02 FC Data[128] CRC CRC
1077 SOH 03 FB Data[100] CPMEOF[28] CRC CRC
1084 SOH 00 FF baz.c NUL[123] CRC CRC
1087 SOH 01 FB Data[100] CPMEOF[28] CRC CRC
1094 SOH 00 FF NUL[128] CRC CRC
1097 Figure 5. YMODEM Batch Transmission Session-1k Blocks
1101 "sending in batch mode etc."
1103 SOH 00 FF foo.c NUL[123] CRC CRC
1106 STX 01 FD Data[1024] CRC CRC
1108 SOH 02 FC Data[128] CRC CRC
1110 SOH 03 FB Data[100] CPMEOF[28] CRC CRC
1118 Chapter 5 XMODEM Protocol Enhancements
1126 X/YMODEM Protocol Reference June 18 1988 18
1132 SOH 00 FF NUL[128] CRC CRC
1135 Figure 6. YMODEM Filename block transmitted by sz
1137 -rw-r--r-- 6347 Jun 17 1984 20:34 bbcsched.txt
1139 00 0100FF62 62637363 6865642E 74787400 |...bbcsched.txt.|
1140 10 36333437 20333331 34373432 35313320 |6347 3314742513 |
1141 20 31303036 34340000 00000000 00000000 |100644..........|
1142 30 00000000 00000000 00000000 00000000
1143 40 00000000 00000000 00000000 00000000
1144 50 00000000 00000000 00000000 00000000
1145 60 00000000 00000000 00000000 00000000
1146 70 00000000 00000000 00000000 00000000
1149 herein. Programs with marginal XMODEM implementations do not fare so
1150 well. Timesharing systems and packet switched networks can separate the
1151 successive characters, rendering this method unreliable.
1153 Sending programs may detect the CK sequence if the operating enviornment
1154 does not preclude reliable implementation.
1156 Instead of the standard YMODEM file length in decimal, KMD and IMP
1157 transmit the CP/M record count in the last two bytes of the header block.
1160 6. YMODEM-g File Transmission
1162 Developing technology is providing phone line data transmission at ever
1163 higher speeds using very specialized techniques. These high speed modems,
1164 as well as session protocols such as X.PC, provide high speed, nearly
1165 error free communications at the expense of considerably increased delay
1168 This delay time is moderate compared to human interactions, but it
1169 cripples the throughput of most error correcting protocols.
1171 The g option to YMODEM has proven effective under these circumstances.
1172 The g option is driven by the receiver, which initiates the batch transfer
1173 by transmitting a G instead of C. When the sender recognizes the G, it
1174 bypasses the usual wait for an ACK to each transmitted block, sending
1175 succeeding blocks at full speed, subject to XOFF/XON or other flow control
1176 exerted by the medium.
1178 The sender expects an inital G to initiate the transmission of a
1179 particular file, and also expects an ACK on the EOT sent at the end of
1180 each file. This synchronization allows the receiver time to open and
1184 Chapter 6 XMODEM Protocol Enhancements
1192 X/YMODEM Protocol Reference June 18 1988 19
1196 close files as necessary.
1198 If an error is detected in a YMODEM-g transfer, the receiver aborts the
1199 transfer with the multiple CAN abort sequence. The ZMODEM protocol should
1200 be used in applications that require both streaming throughput and error
1203 Figure 8. YMODEM-g Transmission Session
1207 "sending in batch mode etc..."
1209 SOH 00 FF foo.c NUL[123] CRC CRC
1211 SOH 01 FE Data[128] CRC CRC
1212 STX 02 FD Data[1024] CRC CRC
1213 SOH 03 FC Data[128] CRC CRC
1214 SOH 04 FB Data[100] CPMEOF[28] CRC CRC
1218 SOH 00 FF NUL[128] CRC CRC
1250 Chapter 6 XMODEM Protocol Enhancements
1258 X/YMODEM Protocol Reference June 18 1988 20
1262 7. XMODEM PROTOCOL OVERVIEW
1264 8/9/82 by Ward Christensen.
1266 I will maintain a master copy of this. Please pass on changes or
1267 suggestions via CBBS/Chicago at (312) 545-8086, CBBS/CPMUG (312) 849-1132
1268 or by voice at (312) 849-6279.
1280 7.2 Transmission Medium Level Protocol
1282 Asynchronous, 8 data bits, no parity, one stop bit.
1284 The protocol imposes no restrictions on the contents of the data being
1285 transmitted. No control characters are looked for in the 128-byte data
1286 messages. Absolutely any kind of data may be sent - binary, ASCII, etc.
1287 The protocol has not formally been adopted to a 7-bit environment for the
1288 transmission of ASCII-only (or unpacked-hex) data , although it could be
1289 simply by having both ends agree to AND the protocol-dependent data with
1290 7F hex before validating it. I specifically am referring to the checksum,
1291 and the block numbers and their ones- complement.
1293 Those wishing to maintain compatibility of the CP/M file structure, i.e.
1294 to allow modemming ASCII files to or from CP/M systems should follow this
1297 + ASCII tabs used (09H); tabs set every 8.
1299 + Lines terminated by CR/LF (0DH 0AH)
1301 + End-of-file indicated by ^Z, 1AH. (one or more)
1303 + Data is variable length, i.e. should be considered a continuous
1304 stream of data bytes, broken into 128-byte chunks purely for the
1305 purpose of transmission.
1307 + A CP/M "peculiarity": If the data ends exactly on a 128-byte
1308 boundary, i.e. CR in 127, and LF in 128, a subsequent sector
1309 containing the ^Z EOF character(s) is optional, but is preferred.
1310 Some utilities or user programs still do not handle EOF without ^Zs.
1316 Chapter 7 Xmodem Protocol Overview
1324 X/YMODEM Protocol Reference June 18 1988 21
1328 + The last block sent is no different from others, i.e. there is no
1330 Figure 9. XMODEM Message Block Level Protocol
1332 Each block of the transfer looks like:
1333 <SOH><blk #><255-blk #><--128 data bytes--><cksum>
1336 <blk #> = binary number, starts at 01 increments by 1, and
1337 wraps 0FFH to 00H (not to 01)
1338 <255-blk #> = blk # after going thru 8080 "CMA" instr, i.e.
1339 each bit complemented in the 8-bit block number.
1340 Formally, this is the "ones complement".
1341 <cksum> = the sum of the data bytes only. Toss any carry.
1343 7.3 File Level Protocol
1345 7.3.1 Common_to_Both_Sender_and_Receiver
1346 All errors are retried 10 times. For versions running with an operator
1347 (i.e. NOT with XMODEM), a message is typed after 10 errors asking the
1348 operator whether to "retry or quit".
1350 Some versions of the protocol use <can>, ASCII ^X, to cancel transmission.
1351 This was never adopted as a standard, as having a single "abort" character
1352 makes the transmission susceptible to false termination due to an <ack>
1353 <nak> or <soh> being corrupted into a <can> and aborting transmission.
1355 The protocol may be considered "receiver driven", that is, the sender need
1356 not automatically re-transmit, although it does in the current
1360 7.3.2 Receive_Program_Considerations
1361 The receiver has a 10-second timeout. It sends a <nak> every time it
1362 times out. The receiver's first timeout, which sends a <nak>, signals the
1363 transmitter to start. Optionally, the receiver could send a <nak>
1364 immediately, in case the sender was ready. This would save the initial 10
1365 second timeout. However, the receiver MUST continue to timeout every 10
1366 seconds in case the sender wasn't ready.
1368 Once into a receiving a block, the receiver goes into a one-second timeout
1369 for each character and the checksum. If the receiver wishes to <nak> a
1370 block for any reason (invalid header, timeout receiving data), it must
1371 wait for the line to clear. See "programming tips" for ideas
1373 Synchronizing: If a valid block number is received, it will be: 1) the
1374 expected one, in which case everything is fine; or 2) a repeat of the
1375 previously received block. This should be considered OK, and only
1376 indicates that the receivers <ack> got glitched, and the sender re-
1377 transmitted; 3) any other block number indicates a fatal loss of
1378 synchronization, such as the rare case of the sender getting a line-glitch
1382 Chapter 7 Xmodem Protocol Overview
1390 X/YMODEM Protocol Reference June 18 1988 22
1394 that looked like an <ack>. Abort the transmission, sending a <can>
1397 7.3.3 Sending_program_considerations
1398 While waiting for transmission to begin, the sender has only a single very
1399 long timeout, say one minute. In the current protocol, the sender has a
1400 10 second timeout before retrying. I suggest NOT doing this, and letting
1401 the protocol be completely receiver-driven. This will be compatible with
1404 When the sender has no more data, it sends an <eot>, and awaits an <ack>,
1405 resending the <eot> if it doesn't get one. Again, the protocol could be
1406 receiver-driven, with the sender only having the high-level 1-minute
1410 Here is a sample of the data flow, sending a 3-block message. It includes
1411 the two most common line hits - a garbaged block, and an <ack> reply
1412 getting garbaged. <xx> represents the checksum byte.
1414 Figure 10. Data flow including Error Recovery
1417 times out after 10 seconds,
1419 <soh> 01 FE -data- <xx> --->
1421 <soh> 02 FD -data- xx ---> (data gets line hit)
1423 <soh> 02 FD -data- xx --->
1425 <soh> 03 FC -data- xx --->
1426 (ack gets garbaged) <--- <ack>
1427 <soh> 03 FC -data- xx ---> <ack>
1429 <--- <anything except ack>
1434 7.4 Programming Tips
1436 + The character-receive subroutine should be called with a parameter
1437 specifying the number of seconds to wait. The receiver should first
1438 call it with a time of 10, then <nak> and try again, 10 times.
1440 After receiving the <soh>, the receiver should call the character
1441 receive subroutine with a 1-second timeout, for the remainder of the
1442 message and the <cksum>. Since they are sent as a continuous stream,
1443 timing out of this implies a serious like glitch that caused, say,
1444 127 characters to be seen instead of 128.
1448 Chapter 7 Xmodem Protocol Overview
1456 X/YMODEM Protocol Reference June 18 1988 23
1460 + When the receiver wishes to <nak>, it should call a "PURGE"
1461 subroutine, to wait for the line to clear. Recall the sender tosses
1462 any characters in its UART buffer immediately upon completing sending
1463 a block, to ensure no glitches were mis- interpreted.
1465 The most common technique is for "PURGE" to call the character
1466 receive subroutine, specifying a 1-second timeout,[1] and looping
1467 back to PURGE until a timeout occurs. The <nak> is then sent,
1468 ensuring the other end will see it.
1470 + You may wish to add code recommended by John Mahr to your character
1471 receive routine - to set an error flag if the UART shows framing
1472 error, or overrun. This will help catch a few more glitches - the
1473 most common of which is a hit in the high bits of the byte in two
1474 consecutive bytes. The <cksum> comes out OK since counting in 1-byte
1475 produces the same result of adding 80H + 80H as with adding 00H +
1509 1. These times should be adjusted for use with timesharing systems.
1514 Chapter 7 Xmodem Protocol Overview
1522 X/YMODEM Protocol Reference June 18 1988 24
1526 8. XMODEM/CRC Overview
1528 Original 1/13/85 by John Byrns -- CRC option.
1530 Please pass on any reports of errors in this document or suggestions for
1531 improvement to me via Ward's/CBBS at (312) 849-1132, or by voice at (312)
1534 The CRC used in the Modem Protocol is an alternate form of block check
1535 which provides more robust error detection than the original checksum.
1536 Andrew S. Tanenbaum says in his book, Computer Networks, that the CRC-
1537 CCITT used by the Modem Protocol will detect all single and double bit
1538 errors, all errors with an odd number of bits, all burst errors of length
1539 16 or less, 99.997% of 17-bit error bursts, and 99.998% of 18-bit and
1542 The changes to the Modem Protocol to replace the checksum with the CRC are
1543 straight forward. If that were all that we did we would not be able to
1544 communicate between a program using the old checksum protocol and one
1545 using the new CRC protocol. An initial handshake was added to solve this
1546 problem. The handshake allows a receiving program with CRC capability to
1547 determine whether the sending program supports the CRC option, and to
1548 switch it to CRC mode if it does. This handshake is designed so that it
1549 will work properly with programs which implement only the original
1550 protocol. A description of this handshake is presented in section 10.
1552 Figure 11. Message Block Level Protocol, CRC mode
1554 Each block of the transfer in CRC mode looks like:
1555 <SOH><blk #><255-blk #><--128 data bytes--><CRC hi><CRC lo>
1558 <blk #> = binary number, starts at 01 increments by 1, and
1559 wraps 0FFH to 00H (not to 01)
1560 <255-blk #> = ones complement of blk #.
1561 <CRC hi> = byte containing the 8 hi order coefficients of the CRC.
1562 <CRC lo> = byte containing the 8 lo order coefficients of the CRC.
1566 8.1.1 Formal_Definition
1567 To calculate the 16 bit CRC the message bits are considered to be the
1568 coefficients of a polynomial. This message polynomial is first multiplied
1569 by X^16 and then divided by the generator polynomial (X^16 + X^12 + X^5 +
1574 1. This reliability figure is misleading because XMODEM's critical
1575 supervisory functions are not protected by this CRC.
1580 Chapter 8 Xmodem Protocol Overview
1588 X/YMODEM Protocol Reference June 18 1988 25
1592 1) using modulo two arithmetic. The remainder left after the division is
1593 the desired CRC. Since a message block in the Modem Protocol is 128 bytes
1594 or 1024 bits, the message polynomial will be of order X^1023. The hi order
1595 bit of the first byte of the message block is the coefficient of X^1023 in
1596 the message polynomial. The lo order bit of the last byte of the message
1597 block is the coefficient of X^0 in the message polynomial.
1599 Figure 12. Example of CRC Calculation written in C
1601 The following XMODEM crc routine is taken from "rbsb.c". Please refer to
1602 the source code for these programs (contained in RZSZ.ZOO) for usage. A
1603 fast table driven version is also included in this file.
1609 register unsigned crc;
1613 for (count=8; --count>=0;) {
1616 crc += (((c<<=1) & 0400) != 0);
1621 crc += (((c<<=1) & 0400) != 0);
1627 8.2 CRC File Level Protocol Changes
1629 8.2.1 Common_to_Both_Sender_and_Receiver
1630 The only change to the File Level Protocol for the CRC option is the
1631 initial handshake which is used to determine if both the sending and the
1632 receiving programs support the CRC mode. All Modem Programs should support
1633 the checksum mode for compatibility with older versions. A receiving
1634 program that wishes to receive in CRC mode implements the mode setting
1635 handshake by sending a <C> in place of the initial <nak>. If the sending
1636 program supports CRC mode it will recognize the <C> and will set itself
1637 into CRC mode, and respond by sending the first block as if a <nak> had
1638 been received. If the sending program does not support CRC mode it will
1639 not respond to the <C> at all. After the receiver has sent the <C> it will
1640 wait up to 3 seconds for the <soh> that starts the first block. If it
1641 receives a <soh> within 3 seconds it will assume the sender supports CRC
1642 mode and will proceed with the file exchange in CRC mode. If no <soh> is
1646 Chapter 8 Xmodem Protocol Overview
1654 X/YMODEM Protocol Reference June 18 1988 26
1658 received within 3 seconds the receiver will switch to checksum mode, send
1659 a <nak>, and proceed in checksum mode. If the receiver wishes to use
1660 checksum mode it should send an initial <nak> and the sending program
1661 should respond to the <nak> as defined in the original Modem Protocol.
1662 After the mode has been set by the initial <C> or <nak> the protocol
1663 follows the original Modem Protocol and is identical whether the checksum
1664 or CRC is being used.
1667 8.2.2 Receive_Program_Considerations
1668 There are at least 4 things that can go wrong with the mode setting
1671 1. the initial <C> can be garbled or lost.
1673 2. the initial <soh> can be garbled.
1675 3. the initial <C> can be changed to a <nak>.
1677 4. the initial <nak> from a receiver which wants to receive in checksum
1678 can be changed to a <C>.
1680 The first problem can be solved if the receiver sends a second <C> after
1681 it times out the first time. This process can be repeated several times.
1682 It must not be repeated too many times before sending a <nak> and
1683 switching to checksum mode or a sending program without CRC support may
1684 time out and abort. Repeating the <C> will also fix the second problem if
1685 the sending program cooperates by responding as if a <nak> were received
1686 instead of ignoring the extra <C>.
1688 It is possible to fix problems 3 and 4 but probably not worth the trouble
1689 since they will occur very infrequently. They could be fixed by switching
1690 modes in either the sending or the receiving program after a large number
1691 of successive <nak>s. This solution would risk other problems however.
1694 8.2.3 Sending_Program_Considerations
1695 The sending program should start in the checksum mode. This will insure
1696 compatibility with checksum only receiving programs. Anytime a <C> is
1697 received before the first <nak> or <ack> the sending program should set
1698 itself into CRC mode and respond as if a <nak> were received. The sender
1699 should respond to additional <C>s as if they were <nak>s until the first
1700 <ack> is received. This will assist the receiving program in determining
1701 the correct mode when the <soh> is lost or garbled. After the first <ack>
1702 is received the sending program should ignore <C>s.
1712 Chapter 8 Xmodem Protocol Overview
1720 X/YMODEM Protocol Reference June 18 1988 27
1724 8.3 Data Flow Examples with CRC Option
1726 Here is a data flow example for the case where the receiver requests
1727 transmission in the CRC mode but the sender does not support the CRC
1728 option. This example also includes various transmission errors. <xx>
1729 represents the checksum byte.
1731 Figure 13. Data Flow: Receiver has CRC Option, Sender Doesn't
1735 times out after 3 seconds,
1737 times out after 3 seconds,
1739 times out after 3 seconds,
1741 times out after 3 seconds,
1743 <soh> 01 FE -data- <xx> --->
1745 <soh> 02 FD -data- <xx> ---> (data gets line hit)
1747 <soh> 02 FD -data- <xx> --->
1749 <soh> 03 FC -data- <xx> --->
1750 (ack gets garbaged) <--- <ack>
1751 times out after 10 seconds,
1753 <soh> 03 FC -data- <xx> --->
1758 Here is a data flow example for the case where the receiver requests
1759 transmission in the CRC mode and the sender supports the CRC option. This
1760 example also includes various transmission errors. <xxxx> represents the
1778 Chapter 8 Xmodem Protocol Overview
1786 X/YMODEM Protocol Reference June 18 1988 28
1790 Figure 14. Receiver and Sender Both have CRC Option
1794 <soh> 01 FE -data- <xxxx> --->
1796 <soh> 02 FD -data- <xxxx> ---> (data gets line hit)
1798 <soh> 02 FD -data- <xxxx> --->
1800 <soh> 03 FC -data- <xxxx> --->
1801 (ack gets garbaged) <--- <ack>
1802 times out after 10 seconds,
1804 <soh> 03 FC -data- <xxxx> --->
1844 Chapter 8 Xmodem Protocol Overview
1852 X/YMODEM Protocol Reference June 18 1988 29
1858 Please contact Omen Technology for troff source files and typeset copies
1862 9.1 TeleGodzilla Bulletin Board
1864 More information may be obtained by calling TeleGodzilla at 503-621-3746.
1865 Speed detection is automatic for 1200, 2400 and 19200(Telebit PEP) bps.
1866 TrailBlazer modem users may issue the TeleGodzilla trailblazer command to
1867 swith to 19200 bps once they have logged in.
1869 Interesting files include RZSZ.ZOO (C source code), YZMODEM.ZOO (Official
1870 XMODEM, YMODEM, and ZMODEM protocol descriptions), ZCOMMEXE.ARC,
1871 ZCOMMDOC.ARC, and ZCOMMHLP.ARC (PC-DOS shareware comm program with XMODEM,
1872 True YMODEM(TM), ZMODEM, Kermit Sliding Windows, Telink, MODEM7 Batch,
1873 script language, etc.).
1876 9.2 Unix UUCP Access
1878 UUCP sites can obtain the current version of this file with
1879 uucp omen!/u/caf/public/ymodem.doc /tmp
1880 A continually updated list of available files is stored in
1881 /usr/spool/uucppublic/FILES. When retrieving these files with uucp,
1882 remember that the destination directory on your system must be writeable
1883 by anyone, or the UUCP transfer will fail.
1885 The following L.sys line calls TeleGodzilla (Pro-YAM in host operation).
1886 TeleGodzilla determines the incoming speed automatically.
1888 In response to "Name Please:" uucico gives the Pro-YAM "link" command as a
1889 user name. The password (Giznoid) controls access to the Xenix system
1890 connected to the IBM PC's other serial port. Communications between
1891 Pro-YAM and Xenix use 9600 bps; YAM converts this to the caller's speed.
1893 Finally, the calling uucico logs in as uucp.
1895 omen Any ACU 2400 1-503-621-3746 se:--se: link ord: Giznoid in:--in: uucp
1901 6-18-88 Further revised for clarity. Corrected block numbering in two
1903 10-27-87 Optional fields added for number of files remaining to be sent
1904 and total number of bytes remaining to be sent.
1905 10-18-87 Flow control discussion added to 1024 byte block descritpion,
1906 minor revisions for clarity per user comments.
1910 Chapter 10 Xmodem Protocol Overview
1918 X/YMODEM Protocol Reference June 18 1988 30
1922 8-03-87 Revised for clarity.
1923 5-31-1987 emphasizes minimum requirements for YMODEM, and updates
1924 information on accessing files.
1925 9-11-1986 clarifies nomenclature and some minor points.
1926 The April 15 1986 edition clarifies some points concerning CRC
1927 calculations and spaces in the header.
1932 ZCOMM, A shareware little brother to Professional-YAM, is available as
1933 ZCOMMEXE.ARC on TeleGodzilla and other bulletin board systems. ZCOMM may
1934 be used to test YMODEM amd ZMODEM implementations.
1936 Unix programs supporting YMODEM are available on TeleGodzilla in RZSZ.ZOO.
1937 This ZOO archive includes a ZCOMM/Pro-YAM/PowerCom script ZUPL.T to upload
1938 a bootstrap program MINIRB.C, compile it, and then upload the rest of the
1939 files using the compiled MINIRB. Most Unix like systems are supported,
1940 including V7, Xenix, Sys III, 4.2 BSD, SYS V, Idris, Coherent, and
1943 A version for VAX-VMS is available in VRBSB.SHQ.
1945 Irv Hoff has added 1k blocks and basic YMODEM batch transfers to the KMD
1946 and IMP series programs, which replace the XMODEM and MODEM7/MDM7xx series
1947 respectively. Overlays are available for a wide variety of CP/M systems.
1949 Questions about Professional-YAM communications software may be directed
1953 17505-V Sauvie Island Road
1954 Portland Oregon 97231
1955 VOICE: 503-621-3406 :VOICE
1956 Modem: 503-621-3746 Speed: 19200(Telebit PEP),2400,1200,300
1957 Usenet: ...!tektronix!reed!omen!caf
1958 CompuServe: 70007,2304
1961 Unlike ZMODEM and Kermit, XMODEM and YMODEM place obstacles in the path of
1962 a reliable high performance implementation, evidenced by poor reliability
1963 under stress of the industry leaders' XMODEM and YMODEM programs. Omen
1964 Technology provides consulting and other services to those wishing to
1965 implement XMODEM, YMODEM, and ZMODEM with state of the art features and
1976 Chapter 11 Xmodem Protocol Overview
1991 1. TOWER OF BABEL................................................... 2
1992 1.1 Definitions................................................. 2
1994 2. YMODEM MINIMUM REQUIREMENTS...................................... 4
1996 3. WHY YMODEM?...................................................... 6
1997 3.1 Some Messages from the Pioneer.............................. 7
1999 4. XMODEM PROTOCOL ENHANCEMENTS..................................... 10
2000 4.1 Graceful Abort.............................................. 10
2001 4.2 CRC-16 Option............................................... 10
2002 4.3 XMODEM-1k 1024 Byte Block................................... 11
2004 5. YMODEM Batch File Transmission................................... 13
2005 5.1 KMD/IMP Exceptions to YMODEM................................ 16
2007 6. YMODEM-g File Transmission....................................... 18
2009 7. XMODEM PROTOCOL OVERVIEW......................................... 20
2010 7.1 Definitions................................................. 20
2011 7.2 Transmission Medium Level Protocol.......................... 20
2012 7.3 File Level Protocol......................................... 21
2013 7.4 Programming Tips............................................ 22
2015 8. XMODEM/CRC Overview.............................................. 24
2016 8.1 CRC Calculation............................................. 24
2017 8.2 CRC File Level Protocol Changes............................. 25
2018 8.3 Data Flow Examples with CRC Option.......................... 27
2020 9. MORE INFORMATION................................................. 29
2021 9.1 TeleGodzilla Bulletin Board................................. 29
2022 9.2 Unix UUCP Access............................................ 29
2024 10. REVISIONS........................................................ 29
2026 11. YMODEM Programs.................................................. 30
2060 Figure 1. XMODEM-1k Blocks.......................................... 12
2062 Figure 2. Mixed 1024 and 128 byte Blocks............................ 12
2064 Figure 3. YMODEM Batch Transmission Session (1 file)................ 16
2066 Figure 4. YMODEM Batch Transmission Session (2 files)............... 16
2068 Figure 5. YMODEM Batch Transmission Session-1k Blocks............... 16
2070 Figure 6. YMODEM Filename block transmitted by sz................... 16
2072 Figure 7. YMODEM Header Information and Features.................... 16
2074 Figure 8. YMODEM-g Transmission Session............................. 19
2076 Figure 9. XMODEM Message Block Level Protocol....................... 21
2078 Figure 10. Data flow including Error Recovery........................ 22
2080 Figure 11. Message Block Level Protocol, CRC mode.................... 24
2082 Figure 12. Example of CRC Calculation written in C................... 25
2084 Figure 13. Data Flow: Receiver has CRC Option, Sender Doesn't........ 27
2086 Figure 14. Receiver and Sender Both have CRC Option.................. 28