Absolute addressing

From C64-Wiki
Jump to navigationJump to search

Absolute addressing is an addressing mode that specifies an address in RAM which is to be the "object" of the instruction. For example,

AD 20 D0  LDA 53280

will retrieve the contents of memory address 53280 and transfer ("copy") it to the accumulator, and

8D 21 D0  STA 53281

will store ("copy") the contents of the accumulator into the designated address.

Notice that any instruction that uses absolute addressing, take up three bytes; one for the opcode, followed by first the low-byte and then the high-byte of the address.

The following 23 instructions support absolute addressing: ADC, AND, ASL, BIT, CMP, CPX, CPY, DEC, EOR, INC, JMP, JSR, LDA, LDX, LDY, LSR, ORA, ROL, ROR, SBC, STA, STX, and STY.