S5U1C62000A MANUAL EPSON 109
(S1C60/62 FAMILY ASSEMBLER PACKAGE)
CHAPTER 7: HEX CONVERTER
7.5.3 Motorola-S Format
The hex converter converts an absolute object file in the IEEE-695 format into the Motorola-S2 format files
when the -m option is specified.
The high-order data file is generated with an extension ".hsa", and the low-order data file is generated
with an extension ".lsa".
The following shows a sample data in Motorola-S2 format:
S224000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB
S224000020FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDB
:
S22400010008E000F04200420606FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF89
:
S804000000FB
lengthaddress data sum
S2 (2 bytes): Indicates that the line is a data record.
S8 (2 bytes): Indicates that the line is an end record (end of data).
length (1 byte): Indicates the record length of "address + data + sum". The maximum length of a
data record is 0x24, while the end record is fixed at 0x04.
address (3 bytes): Indicates the address where the head data in a record is placed.
data (36 bytes max.): The object codes are placed here. This is not included in the end record.
sum (1 byte): This is a checksum (1's complement) from "length" to the last data.
The end records are always "S804000000FB".

Note: When using hex files for creating the mask data, do not specify Motorola-S format because the the

mask data checker does not support this format.

7.5.4 Conversion Range
By default, the hex converter generates the hex files that include all the codes of the ROM area available
for each model. Data for unused addresses are delivered as 0xff. For example, if the model has a built-in
2KB ROM and the program uses the area from address 0x0 to address 0x6ff, the hex converter fills the
area from address 0x700 to address 0x7ff with 0xff. If there are unused addresses in the range from 0x0 to
0x6ff, those data are also delivered as 0xff.
When creating the mask data by the mask data checker provided for each model, the hex files must be
generated in this format.
When the -b option is specified, the hex converter does not deliver data in unused addresses of the
absolute object file. This allows minimization of the output hex files. Note, however that the hex files
generated in this format cannot be used for creating the mask data.