CPU::AddressModes
Inherits Enum < Comparable < Value < Object
The modes of addressing
Constants
There are a number of "atomic read/modify/write" instructions which can address EITHER Memory OR the Accumulator (A)
A better name for this mode might be Immediate Value as no "addressing" actually takes place.
Much like Absolute Addressing, but can only address the first 256 (0..255) bytes of memory.
In Zero-Page Addressing the destination address is fixed by the programmer (or assembler) at assembly time.
By using the hard-coded address as a base, and CPU#x_index as an Index, a more dynamic addressing system can be implemented.
With Zero-Page, only the first 256 (0..255) bytes of memory may be addressed. So if the result of Base+CPU#x_index is greater than $FF, wrapping will occur.
In Zero-Page Addressing the destination address is fixed by the programmer (or assembler) at assembly time.
By using the hard-coded address as a base, and CPU#y_index as an Index, a more dynamic addressing system can be implemented.
With Zero-Page, only the first 256 (0..255) bytes of memory may be addressed. So if the result of Base+CPU#y_index is greater than $FF, wrapping will occur.
Read a value from a 16-bit address Remember without special external hardware for paging, the 6502 only has a maximum of 64K of address space available - so 16-bits is enough to address ANY byte of memory.
In Absolute Addressing the destination address is fixed by the programmer (or assembler) at assembly time.
By using the hard-coded address as a base, and CPU#x_index as an Index, a more dynamic addressing system can be implemented.
If the result of Base+CPU#x_index is greater than $FFFF, wrapping will occur.
In Absolute Addressing the destination address is fixed by the programmer (or assembler) at assembly time.
By using the hard-coded address as a base, and CPU#y_index as an Index, a more dynamic addressing system can be implemented.
If the result of Base+CPU#y_index is greater than $FFFF, wrapping will occur.
With this instruction, the 8-but address (location) supplied by the programmer is considered to be a Zero-Page address, that is, an address in the first 256 (0..255) bytes of memory. The content of this Zero-Page address must contain the low 8-bits of a memory address The following byte (the contents of address+1) must contain the upper 8-bits of a memory address Once this memory address has been read from the Zero-Page location (specified by the programmer), this calculated memory address is then examined, and it's contents are returned.
This addressing mode is only available with X. Much like Indirect Addressing, but the contents of the index register is added to the Zero-Page address (location) If Base_Location+Index is greater than $FF, wrapping will occur.
This addressing mode is only available with Y. Much like Indexed Addressing, but the contents of the index register is added to the Base_Location after it is read from Zero-Page memory. If Base_Location+Index is greater than $FFFF, wrapping will occur.
Instance methods
Returns true if this enum value equals Absolute
Returns true if this enum value equals AbsoluteX
Returns true if this enum value equals AbsoluteY
Returns true if this enum value equals Accumulator
Returns true if this enum value equals Immediate
Returns true if this enum value equals Indirect
Returns true if this enum value equals IndirectX
Returns true if this enum value equals IndirectY
Returns true if this enum value equals ZeroPage
Returns true if this enum value equals ZeroPageX
Returns true if this enum value equals ZeroPageY