As you can see, the 0xFFFFFFFF that was passed in with -definelabel was sign-extended from 32-bit to 64-bit. Whereas the ones defined with .definelabel and : were not.
We can also see this when we change all the label values to 0x1122334455667788, which will result in the following symfile:
Though this somehow produces 0xFFFFFFFF55667788 and not just 0x55667788. It seems like any value at least 0x80000000 is just sign-extended anyway.
This is kind of annoying, since having such a 64-bit label in your symfile when you didn't intend to will cause No$gba to throw a Symbolic Info File Corrupt error and refuse to run the ROM.
Ideally all three of these methods would behave the same way.
A workaround is to use -equ testlabel 0xFFFFFFFF instead.
Given the following
test.asm
:Assembled with:
Produces a
test.sym
with:As you can see, the 0xFFFFFFFF that was passed in with
-definelabel
was sign-extended from 32-bit to 64-bit. Whereas the ones defined with.definelabel
and:
were not.We can also see this when we change all the label values to
0x1122334455667788
, which will result in the following symfile:Though this somehow produces
0xFFFFFFFF55667788
and not just0x55667788
. It seems like any value at least0x80000000
is just sign-extended anyway.This is kind of annoying, since having such a 64-bit label in your symfile when you didn't intend to will cause No$gba to throw a
Symbolic Info File Corrupt
error and refuse to run the ROM.Ideally all three of these methods would behave the same way.
A workaround is to use
-equ testlabel 0xFFFFFFFF
instead.