[−][src]Enum lc3::vm::instruction::Instruction
A single LC-3 instruction. Except condition codes and is_immd values, all fields are set to i16 type for convenience.
Variants
ADD
Fields of ADD
ADDi
Fields of ADDi
AND
Fields of AND
ANDi
Fields of ANDi
BR
Fields of BR
JMP
Fields of JMP
base: i16
JSR
Fields of JSR
offset: i16
JSRR
Fields of JSRR
base: i16
LD
Fields of LD
LDI
Fields of LDI
LDR
Fields of LDR
LEA
Fields of LEA
NOT
Fields of NOT
RTI
ST
Fields of ST
STI
Fields of STI
STR
Fields of STR
RESERVED
TRAP
Fields of TRAP
vect: i16
Methods
impl Instruction
[src]
pub fn from_u16(data: u16) -> Instruction
[src]
Converts a single u16 value to LC-3 instruction. Note that for some instructions that can be interpreted in multiple types (e.g. JSR/JSRR), every field will be initialized to defined bit array slice values even if it won't be used.
Trait Implementations
impl Eq for Instruction
[src]
impl PartialEq<Instruction> for Instruction
[src]
fn eq(&self, other: &Instruction) -> bool
[src]
fn ne(&self, other: &Instruction) -> bool
[src]
impl Debug for Instruction
[src]
impl Display for Instruction
[src]
Auto Trait Implementations
impl Send for Instruction
impl Sync for Instruction
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,