pub struct VmEmulator {
pub ram: Ram16k,
/* private fields */
}
Expand description
This emulator implements all the VM commands with Rust operating on its own instance of a memory
Fields
ram: Ram16k
Implementations
sourceimpl VmEmulator
impl VmEmulator
sourcepub fn load(&mut self, instructions: Vec<VmInstruction>)
pub fn load(&mut self, instructions: Vec<VmInstruction>)
Loads a program into the emulator
pub fn get_segment_address(&self, segment: Segment) -> i16
pub fn set(&mut self, segment: Segment, value: Signal16)
sourcepub fn push_from(&mut self, segment: Segment, offset: Signal16)
pub fn push_from(&mut self, segment: Segment, offset: Signal16)
Pushes segment[offset]
on top of the stack
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for VmEmulator
impl Send for VmEmulator
impl Sync for VmEmulator
impl Unpin for VmEmulator
impl UnwindSafe for VmEmulator
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more