|
Post by Unbeliever on Dec 22, 2020 6:11:42 GMT
I've dabbled in 6502 ML off and on... "just enough to be dangerous", as it were.
But this is my first time using an actual ASSEMBLER (as opposed to a simple monitor).
Most of my code works, but my problem is in a section that looks like this:
lda <mylabel
sta $addr
lda >mylabel
sta $addr+1
...
mylabel [more code goes here]
As you can see, I'm trying to get the low byte and high byte of an address later in my code, and stash them in a pair of memory addresses -- but I keep getting a phase error when I compile.
I'm hoping I'm just missing some syntax; I'd hate it if I had to move my code so that the label comes BEFORE I need to refer to it...
Any more experienced assembler users have any ideas?
Thanks in advance...
|
|
|
Post by Unbeliever on Dec 22, 2020 23:31:24 GMT
*SIGH* Yup, it was a simple syntax issue.
All I needed was a pound sign in my two LDA statements:
lda #<mylabel and lda #>mylabel
Works like a champ.
|
|