pub struct Cpu {
pub reg: Registers,
pub cycles: u64,
pub halted: bool,
pub illegal: bool,
/* private fields */
}Expand description
Motorola 6809 CPU emulator.
Fields§
§reg: RegistersProgrammer-visible registers.
cycles: u64Total elapsed cycles since reset.
halted: boolCPU is halted (hit illegal opcode or RESET instruction).
illegal: boolCPU encountered an illegal opcode (invalid in current state).
Implementations§
Source§impl Cpu
impl Cpu
Sourcepub fn reset(&mut self, mem: &mut impl Memory)
pub fn reset(&mut self, mem: &mut impl Memory)
Hardware reset: read PC from reset vector, set I+F, clear state.
Sourcepub fn trigger_nmi(&mut self)
pub fn trigger_nmi(&mut self)
Trigger an NMI (edge-triggered). Only effective if NMI is armed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Cpu
impl RefUnwindSafe for Cpu
impl Send for Cpu
impl Sync for Cpu
impl Unpin for Cpu
impl UnsafeUnpin 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