Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

define does not work well for addresses over $ff #31

Open
iznax opened this issue Jan 18, 2018 · 1 comment
Open

define does not work well for addresses over $ff #31

iznax opened this issue Jan 18, 2018 · 1 comment

Comments

@iznax
Copy link

iznax commented Jan 18, 2018

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

@BigEd
Copy link
Collaborator

BigEd commented Jan 22, 2018

Yes, it does look like checkImmediate is wrong.

// Check if param is immediate and push value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants