-
Notifications
You must be signed in to change notification settings - Fork 52
Description
!rb as2 -s
segment bank=$80
stuff:
test = stuff
errors with Elabel_ambiguous, because stuff is properly recognized as being within the freespace, but test isn't. so when the freespace placement after pass1 moves stuff, test isn't moved with it and thus moves between pass1 and 2 causing the error.
there's a few hacky fixes for this (detect if the assignment is of the form x = y or x = y+z where z is a constant expression, and in that case set x to be in the same freespace as y) which should cover most practical cases, but idk how to give nice errors in the other cases. (and there's some cases that should stay legal, like subtracting two labels to get the distance between them)
i'm now thinking if these kinds of expressions should mark the label as "unknown bank, cannot participate in label optimization". in that case the value changing in pass2 would be fine. ....would it really actually? idk, i'm tired.