Struct intel_8080_emu::proc_state::Proc8080[][src]

pub struct Proc8080<Bus: DataBus> { /* fields omitted */ }

Structure containing the processor state (flags, registers and memory) and logic.

Methods

impl<Bus: DataBus> Proc8080<Bus>
[src]

Builds a new Proc8080 with the given memory mem and DataBus.

The memory contains both the ROM and RAM of the processor. Usually it is called with a boxed array of size 0xffff (adressable space for the intel 8080) which contains the ROM at the beginning of the memory. The processor starts with the program counter equal to 0.

The data_bus contains callbacks called when running a IN or OUT opcode.

Borrows the procesor flags immutably.

Borrows the procesor registers immutably.

Reads the next opcode in memory and changes state accordingly.

This methods run one step of the processor simulation. It reads the next opcode according to the program counter

Borrows the memory immutably.

Make the processor run a RST instruction.

There are 8 possible RST instruction for the 8080 (RST 0 to 7). The specific instruction is chosen via rst_value.

An interrupt restart a processor which was in stopped state after running a HLT opcode.

Panics

If rst_value is greater than 7;

Cycles elapsed since the cpu was created

Trait Implementations

impl<Bus: DataBus> Debug for Proc8080<Bus>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<Bus> Send for Proc8080<Bus> where
    Bus: Send

impl<Bus> Sync for Proc8080<Bus> where
    Bus: Sync