Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
XMODEM
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Packet structure== The original XMODEM used a 128-byte data packet, the [[Block (data storage)|block size]] used on [[CP/M]] [[floppy disk]]s. The packet was prefixed by a simple 3-byte header containing a <kbd><[[C0 and C1 control codes|SOH]]></kbd> character, a "block number" from 1-255, and the "inverse" block numberβ255 minus the block number. Block numbering starts with 1 for the first block sent, not 0. The header was followed by the 128 bytes of data, and then a single-byte [[checksum]]. The checksum was the sum of all 128 data bytes in the packet [[modulo operation|modulo]] 256. The complete packet was thus 132 bytes long, containing 128 bytes of [[Payload (computing)|payload data]], for a total [[channel efficiency]] of about 97%. The file was marked "complete" with a <kbd><[[End-of-transmission character|EOT]]></kbd> character sent after the last block. This character was not in a packet, but sent alone as a single byte. Since the file length was not sent as part of the protocol, the last packet was padded out with a "known character" that could be dropped. In the original specification, this defaulted to <kbd><nowiki><SUB></nowiki></kbd> or 26 decimal, which CP/M used as the end-of-file marker inside its own disk format. The standard suggested any character could be used for padding, but there was no way for it to be changed ''within the protocol'' itself β if an implementation changed the padding character, only clients using the same implementation would correctly interpret the new padding character.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)