There were few hardcoded numbers in "#0xNN" notation in the gen.c
Assemblers other than asxxxx consider them as errors.
Solution: replaced using !immedbyte/!immedword.
But I have not idea what to do with commands that can use negative numbers like
int d = (stack < 127 ? -stack : -127);
emit2 ("add sp, #%d", d);
both !immedbyte and !immedword are replaced with 32-bit long number when parameter is negative:
emit2("add sp, !immedbyte", -15) give us "add sp, #0xFFFFFFF1"
Is this a bug?
Implemented for all "#0x" in revision #7917.
Keeping it open for the other #-prefixed stuff.
The !immedword substitution was applied in revision #7919. AFAIk there currently is no mechanism like this for negative numbers.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.