Autosite_Users_Manual - 第128页

Trans lati on Form ats B-30 AutoSite User Manual Problem: Find the address for the first data byte for the followi ng file. : 02 000 0 02 1230 BA : 10 004 5 00 55AA FF.....BC Solution: Step 1. Find the record address for…

100%1 / 175
Translation Formats
AutoSite User Manual B-29
Intel MCS-86 Hexadecimal Object, Code 88
The Intel 16-bit Hexadecimal Object file record format has a 9-character
(4-field) prefix that defines the start of record, byte count, load address,
and record type and a 2-character checksum suffix. Figure B-15 shows a
sample record of this format.
The four record types are described below.
Figure B-15
An Example of Intel MCS-86 Hex Object
00-Data Record
This begins with the colon start character, which is followed by the byte
count (in hex notation), the address of the first data byte, and the record
type (equal to 00). Following these are the data bytes. The checksum
follows the data bytes and is the two’s complement (in binary) of the
preceding bytes in the record, including the byte count, address, record
type, and data bytes.
01-End Record
This end-of-file record also begins with the colon start character. This is
followed by the byte count (equal to 00), the address (equal to 0000), the
record type (equal to 01), and the checksum, FF.
02-Extended Segment
Address Record
This is added to the offset to determine the absolute destination address.
The address field for this record must contain ASCII zeros (Hex 30s).
This record type defines bits 4 to 19 of the segment base address. It can
appear randomly anywhere within the object file and affects the
absolute memory address of subsequent data records in the file. The
following example illustrates how the extended segment address is used
to determine a byte address.
:10000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00
:10001000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0
:10002000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0
:10003000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD0
:10004000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0
:00000001FF
Data
Records
Byte Count
Checksum
Record Type
End-of-File Record
Address
Start Character
0087-4
LEGEND
Nonprinting Carriage Return, line feed, and nulls determined by null count
:020000020000FC
Extended Record
Offset Address
Checksum
Checksum
Translation Formats
B-30 AutoSite User Manual
Problem:
Find the address for the first data byte for the following file.
: 02 0000 02 1230 BA
: 10 0045 00 55AA FF.....BC
Solution:
Step 1. Find the record address for the byte. The first data byte is 55.
Its record address is 0045 from above.
Step 2. Find the offset address. The offset address is 1230 from
above.
Step 3. Shift the offset address one place left, then add it to the
record address, as shown below:
1234
Offset address (upper 16 bits)
+ 0045
Record address (lower 16 bits)
12345
20-bit address
The address for the first data byte is
12345
.
Note: Always specify the address offset when using this format, even when the
offset is zero.
During output translation, the firmware will force the record size to 16
(decimal) if the record size is specified greater than 16. There is no such
limitation for record sizes specified less than 16.
03-Start Record
This record type is not sent during output by Data I/O translator
firmware.
Translation Formats
AutoSite User Manual B-31
Hewlett-Packard 64000 Absolute Format, Code 89
Hewlett-Packard Absolute is a binary format with control and
data-checking characters. See Figure B-16.
Data files begin with a Start-of-file record, which includes the Data Bus
Width, Data Width Base, Transfer Address, and a checksum of the bytes
in the record.
Figure B-16
An Example of HP 64000 Absolute Format
End-of-File record consists only of a word count of 0.
Checksum
Data bytes
Address where following data byte is to be stored.
BYTE COUNT — number of 8-bit data bytes.
WORD COUNT — number of 16-bit words in record except checksum and itself.
CHECKSUM — modulo 256 sum of all bytes in the record except the first byte.
TRANSFER ADDRESS — for microprocessor program counter.
DATA WIDTH BASE — see text.
DATA BUS WIDTH — see text.
WORD COUNT — number of 16-bit words in the record; always 04 in
Start-of-File record.
Note:
START-OF-FILE
RECORD
ONE DATA
RECORD
END-OF-FILE
RECORD
0088-2
HIGH
ORDER
LOW
ORDER
Third Byte
MSB
LSB
Second Byte
32-bit address
is sent in this
manner, in 4
groups of 8-bit
bytes.
This format is binary. Therefore, no ASCII control characters
or carriage returns and line feeds are allowed.