-
Notifications
You must be signed in to change notification settings - Fork 13
Word formats
How 36-bit words are stored in octets.
FTP has an option to transfer files in binary image mode. In this mode, words are transferred most significant bit first, densely packed. The only padding is at the end of the file, if necessary.
Five characters from a 36-bit word are stored right-justified in five octets. The remaining bit (PDP-10 bit 35) is stored in the most significant bit of the last octet.
This is a complex encoding that preserves readability of ASCII text and also converts line endings and some Lisp machine characters.
One 36-bit word is stored as six frames. Each frame holds six bits from the word, justified to the right. The most significant bit in the frame is 1. When reading, frames with most significant bit clear are ignored.
36-bit words are stored as 18-bit half words, most significant first. Each half word is stored as four octets in little endian order. DECtape blocks are 256 18-bit words, stored contiguously with no padding or metadata. (Except PDP-8 DECtapes, but that's outside the scope of this repository.)