pub trait DataBus {
    fn read_port(&self, port: u8) -> u8;
    fn write_port(&mut self, port: u8, value: u8);
}
Expand description

Interface used by Proc8080 for IN and OUT instructions. This is the main way to interact with the processor emulation.

The 8008 processor communicates with external devices via the instructions IN (the CPU reads from the databus on a given port) and OUT (the CPU writes to a given port). Reading and writing to the bus can do anything depending on the hardware (playing a sound, asking specialized hardware to perform a computation, reading user keypresses…).

This trait reify the interactions with this data bus and is intended to be implemented by the user of the library in order to integrate with the emulator.

Required Methods

Called by Proc8080 when it applies a IN instruction

Called by Proc8080 when it applies a OUT instruction

Implementors