gnupic: HEX file output & more
Subject:
HEX file output & more
From:
Rick Mann ####@####.####
Date:
29 Sep 2002 22:26:45 -0000
Message-Id: <B9BCCBAA.D8C6%rmann@latencyzero.com>
I'm having lots of trouble with my development process, but I've noticed one
part that I'd like to get answered here.
When gpasm outputs the hex file for the following code:
0000 00083 org 0x000
0000 2821 00084 goto Start
00085
0004 00090 org 0x004
0004 00A1 M movwf WBuffer
0005 0EA1 M swapf WBuffer,F
0006 0E03 M swapf STATUS,W
0007 00A0 M movwf StatBuffer
00091 push
0008 2053 00092 call ServiceInterrupts
0009 0E20 M swapf StatBuffer,W
000A 0083 M movwf STATUS
000B 0E21 M swapf WBuffer,W
00093 pop
000C 0009 00094 retfie
I get the following from the hex file (formatted for readability):
:02 0000 00 2128 B5
:08 0008 00 A100 A10E 030E A000 EF
:10 0010 00 5320 200E 8300 210E 0900 0739 8207 0034 87
Notice that the code at org 0x004 ends up at offset 0x0008 in the hex file.
Interestingly, when I load this file into the Warp-13 programmer driver, it
shows the code in the proper place (not sure how it figures that out).
Is this correct? It seems to me that it's not. Scott (or anyone else), any
ideas?
TIA,
--
Rick