pub trait ZeroPage {
// Required methods
fn is_zeropage(&self) -> bool;
fn low(&self) -> u8;
fn high(&self) -> u8;
}
Expand description
Trait for instructions that can handle zeropage and regular addresses.
Zeropage are special address mode on the 6502 where less CPU-cycles and instruction size is used when accessing RAM below 0x0100.
Based on the is_zeropage the caller can decide if it only needs the low byte or both the low and high byte.
Required Methods§
Sourcefn is_zeropage(&self) -> bool
fn is_zeropage(&self) -> bool
Is the address a zeropage address