easy6502
easy6502 copied to clipboard
define does not work well for addresses over $ff
This code looks reasonable.
define Screen $200
LDY #$21 LDA #1 STA Screen,Y ; this works
LDA #<Screen STA $2 LDA #>Screen STA $3 LDA #4 STA ($2),Y ; this does not work
but the #> and #< both always appear to generate #0 constants
If you define the label as a memory address it does work, but this really should be equivalent.
*= $200 Screen:
this was the standard behavior of the EQU directive in most assemblers
Yes, it does look like checkImmediate is wrong. https://github.com/skilldrick/easy6502/blob/df2b89573add05cf8fc988bd6caeadeea83883e3/simulator/assembler.js#L2177