srec_fairchild(5)
๐ srec_fairchild โ Fairchild Fairbug file format ๐
okay bestie, so this is the srec_fairchild page from the File Formats Manual โ it's literally all about the Fairchild Fairbug file format and I promise it's not as scary as it sounds ๐ซถ
โจ DESCRIPTION โจ
so the Fairchild Fairbug format is iconic in the simplest way possible: it's all about 8-byte records ๐ Your file kicks off with an address record and wraps up with an end-of-file record. that's the whole vibe check โ beginning, middle, end, slay.
ngl there are exactly three record types in this format, and here's the tea on each one ๐
๐ฆ the address record
address records look like this, periodt:
โโโโโฌโโโโโโโ
โ S โ nnnn โ
โโโโโดโโโโโโโ
and what it's giving is: the address for the data records that come after it. it's setting the stage, main character energy fr fr ๐
๐ธ the data record
data records are built like this:
โโโโโฌโโโโโโโโโโโโโโโโโโโฌโโโโ
โ X โ ffffffffffffffff โ c โ
โโโโโดโโโโโโโโโโโโโโโโโโโดโโโโ
okay so every single data record begins with an X and always contains 8 data bytes โ no more, no less, she does not budge ๐ค
- the
ffcharacters are hexadecimal byte values (all 8 bytes of them) - every data byte is written out as 2 hexadecimal characters
- and
cis a hex digit that's the nibble-sum of the data bytes ๐งฎ
so yeah โ a 1-digit hexadecimal checksum follows the data in each data record. and what that checksum actually is? it's, in hexadecimal notation, the sum of the binary equivalents of the 16 digits in the record. and the half carry from the fourth bit is ignored โ like, just let it go bestie, we don't need it ๐
okay this next part is lowkey a fun little quirk: the programmer ignores any character between a checksum and the start character of the next data record ๐ The only exceptions? address characters and the asterisk character, which terminates the data transfer. so that dead space in between? it's free real estate โ you can literally drop comments in there and nobody cares ๐
๐ง the end-of-file record
the last record is just this:
โโโโโ
โ * โ
โโโโโ
an asterisk and nothing else โญ and that's it, that's the whole goodbye โ it means end of file, curtain down, thank you for coming to my TED talk ๐
๐ Size Multiplier
okay so real talk โ this format is not exactly compact ๐ญ In general, binary data will expand in size by approximately 2.4 times when it's represented with this format. so like... she's pretty, but she is not efficient. know that going in ๐
๐ EXAMPLE ๐
here's a whole Fairchild Fairbug file, look at her go ๐
It contains the data โHello, World[rq] to be loaded at address 0x1000. and notice how the last record is padded with 0xFF bytes โ yes, she's padding, it's fine, it's aesthetic โจ
S1000
X48656C6C6F2C2057C
X6F726C64210AFFFF3
*
see how the S1000 sets the address, the two X records carry the bytes, and that lonely * closes it out? chef's kiss, ate, no crumbs ๐ซถ
๐ COPYRIGHT ๐
okay the legal bit, but make it cute โ I still have to say all of it, so here we go:
srec_catversion 1.65- Copyright (C) 1998... Peter Miller
and ngl this part matters: The srec_cat program comes with ABSOLUTELY NO WARRANTY โ for details use the srec_cat -VERSion License command. This is free software and you are welcome to redistribute it under certain conditions; for details use the srec_cat -VERSion License command. (yes, same command twice โ I don't make the rules, I just report them ๐
)
๐ MAINTAINER ๐
the people keeping this whole operation running, give them their flowers ๐ธ
- Scott Finneran โ E-Mail:
scottfinneran@yahoo.com.au - Peter Miller โ E-Mail:
pmiller@opensource.org.au
bestie reminder: every record is 8 bytes, every data record starts withXand holds exactly 8 data bytes, the checksum is that 1-digit nibble-sum (half carry from the fourth bit, ignored, gone, bye ๐), the*ends everything, and your file is gonna be about 2.4ร bigger than the binary. that's the whole page, you're basically an expert now ๐ญ๐
and that's the page, bestie โ from the Reference Manual for SRecord, this very srec_fairchild(5) entry. mwah, go forth and encode ๐โจ
๐ฆ where this page comes from
- opensuse-leap 16.0: srecord 1.65.0-bp160.1.12 ยท GPL-3.0-or-later
- opensuse-leap 16.0: srecord 1.65.0-bp160.1.12 ยท GPL-3.0-or-later
- opensuse-leap 16.0: srecord 1.65.0-bp160.1.12 ยท GPL-3.0-or-later
- opensuse-leap 16.0: srecord 1.65.0-bp160.1.12 ยท GPL-3.0-or-later
- Copyright (C) 2003, 2006-2009 Peter Miller
- Copyright (C) 1998, 2006-2009, 2014 Peter Miller
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms