[][src]Struct i8080::Intel8080

pub struct Intel8080 {
    pub cpu: Cpu,
    pub memory: Memory,
}

An Intel 8080 system.

Fields

cpu: Cpu

An Intel 8080 CPU.

memory: Memory

A 64K memory.

Implementations

impl Intel8080[src]

pub fn new<P: AsRef<Path>>(paths: &[P], start_address: u16) -> Result<Self>[src]

Creates an Intel 8080 system by loading ROM files located at paths into memory starting at start_address and setting the program counter to start_address.

Errors

This function will return an error (Error::FileNotFound, Error::Io, or Error::TooLargeFile) if a ROM file in paths cannot be read successfully or the total size of the ROM files is too large to be loaded into memory starting at start_address.

pub fn fetch_execute_instruction(&mut self) -> Result<(Instruction, u32)>[src]

Fetches and executes an instruction, returning it with the number of states taken.

Errors

This function will return an Error::Halted error if the CPU is in the halted state.

pub fn interrupt(&mut self, instruction: Instruction) -> Result<u32>[src]

Escapes from the halt state, if necessary, and executes instruction with further interrupts disabled.

Errors

This function will return an Error::InterruptNotEnabled error if the interrupt system is already disabled.

Trait Implementations

impl Default for Intel8080[src]

Auto Trait Implementations

impl RefUnwindSafe for Intel8080

impl Send for Intel8080

impl Sync for Intel8080

impl Unpin for Intel8080

impl UnwindSafe for Intel8080

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.