[][src]Struct lc3::VMState

pub struct VMState {
    pub register: [i16; 8],
    pub pc: u16,
    pub ir: u16,
    pub supervisor: bool,
    pub priority: u8,
    pub condition: Condition,
    pub mem: [u16; 65536],
}

A VM state.

Fields

register: [i16; 8]

General purpose registers(R0~R7)

pc: u16

Program Counter

ir: u16

Instruction Register

supervisor: bool

Supervisor mode

priority: u8

Priority Level(PL0~PL7)

condition: Condition

Condition codes

mem: [u16; 65536]

Computer memory

Implementations

impl VMState[src]

pub fn psr(&self) -> u16[src]

Calculates, and returns processor state register(PSR) value.

Trait Implementations

impl Clone for VMState[src]

impl Default for VMState[src]

fn default() -> Self[src]

Returns empty, zero-filled virtual machine status with default memory filled.

Auto Trait Implementations

impl RefUnwindSafe for VMState

impl Send for VMState

impl Sync for VMState

impl Unpin for VMState

impl UnwindSafe for VMState

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.