Motorola S-Record File Format (8-bit Systems Only)


The Motorola S-Record File Format is a printable ASCII format consisting of an optional header record, and one or more data records followed by an end of file record. Data records may appear in any order. Values are represented as 2 or 4 hexadecimal digit values.

Record Format:
 

SNLLAAAADDDD......DDDDCC
S
N

LL
AAAA
DD
CC

Start of record mark (letter S).
Record type field. 0 for header, 1 for data, 9 for end of record. All other record types are ignored in 8-bit systems. 
Length field. Number of bytes to follow.
Address field. Address of first byte.
Data field.
Checksum field. One's complement of the length, address and data fields modulo 256 minus 1. 

Example:

S0030000FC
S1090100010203040506E0
S9030000FC

The first line in the above example Motorola S-Record header record. The second line is a data record addressed at location 100 with data values 1 to 6. The third line is the end of file record.