Open breakmit-0 opened 3 years ago
This is a funny one. Didn't know structs did weird stuff with label names.
Wonder what the correct behavior here should be. Just throw errors for most commands/opcodes when used inside structs? Seems like the most reasonable idea.
Okay but we fixed that one five months ago, we just didn't make a release since then.
(Or rather, we improved the error into "Invalid label name" x2. I don't know what code in a struct is supposed to mean.)
This is indeed fixed in the repo but before I close it, is there any strong reason you want case number 1 (externallabel) to work? The current status it now produces an error. I'm not going to call code in structs useless (could be handy for generating code to be modified in WRAM or something?) But using specific labels doesn't seem all too useful since structs will be overwritten unless you use skip sizeof(mystruct)
after defining the struct.
when writing code in a struct, any label has its first character replaced by '.' and is then assumed to be part of the struct:
test.asm:6: error: (E5060): Label 'test.xternalLabel' wasn't found. [jmp ExternalLabel]