Ro5bert / avra

Assembler for the Atmel AVR microcontroller family
GNU General Public License v2.0
153 stars 39 forks source link

Forward references never allowed in expressions #28

Open Ro5bert opened 3 years ago

Ro5bert commented 3 years ago

Forward references should be allowed in expressions

Currently they are never allowed in expressions; for example, the following fails:

.device atmega2560 ; Arbitrary
.equ myequ=mylab
mylab: mov r1, r2
Nevada317 commented 3 years ago

In fact, i think those were allowed back in 1.3.0. Need to check, but looks like they were ruined with ifdef refactor. I will try to reproduce in older avra soon

Ro5bert commented 3 years ago

@Nevada317 Actually I realized they do work as arguments to mnemonics, if that's what you mean. It's just as arguments to directives that they don't work, because we try to evaluate expressions on directives in pass 1, even if we don't need to.