Enum acs::asm::instruction::AsmInstruction
source · [−]#[repr(u16)]
pub enum AsmInstruction {
A(u16),
C(Dest, Comp, Jump),
Label(String),
Symbol(String),
}
Variants
A(u16)
A-instructions start with 0
- symbolic:
@n
wheren
is value in range[0, 32767]
C(Dest, Comp, Jump)
C-instructions start with 111
- symbolic:
dest = comp; jump
comp
is mandatorydest
can be empty and=
is omittedjump
can be empty and;
is omitted
Label(String)
Symbol(String)
Implementations
sourceimpl AsmInstruction
impl AsmInstruction
pub fn parse(code: &str) -> Vec<AsmInstruction>
Trait Implementations
sourceimpl Binary for AsmInstruction
impl Binary for AsmInstruction
sourceimpl Clone for AsmInstruction
impl Clone for AsmInstruction
sourcefn clone(&self) -> AsmInstruction
fn clone(&self) -> AsmInstruction
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for AsmInstruction
impl Debug for AsmInstruction
sourceimpl Default for AsmInstruction
impl Default for AsmInstruction
sourceimpl From<&AsmInstruction> for Signal16
impl From<&AsmInstruction> for Signal16
sourcefn from(instr: &AsmInstruction) -> Self
fn from(instr: &AsmInstruction) -> Self
Converts to this type from the input type.
sourceimpl From<&AsmInstruction> for u16
impl From<&AsmInstruction> for u16
sourcefn from(inst: &AsmInstruction) -> Self
fn from(inst: &AsmInstruction) -> Self
Converts to this type from the input type.
sourceimpl From<i16> for AsmInstruction
impl From<i16> for AsmInstruction
sourceimpl From<i32> for AsmInstruction
impl From<i32> for AsmInstruction
sourceimpl From<u16> for AsmInstruction
impl From<u16> for AsmInstruction
sourceimpl FromStr for AsmInstruction
impl FromStr for AsmInstruction
sourceimpl Hash for AsmInstruction
impl Hash for AsmInstruction
sourceimpl PartialEq<AsmInstruction> for AsmInstruction
impl PartialEq<AsmInstruction> for AsmInstruction
sourcefn eq(&self, other: &AsmInstruction) -> bool
fn eq(&self, other: &AsmInstruction) -> bool
impl Eq for AsmInstruction
impl StructuralEq for AsmInstruction
impl StructuralPartialEq for AsmInstruction
Auto Trait Implementations
impl RefUnwindSafe for AsmInstruction
impl Send for AsmInstruction
impl Sync for AsmInstruction
impl Unpin for AsmInstruction
impl UnwindSafe for AsmInstruction
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