Trait AddressSpace

Source
pub trait AddressSpace {
    // Required methods
    fn read(&self, address: u16) -> u8;
    fn write(&mut self, address: u16, value: u8);
}
Expand description

How the CPU communicates with the “external world”.

Required Methods§

Source

fn read(&self, address: u16) -> u8

A read from the address space; reads do not fail (the CPU always gets something).

Source

fn write(&mut self, address: u16, value: u8)

A write to the address space.

Implementors§