fix broken optimization for wordvar - value expressions

This commit is contained in:
Irmen de Jong
2025-09-09 07:18:18 +02:00
parent d4c460072b
commit ced4c5944a
6 changed files with 40 additions and 35 deletions

View File

@@ -1,10 +1,14 @@
main {
struct element {
word y
}
%import textio
%zeropage basicsafe
main {
sub start() {
^^element zp_element = 20000
zp_element.y = cx16.r0L as byte
uword @shared z = 100
ubyte @shared x = 200
for x in 15 downto 1 {
txt.print_uw(x*$0002-z) ; TODO fix 6502 optimization bug
txt.nl()
}
}
}