How do you understand the Hex file? (Extended Address Record)

I am trying to make a bootloader for PIC18, so I need to understand how to handle the hex file correctly. For example, I understand what to do with the next hexadecimal string.

:040C0000E2EFFFF030

04: number of bytes

0C00: address of hexadecimal digits

00: data records

E2EFFFF0: Data Sequence

30: Check sum

so I would know what to do with the specified string, but what about the next hexadecimal string.

:020000040001F9

02: number of bytes

0000: The address

04: Extended line address entry

0001: data

F9: Check sum

But what exactly am I doing with him? Am I writing this data at this address? Can you translate it into machine language?

By the way, my application program starts with an address 0C00, and the bootloader starts with an address 0020, and above it is an interrupt vector. Thank you

Update

, FFC0?

:10FFC000FF00FF00FF00FF00FF00FF000001E9EF5E

, 04 (Extended Linear Address Record), 0001 FFC0, .

$0001 + $FFC0 1FFC0, 3 1FFC0, ?

+4
1

wikipedia Intel Hex ( )

04, Extended Linear Address Record, 32- ( 4 ). 0000, 02. ( ) 16 32- 00, 04. 04, 16 - 0000. 00, , 04 00 .

, (linAddr <<16) + addr ($ 0001 < 16) + $FFC0

02/Extended Segment Address Record,
(segAddr << 4) + addr

+3

All Articles