-
Notifications
You must be signed in to change notification settings - Fork 0
Address Modes
Since the 6502 is CISC (Complex Instruction Set Computer), each instruction has different ways of determining where it can get data from. Which is an address mode. Each instruction can have multiple address modes. The amount of address modes for each instruction varies, consult the 6502 instruction set documentation for more information.
The address mode of an instruction is determined by the op code ex: 0xa9 is LDA immediate but 0xa2 is LDA Zero page. the address mode can also change how much clock cycles an instruction takes
for instructions that manipulate the Status register and what not they normally take 1 cycle. (like CLC)
for BEQ, BNE. it adds on to the PC +/- 128
just returns the PC.
8 bit ptr with offsets of x,y
16 bit ptr with offsets x,y
16 bit ptr with the LSB in it can offset with x,y
https://www.nesdev.org/obelisk-6502-guide/addressing.html#IDX