ASM Programming with HP50g
|
05-09-2021, 04:12 PM
Post: #10
|
|||
|
|||
RE: ASM Programming with HP50g
Looks like both, actually. The resulting instruction seems like a bug in MASD, but what you're trying to do will not work even without that bug - the compiler cannot know at what address TEXT will end up, so you'll have to write position-independent code. That usually means relative addressing, i.e. adding the program counter and a difference between labels together, instead of loading a constant that will go invalid when the code and its attached data is moved somewhere else.
If you wonder why branching to labels does work, internally those are relative already. If you look closely at the hex-encoded instructions, you can actually spot it. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)