easy6502 icon indicating copy to clipboard operation
easy6502 copied to clipboard

define does not work well for addresses over $ff

Open iznax opened this issue 7 years ago • 1 comments

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

iznax avatar Jan 18 '18 04:01 iznax

Yes, it does look like checkImmediate is wrong. https://github.com/skilldrick/easy6502/blob/df2b89573add05cf8fc988bd6caeadeea83883e3/simulator/assembler.js#L2177

BigEd avatar Jan 22 '18 18:01 BigEd