asar
asar copied to clipboard
label optimizer is too aggressive with +/- labels
trafficstars
(alternative title: label optimizer barely knows +/- labels exist)
org $8000
lda (+)-1
+
miscompiles to A5 01. +/- labels are only considered in getlen if the entire argument is a label reference, not if you do any math on it.
i really don't know how to fix this without rewriting most of the math parser. i don't even know how it should work: the label optimizer is very fragile and heuristic-based and i don't know what the "right" heuristics would be.