Post Reply 
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.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
ASM Programming with HP50g - Helge P - 12-04-2020, 01:18 PM
RE: ASM Programming with HP50g - hth - 12-04-2020, 07:49 PM
RE: ASM Programming with HP50g - 3298 - 12-05-2020, 12:24 PM
RE: ASM Programming with HP50g - Helge P - 12-07-2020, 10:38 AM
RE: ASM Programming with HP50g - 3298 - 12-08-2020, 02:38 PM
RE: ASM Programming with HP50g - Helge P - 12-10-2020, 09:13 PM
RE: ASM Programming with HP50g - ijabbott - 12-13-2020, 12:38 PM
RE: ASM Programming with HP50g - Helge P - 05-09-2021, 02:55 PM
RE: ASM Programming with HP50g - 3298 - 05-09-2021 04:12 PM
RE: ASM Programming with HP50g - Helge P - 05-09-2021, 05:04 PM
RE: ASM Programming with HP50g - 3298 - 05-09-2021, 05:51 PM
RE: ASM Programming with HP50g - Helge P - 05-10-2021, 04:59 PM
RE: ASM Programming with HP50g - 3298 - 05-10-2021, 06:24 PM
RE: ASM Programming with HP50g - Helge P - 05-19-2021, 05:40 PM
RE: ASM Programming with HP50g - TRS80 - 11-16-2023, 10:55 AM
RE: ASM Programming with HP50g - TRS80 - 11-27-2023, 11:27 AM
RE: ASM Programming with HP50g - 3298 - 11-27-2023, 08:16 PM



User(s) browsing this thread: 1 Guest(s)