DS80C400 C Libraries: TBIN File Format
A TBIN file is made up of multiple TBIN records, terminated by the end-of-file.
[ TBIN Record ]
[ TBIN Record ]
[ ... ]
[ TBIN Record ]
[ end of file ]
A TBIN record has 3 bytes of starting address, 2 bytes of (length-1), [length] bytes
of data, and 2 bytes of CRC16. Therefore, a TBIN record can carry a maximum of
64Kbytes of data to load, plus its 7 bytes of overhead.
[ A_low ][ A_high ][ A_xhigh ]
[ L_low ][ L_high ]
[ D1 D2 D3 ... D(L+1) ]
[ CRC_low ][ CRC_high ]
For example...
- If a TBIN record is to be loaded at address 000000h,
| A_low | = | 00h |
| A_high | = | 00h |
| A_xhigh | = | 00h |
- If a TBIN record is to be loaded at address 010203h,
| A_low | = | 03h |
| A_high | = | 02h |
| A_xhigh | = | 01h |
- If a TBIN record contains 5 bytes of data to load,
- If a TBIN record contains 0508h bytes of data to load,
- If a TBIN record contains 65536 bytes of data to load,
- If a TBIN record contains a single byte to load,