Address of a variable: Difference between revisions

Content added Content deleted
Line 48: Line 48:


6502 assemblers treat a number without a # in front as a memory address.
6502 assemblers treat a number without a # in front as a memory address.
<lang 6502asm>LDA #$30 ;load into the accumulator the constant value 0x30
<lang 6502asm>
LDA #$30 ;load into the accumulator the constant value 0x30
LDA $30 ;load into the accumulator the value stored at memory address 0x0030.</lang>
LDA $30 ;load into the accumulator the value stored at memory address 0x0030.</lang>