siso 0.1.0

IBM 5150 emulator
Documentation
//! An IBM 5150 emulator.

pub mod chips;
mod memory;

/// Implementation of the IBM 5150 system.
pub struct Ibm5150 {
    cpu: chips::Intel8088,
    memory: memory::Memory,
}

impl Ibm5150 {
    /// Constructs a new system with the given BIOS.
    pub fn new(bios_rom: chips::Rom, cassette_basic: Option<[chips::Rom; 4]>) -> Self {
        Self {
            cpu: chips::Intel8088::default(),
            memory: memory::Memory::new(bios_rom, cassette_basic),
        }
    }

    /// Runs the system.
    pub fn run(&mut self) {
        self.cpu.reset();
        self.cpu.run(&mut self.memory);
    }
}