Arakula / A09

A09 6800/6801/6809/6309/68HC11 Assembler
GNU General Public License v2.0
40 stars 8 forks source link

Last commit breaks FILCHR #13

Closed AR1972 closed 1 year ago

AR1972 commented 1 year ago

I'm using "FILCHR TEXT $3F" in my project, last commit always uses 0x00 as the FILCHR adding this hack to settext() returns previous behavior.

if (memcmp(namebuf, "FILCHR", 6) != 0) { / to keep texts separate from the normal labels' way, prepend them with & / if (namebuf != '&') { sprintf(iname, "&%.s", (int)(sizeof(iname) - 2), namebuf); namebuf = iname; } }

mickecamino commented 1 year ago

I can confirm this. I spent about one hour trying to compile my code with fill character $FF, nothing worked. After patching with the above code it works if I enter "FILCHR TEXT $FF" in the the code I try to compile. It will however not work if I try to add -dFILCHR=$FF to the command line

Arakula commented 1 year ago

OK, I got some time now to look at it. You're right, the last commit introduced a problem here. I won't include your solution above, however; the better solution (both for space and execution time) is to change if (!strcmp(namebuf, "FILCHR")) /* special for FILCHR : set internal */ (some lines down from your fix) to if (!strcmp(namebuf, "&FILCHR")) /* special for FILCHR : set internal */ ... that's what the next version (due maybe today, maybe tomorrow) will contain. It will create a little clash with your solution, however, so watch out.

Arakula commented 1 year ago

Oh, wait a moment ... that's what your pull request does anyway. So, no clash, all good :grin:

Arakula commented 1 year ago

OK, that should be fixed.