34
edits
Line 178: | Line 178: | ||
In this example, it can be seen that the identifier section ( preamble ) is very similar to the format of the Sector Header identifier section. The same routines read both in the Interface 1 ROM. | In this example, it can be seen that the identifier section ( preamble ) is very similar to the format of the Sector Header identifier section. The same routines read both in the Interface 1 ROM. Also, as with the Sector Header, the first 12 bytes are synchronisation pulses. | ||
Line 185: | Line 185: | ||
| Offset || Example Byte || Significance | | Offset || Example Byte || Significance | ||
|- | |- | ||
| 00H || | | 00H || 0x04 || This is the RECFLG byte. Bit2 signifies that the sector is in use. If it was the final sector in the record, then it would be 0x06, as Bit1 signifies that it is the final record. (EOF) | ||
|- | |- | ||
| 01H || | | 01H || 0x00 || Record Segment 0x00. Segments count from 0x00 to 0xFF. | ||
|- | |- | ||
| 02H || | | 02H-03H || 0x00, 0x02 || Record length. Will always be 0x0200H unless the RECFLG is 0x06. Number of bytes to read. | ||
|- | |- | ||
| | | 04H-0DH || 0x53, 0x65, 0x71, 0x75, 0x65, 0x6E, 0x74, 0x69, 0x61, 0x6c || The filename, in this case, "Sequential". It was generated with ''SAVE *"M";1;"Sequential" CODE 40000,512'' | ||
|- | |- | ||
| | | 0EH || 0x25 || The Header Checksum. | ||
|- | |- | ||
| | |} | ||
Additionally, it can be seen that the Data Stream then begins with; 0x03, 0x00, 0x02, 0x40, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF before the data that was saved (ie, 0x00, 0x01, 0x02, 0x03... ) is saved. | |||
This is the file header and can only be found in Record 0 for any file, and is always 9 bytes long. It has the following meanings. | |||
{| class="wikitable" style="text-align: center;" | |||
|- | |||
| Offset || Example Byte || Significance | |||
|- | |||
| 00H || 0x03 || File Type. 00=Basic Program, 01=Numeric Array, 02=Character Array, 03=CODE Function. | |||
|- | |||
| 01H-02H || 0x00, 0x02H || Record Length 0x0200H bytes ( 512 Bytes ) | |||
|- | |||
| 03H-04H || 0x40, 0x09C || Place to load this in memory ( Place it was saved from ) | |||
|- | |||
| 05H-08H || 0xFF, 0xFF, 0xFF, 0xFF || Unusued at this time. Reserved. | |||
|- | |- | ||
|} | |} |
edits