pub struct CPU { /* private fields */ }Implementations§
source§impl CPU
impl CPU
Implement CPU’s core functionality
source§impl CPU
impl CPU
Implement addressing modes
pub fn get_address(&mut self, mode: AddressingMode) -> u16
source§impl CPU
impl CPU
Debugging/testing functions
sourcepub fn load_program(&mut self, program: Vec<u8>)
pub fn load_program(&mut self, program: Vec<u8>)
Write program defined as Vec<u8> to memory
sourcepub fn quick_start(&mut self, program: Vec<u8>)
pub fn quick_start(&mut self, program: Vec<u8>)
Write program to memory, reset, and start clock
pub fn get_pc(&self) -> u16
pub fn get_sp(&self) -> u8
pub fn get_sr(&self) -> u8
pub fn get_a(&self) -> u8
pub fn get_x(&self) -> u8
pub fn get_y(&self) -> u8
pub fn get_opcode(&self) -> u8
sourcepub fn get_memory(&self) -> [u8; 65536]
pub fn get_memory(&self) -> [u8; 65536]
Get entirety of memory
Auto Trait Implementations§
impl RefUnwindSafe for CPU
impl Send for CPU
impl Sync for CPU
impl Unpin for CPU
impl UnwindSafe for CPU
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more