S?? record format

Nick Webb nwebb at auco.com
Fri Apr 24 19:48:35 GMT 1998


>Here's a sample:
>S123000F323530303030305A3833332E3333333333452D31305A34323934393637323936
>0A
>S104002F5A72
>S105FFFEF80005
>S105FFFCF80007
>S105FFFAF80009
>S123F8008E00FFCE000FBDF8B2BDFB8BCE0017BDF8B2BDFA45BDFB8BCE0025BDF8B2BDFA
>34
>S123F820459600C68010970016862010970ADE019603C600048F048F24028B807A000A26
>50
>S123F840F3DF0BDD0DCE10001C00F81C07FF1C093F86058D5286008D45DC0B8D4ADC0D8D
>6F

By way of explanation, there are three forms of S record formats (that I'm
aware of). There's S1/9, S2/8 and S3/7. The difference between the three is
in the size of the address field: for S1/9 it's 2 bytes, S2/8 is 3 bytes
and S3/7 is 4 bytes. Here's how the format breaks down:

S1	Leadin marking it as S record and the size of the address field
nn	Number of bytes (hex) for the rest of the record - i.e. expect 2*nn
characters and nn-3 data bytes in the rest of record
aaaa	Address for the first data byte in this record
xx	Pairs of ASCII hex digits for each data byte
cc	Last two digits are the twos compliment checksum based on a modulo 256
hex addition of all the bytes in the record including the count and address
fields (i.e. add all the bytes, take the low order two digits and subtract
from FF).

The reason for calling this S1/9 rather than just S1 is that the S9 record
is optional, but if provided it is by convention the last record in the
group and defines the start address of the code that's been downloaded.
Naturally this won't be useful for an S record file for a PROM blower - it
will be ignored if it's provided.

The .S16 extension is probably the S1/9 format as that has the 16 bit
address field (4 digits), it's not the same as .BIN (binary) or .HEX (Intel
hex).
Cheers,
Nick Webb





More information about the Diy_efi mailing list