pub struct State { /* private fields */ }Expand description
This struct stores the internal registers and flags of the 8080 CPU.
Implementations§
Source§impl State
impl State
Sourcepub fn flags(&self) -> u8
pub fn flags(&self) -> u8
This method exposes the flag bits of the 8080 in the same format as the PSW
pseudo-register, mz0a0p1c, where
mis the sign flag;zis the zero flag;ais the auxilliary carry flag;pis the even-parity flag;cis the carry flag.
Sourcepub fn is_stopped(&self) -> bool
pub fn is_stopped(&self) -> bool
Whether or not the processor is in a stopped state (not executing operations from the PC). The processor will return to an active state if it receives an interrupt.
Note that if interrupts are disabled when the processor is halted, the processor will remain stopped until it is reset from outside.
Sourcepub fn is_interrupt_ready(&self) -> bool
pub fn is_interrupt_ready(&self) -> bool
Whether the processor is accepting interrupts; this is disabled automatically when an
interrupt is received, to allow the interrupt to finish processing without being further
disrupted. It is also set by the EI operation and reset by the DI operation.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnwindSafe for State
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