> Would someone please be able to explain to me how the addressing in > the hex file created after a compile for PIC16XXX works ? > Is this load offset a relative offset or absolute address and does it > read MSB first ? I assume you mean the address field within the data record. ie. The x's in :10xxxx00830100308A00ED28FF0003088301E70028 :10xxxx000A08E8008A017108EC007208ED00730814 The address field is relative to an offset given in a '02' record type. If there isn't a '02' record (usually only seen where the file >64k) it is assumed to be 0 (making the address absolute). Since the data is in bytes (as far as the hex file is concerned) the address is also in bytes, but the PIC uses two hexfile bytes to specify one 16 (14) bit word. That means that the instruction address in the PIC is half of the address value in the hexfile data record. ====================================================== Steve Baldwin Electronic Product Design TLA Microsystems Ltd Microcontroller Specialists PO Box 15-680, New Lynn http://www.tla.co.nz Auckland, New Zealand ph +64 9 820-2221 email: steveb@tla.co.nz fax +64 9 820-1929 ====================================================== -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu