pub struct Proc8080<Bus: DataBus> { /* private fields */ }
Expand description

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

Implementations

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

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.