example:
:1000830002243BE5C754F84401F5C7790122000077
- Start code, one character, an ASCII colon ':'.
- Byte count, two hex digits
- Address, four hex digits
- Record type (see record types below), two hex digits, 00 to 05
- Data
- Checksum, two hex digits
Hex code | Record type | Description | Example |
---|---|---|---|
00 | Data | Contains data and a 16-bit starting address for the data. The byte count specifies number of data bytes in the record. The example shown to the right has 0B (decimal 11) data bytes (61, 64, 64, 72, 65, 73, 73, 20, 67, 61, 70) located at consecutive addresses beginning at address 0010. | :0B0010006164647265737320676170A7 |
01 | End Of File | Must occur exactly once per file in the last line of the file. The data field is empty (thus byte count is 00) and the address field is typically 0000. | :00000001FF |
02 | Extended Segment Address | The data field contains a 16-bit segment base address (thus byte count is 02) compatible with 80x86 real mode addressing. The address field (typically 0000) is ignored. The segment address from the most recent 02 record is multiplied by 16 and added to each subsequent data record address to form the physical starting address for the data. This allows addressing up to one megabyte of address space. | :020000021200EA |
03 | Start Segment Address | For 80x86 processors, specifies the initial content of the CS:IP registers. The address field is 0000, the byte count is 04, the first two bytes are the CS value, the latter two are the IP value. | :0400000300003800C1 |
04 | Extended Linear Address | Allows for 32 bit addressing (up to 4GiB). The address field is ignored (typically 0000) and the byte count is always02. The two encoded, big endian data bytes specify the upper 16 bits of the 32 bit absolute address for all subsequent type 00 records; these upper address bits apply until the next 04 record. If no type 04 record precedes a 00 record, the upper 16 address bits default to 0000. The absolute address for a type 00 record is formed by combining the upper 16 address bits of the most recent 04 record with the low 16 address bits of the 00 record. | :02000004FFFFFC |
05 | Start Linear Address | The address field is 0000 (not used) and the byte count is 04. The four data bytes represent the 32-bit value loaded into the EIP register of the 80386 and higher CPU. | :04000005000000CD2A |
沒有留言:
張貼留言