Kermit was developed at Columbia University in 1981 as a way to connect to many different computer systems.
Kermit represents all of its data using the 95 printable ASCII characters (32 - 126).
It does this using 3 different encodings:
Numbers (integers) are encoded as a single ASCII character by adding a space (32) to the value
The largest number that can be encoded is 94, which corresponds to ASCII character 126 (~).
Control characters are converted to printable characters by toggling bit 6, which is the same as taking the exclusive-OR with 40H.
e.g. Control-A (01H) is mapped to A (41H) DEL (7FH) is mapped to ? (3FH)
"Prefix encoding" is used for file data, in 3 steps:
Sequences of the same repeated byte are condensed into a repeat prefix (usually ~) followed by the repeat count offset by 32, followed by the encoding of the repeated character.
e.g. The sequence AAAAA is encoded as ~%A
If the channel does not pass all 8 bits, values greater than 127 are encoded with an 8-bit prefix (usually &), and the character is reduced by 128 (80H).
e.g. The sequence of five copies of character C1H is encoded as ~%&A
Any control character is encoded with a control prefix (usually #) and then converted to a printable character by toggling (XOR-ing) bit six (40H).
e.g. The sequence of five copies of character 81H is encoded as ~%&#A
Back to the COMP642 Page