Immediate Addressing
Jump to navigation
Jump to search
Immediate Addressing is used when the operand's value is given in the instruction itself. In 6502 assembly, this is indicated by an pound sign, "#", before the operand.
Examples
In this example, the first instruction uses Immediate Addressing, while the second instruction uses Zero-Page Addressing. In the first line, the accumulator is loaded with the number 7, but in the second line, the accumulator is loaded with whatever value is stored in memory address $0007.
0001:A9 07 LDA #$07 ; Load A with the value of $07. 0002:A5 07 LDA $07 ; Load A with whatever value is in memory address $0007.
Opcodes
The following opcodes support immediate addressing: