Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| ref:ymodem [2011/07/13 21:46] – digitalman | ref:ymodem [2011/07/13 22:02] (current) – digitalman | ||
|---|---|---|---|
| Line 6: | Line 6: | ||
| This document was formatted for Wiki syntax by [[person: | This document was formatted for Wiki syntax by [[person: | ||
| - | |||
| - | |||
| - | Please distribute as widely as possible. | ||
| - | Questions to [[http:// | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | Omen Technology Inc | ||
| - | The High Reliability Software | ||
| - | 17505-V Sauvie Island Road | ||
| - | Portland Oregon 97231 | ||
| - | VOICE: 503-621-3406 :VOICE | ||
| - | Modem (TeleGodzilla): | ||
| - | CompuServe: 70007,2304 | ||
| - | GEnie: CAF | ||
| - | UUCP: ...!tektronix!reed!omen!caf | ||
| - | |||
| ===== Tower of Babel ===== | ===== Tower of Babel ===== | ||
| Line 378: | Line 359: | ||
| === Figure 1: XMODEM-1k Blocks === | === Figure 1: XMODEM-1k Blocks === | ||
| - | | + | |
| - | "s -k foo.bar" | + | "s -k foo.bar" |
| - | " | + | " |
| - | C | + | C |
| - | STX 01 FE Data[1024] CRC CRC | + | STX 01 FE Data[1024] CRC CRC |
| - | ACK | + | ACK |
| - | STX 02 FD Data[1024] CRC CRC | + | STX 02 FD Data[1024] CRC CRC |
| - | ACK | + | ACK |
| - | STX 03 FC Data[1000] CPMEOF[24] CRC CRC | + | STX 03 FC Data[1000] CPMEOF[24] CRC CRC |
| - | ACK | + | ACK |
| - | EOT | + | EOT |
| - | ACK | + | ACK |
| === Figure 3: Mixed 1024 and 128 byte Blocks === | === Figure 3: Mixed 1024 and 128 byte Blocks === | ||
| - | | + | |
| - | "s -k foo.bar" | + | "s -k foo.bar" |
| - | " | + | " |
| - | C | + | C |
| - | STX 01 FE Data[1024] CRC CRC | + | STX 01 FE Data[1024] CRC CRC |
| - | ACK | + | ACK |
| - | STX 02 FD Data[1024] CRC CRC | + | STX 02 FD Data[1024] CRC CRC |
| - | ACK | + | ACK |
| - | SOH 03 FC Data[128] CRC CRC | + | SOH 03 FC Data[128] CRC CRC |
| - | ACK | + | ACK |
| - | SOH 04 FB Data[100] CPMEOF[28] CRC CRC | + | SOH 04 FB Data[100] CPMEOF[28] CRC CRC |
| - | ACK | + | ACK |
| - | EOT | + | EOT |
| - | ACK | + | ACK |
| ===== YMODEM Batch File Transmission ===== | ===== YMODEM Batch File Transmission ===== | ||
| Line 436: | Line 417: | ||
| To maintain upwards compatibility, | To maintain upwards compatibility, | ||
| - | ==== Pathname | + | === Pathname === |
| The pathname (conventionally, | The pathname (conventionally, | ||
| terminated ASCII string. | terminated ASCII string. | ||
| handle oriented MSDOS(TM) functions and C library fopen functions. | handle oriented MSDOS(TM) functions and C library fopen functions. | ||
| An assembly language example follows: | An assembly language example follows: | ||
| - | | + | |
| No spaces are included in the pathname. | No spaces are included in the pathname. | ||
| stem (no directory prefix) is transmitted unless the sender has | stem (no directory prefix) is transmitted unless the sender has | ||
| Line 447: | Line 428: | ||
| (A:, B:, etc.) is not sent. | (A:, B:, etc.) is not sent. | ||
| - | === Filename Considerations | + | == Filename Considerations == |
| * File names are forced to lower case unless the sending system supports upper/lower case file names. | * File names are forced to lower case unless the sending system supports upper/lower case file names. | ||
| Line 456: | Line 437: | ||
| * If directories are included, they are delimited by /; i.e., " | * If directories are included, they are delimited by /; i.e., " | ||
| - | ==== Length | + | === Length === |
| The file length and each of the succeeding fields are optional.((Fields may not be skipped.)) | The file length and each of the succeeding fields are optional.((Fields may not be skipped.)) | ||
| The length field is stored in the block as a decimal string counting | The length field is stored in the block as a decimal string counting | ||
| Line 470: | Line 451: | ||
| any padding added by the sender to fill up the last block. | any padding added by the sender to fill up the last block. | ||
| - | ==== Modification Date ==== | + | === Modification Date === |
| The mod date is optional, and the filename and length | The mod date is optional, and the filename and length | ||
| may be sent without requiring the mod date to be sent. | may be sent without requiring the mod date to be sent. | ||
| Line 487: | Line 468: | ||
| - | ==== Mode ==== | + | === Mode === |
| If the file mode is sent, a single space separates the file mode | If the file mode is sent, a single space separates the file mode | ||
| from the modification date. The file mode is stored as an octal | from the modification date. The file mode is stored as an octal | ||
| Line 498: | Line 479: | ||
| - | ==== Serial Number | + | === Serial Number === |
| If the serial number is sent, a single space separates the | If the serial number is sent, a single space separates the | ||
| serial number from the file mode. The serial number of the | serial number from the file mode. The serial number of the | ||
| Line 506: | Line 487: | ||
| - | ==== Other Fields | + | === Other Fields === |
| YMODEM was designed to allow additional header fields to be | YMODEM was designed to allow additional header fields to be | ||
| added as above without creating compatibility problems with older | added as above without creating compatibility problems with older | ||
| Line 539: | Line 520: | ||
| === Figure 3: YMODEM Batch Transmission Session === | === Figure 3: YMODEM Batch Transmission Session === | ||
| - | | + | |
| - | "sb foo.*< | + | "sb foo.*< |
| - | " | + | " |
| - | C (command: | + | C (command: |
| - | SOH 00 FF foo.c NUL[123] CRC CRC | + | SOH 00 FF foo.c NUL[123] CRC CRC |
| - | ACK | + | ACK |
| - | C | + | C |
| - | SOH 01 FE Data[128] CRC CRC | + | SOH 01 FE Data[128] CRC CRC |
| - | ACK | + | ACK |
| - | SOH 03 FC Data[128] CRC CRC | + | SOH 03 FC Data[128] CRC CRC |
| - | ACK | + | ACK |
| - | SOH 04 FB Data[100] CPMEOF[28] CRC CRC | + | SOH 04 FB Data[100] CPMEOF[28] CRC CRC |
| - | ACK | + | ACK |
| - | EOT | + | EOT |
| - | NAK | + | NAK |
| - | EOT | + | EOT |
| - | ACK | + | ACK |
| - | C | + | C |
| - | SOH 00 FF NUL[128] CRC CRC | + | SOH 00 FF NUL[128] CRC CRC |
| - | ACK | + | ACK |
| === Figure 4: YMODEM Batch Transmission Session-1k Blocks === | === Figure 4: YMODEM Batch Transmission Session-1k Blocks === | ||
| - | | + | |
| - | "sb -k foo.*< | + | "sb -k foo.*< |
| - | " | + | " |
| - | C (command: | + | C (command: |
| - | SOH 00 FF foo.c NUL[123] CRC CRC | + | SOH 00 FF foo.c NUL[123] CRC CRC |
| - | ACK | + | ACK |
| - | C | + | C |
| - | STX 02 FD Data[1024] CRC CRC | + | STX 02 FD Data[1024] CRC CRC |
| - | ACK | + | ACK |
| - | SOH 03 FC Data[128] CRC CRC | + | SOH 03 FC Data[128] CRC CRC |
| - | ACK | + | ACK |
| - | SOH 04 FB Data[100] CPMEOF[28] CRC CRC | + | SOH 04 FB Data[100] CPMEOF[28] CRC CRC |
| - | ACK | + | ACK |
| - | EOT | + | EOT |
| - | NAK | + | NAK |
| - | EOT | + | EOT |
| - | ACK | + | ACK |
| - | C | + | C |
| - | SOH 00 FF NUL[128] CRC CRC | + | SOH 00 FF NUL[128] CRC CRC |
| - | ACK | + | ACK |
| Line 587: | Line 568: | ||
| === Figure 5: YMODEM Filename block transmitted by sz === | === Figure 5: YMODEM Filename block transmitted by sz === | ||
| < | < | ||
| - | -rw-r--r-- | + | |
| - | 00 0100FF62 62637363 6865642E 74787400 | + | |
| - | | + | 10 36333437 20333331 34373432 35313320 |
| - | | + | 20 31303036 34340000 00000000 00000000 |
| - | | + | 30 00000000 00000000 00000000 00000000 |
| - | | + | 40 00000000 00000000 00000000 00000000 |
| - | | + | 50 00000000 00000000 00000000 00000000 |
| - | | + | 60 00000000 00000000 00000000 00000000 |
| - | | + | 70 00000000 00000000 00000000 00000000 |
| - | | + | 80 000000CA 56 |
| </ | </ | ||
| === Figure 6: YMODEM Header Information and Features ==== | === Figure 6: YMODEM Header Information and Features ==== | ||
| Line 660: | Line 641: | ||
| === Figure 7: YMODEM-g Transmission Session ==== | === Figure 7: YMODEM-g Transmission Session ==== | ||
| - | | + | |
| - | "sb foo.*< | + | "sb foo.*< |
| - | " | + | " |
| - | G (command:rb -g) | + | G (command:rb -g) |
| - | SOH 00 FF foo.c NUL[123] CRC CRC | + | SOH 00 FF foo.c NUL[123] CRC CRC |
| - | G | + | G |
| - | SOH 01 FE Data[128] CRC CRC | + | SOH 01 FE Data[128] CRC CRC |
| - | STX 02 FD Data[1024] CRC CRC | + | STX 02 FD Data[1024] CRC CRC |
| - | SOH 03 FC Data[128] CRC CRC | + | SOH 03 FC Data[128] CRC CRC |
| - | SOH 04 FB Data[100] CPMEOF[28] CRC CRC | + | SOH 04 FB Data[100] CPMEOF[28] CRC CRC |
| - | EOT | + | EOT |
| - | ACK | + | ACK |
| - | G | + | G |
| - | SOH 00 FF NUL[128] CRC CRC | + | SOH 00 FF NUL[128] CRC CRC |
| Line 881: | Line 862: | ||
| ===Figure 11: Example of CRC Calculation written in C === | ===Figure 11: Example of CRC Calculation written in C === | ||
| - | | + | The following XMODEM crc routine is taken from " |
| - | the source code for these programs (contained in RZSZ.ZOO) for usage. | + | the source code for these programs (contained in RZSZ.ZOO) for usage. |
| - | fast table driven version is also included in this file. | + | fast table driven version is also included in this file. |
| < | < | ||
| /* update CRC */ | /* update CRC */ | ||
| Line 1066: | Line 1048: | ||
| - | ==== REVISIONS | + | ===== Revisions ===== |
| - | * 10-27-87 Optional fields added for number of files remaining to be sent and total number of bytes remaining to be sent. | + | === 10-27-87 |
| - | | + | Optional fields added for number of files remaining to be sent and total number of bytes remaining to be sent. |
| - | | + | === 10-18-87 |
| - | | + | Flow control discussion added to 1024 byte block descritpion, |
| - | | + | === 8-03-87 |
| - | * The April 15 1986 edition | + | Revised for clarity. |
| - | | + | === 5-31-1987 |
| + | emphasizes minimum requirements for YMODEM, and updates information on accessing files. | ||
| + | === 9-11-1986 | ||
| + | clarifies nomenclature and some minor points. | ||
| + | === 4-15-1986 === | ||
| + | clarifies some points concerning CRC calculations and spaces in the header. | ||