[][src]Struct iz80::Cpu

pub struct Cpu { /* fields omitted */ }

The Z80 cpu emulator.

Executes Z80 instructions changing the cpu State and Machine

Implementations

impl Cpu[src]

pub fn new() -> Cpu[src]

Returns a Z80 Cpu instance. Alias of new_z80()

pub fn new_z80() -> Cpu[src]

Returns a Z80 Cpu instance

pub fn new_8080() -> Cpu[src]

Returns an Intel 8080 Cpu instance

pub fn execute_instruction(&mut self, sys: &mut dyn Machine)[src]

Executes a single instruction

Arguments

  • sys - A representation of the emulated machine that has the Machine trait

pub fn set_trace(&mut self, trace: bool)[src]

Activates or deactivates traces of the instruction executed and the state of the registers.

Arguments

  • trace - A bool defining the trace state to set

pub fn registers(&mut self) -> &mut Registers[src]

Returns a Registers struct to read and write on the Z80 registers

pub fn is_halted(&self) -> bool[src]

Returns if the Cpu has executed a HALT

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.