Here is the format of a tape block:
| Offset | Field | Size | Description |
|---|---|---|---|
| 0 | Sync Byte | 1 byte | Always $00. Acts as a lead-in marker before the length. |
| 1 | Block Length | 2 bytes | Little Endian (Lo, Hi). Specifies the number of payload data bytes. |
| 3 | Data | <Block Length> | The actual payload data. |
| 3 + Length | Block Type | 1 byte | Bit 7: First block flag Bit 6: Last block flag Bits 0-5: Sequence number |
| 4 + Length | Checksum | 2 bytes | Sum of Block Length + Data + Block Type + $3B. |
| 6 + Length | Trailer (Zeros) | 9 bytes | Nine consecutive $00 bytes marking the end of the block. |
| Offset | Field | Size | Description |
| 0 | Sync Byte | 1 byte | Always $00. Acts as a lead-in marker before the length. |
| 1 | Block Length | 2 bytes | Little Endian (Lo, Hi). Specifies the number of data bytes. |
| 3 | Data | <Block Length> | The actual payload data. |
| 3 + Length | Block Type | 1 byte | Bit 7: First block flag Bit 6: Last block flag Bits 0-5: Sequence number |
| 4 + Length | Checksum | 2 bytes | Sum of Block Length + Data + Block Type + $3B. |
| 6 + Length | Trailer (Zeros) | 9 bytes | Nine consecutive $00 bytes marking the end of the block. |