SREC (file format)

It is commonly used for programming flash memory in microcontrollers, EPROMs, EEPROMs, and other types of programmable logic devices.

The HEX file is then imported by a programmer to write the machine code into non-volatile memory, or is transferred to the target system for loading and execution.

Software development tools for that and other embedded processors would make executable code and data in the S-record format.

Programs that create HEX records typically use line termination characters that conform to the conventions of their operating systems.

A manual page from historic Unix O/S documentation states: "An S-record file consists of a sequence of specially formatted ASCII character strings.

Additional buffer space may be required to hold up to two control characters (carriage return and/or line feed), and/or a NUL (0x00) string terminator for C/C++ programming languages.

All EPROM programmers should have sufficiently large line buffers to cope with records this big.

If the 32 byte historical limit is ignored, then the maximum amount of data varies depending on the size of the address field (4 / 6 / 8).