Appendix R
R.1 ASYNC PROTOCOL
R.1 Data Block
Async transmits data in 133-byte blocks with headers and trailers
as follows. All byte values are in hexadecimal.
_______________________________________________________________
| header | block # | block # | 128 data bytes | checksum | NAK |
| byte | 1 to FFh| XOR FFh | | | |
| 01h | then | | | | 15h |
| | 0 to FFh| | | | |
|________|_________|_________|________________|__________|______|
Notes:
1. The first byte in the block is a header byte. A value of
01h indicates that this block is a data block.
2. The second byte in the block is the block number which is 1
for the first block transmitted, 2 for the second block,
etc. When the value passes FFh the block numbers start
again at zero.
3. The third byte is the value of block number exclusive-or'd
with FFh. This provides a check on the integrity of the
block number.
4. Following the third byte is 128 bytes of data.
5. Following the data is a checksum byte. The checksum is
formed by taking the algebraic sum of all the data bytes,
any carry or overflow is discarded.
6. The last byte in the block is the NAK character (15h).
7. The receiver commences by sending NAK characters. When the
transmitter receives a NAK character it starts transmitting.
8. The receiver responds with the following single characters:
ACK (06h) - block received correctly
NAK (15h) - incorrect frame, checksum not correct
CAN (18h) - receiver wishes to abort
9. The transmitter may send the following single characters:
CAN (18h) - abort
EOT (04h) - end of transmission
R.2 File Name Transmission Blocks
Multiple files may be transmitted by the sender, in which case
the data is preceded by a file name block.
There are two types of file name blocks:
1. Block containing a file name.
_______________________________________________________
| header | file name | file name | checksum | EOT |
| byte | indicator | | on file | |
| | | 8-byte name plus| name | |
| 02h | 24h | 3-byte extension| 1 byte | 04h |
|________|___________|_________________|__________|_____|
2. Block indicating no more files.
______________________________
| header | no-more-files | EOT |
| byte | byte | |
| | | |
| 02h | 25h | 04h |
|________|_______________|_____|
Notes:
1. A header byte of 02h indicates a file name block.
2. The second byte has the value 24h if the block contains a
file name or the value 25h if there are no more files names
to come.
3. The file name is an 11-byte string containing 8 bytes for
the file name (packed with spaces if necessary) and 3 bytes
for the extension.
4. The checksum is on the 11-byte file name.
5. The last byte is the EOT character (04h).
Last revision 29/01/2005