[−][src]Enum lasm::asm::Register
The Register enum represents a register in an assembly program (obviously)
Variants
The register that points to where the next item on the stack will be stored to
The register that stores temporary values in several instructions
A register defined by the user. Each register's address and size is known statically.
Fields of Named
Methods
impl Register[src]
pub fn named(name: impl Display) -> Option<Self>[src]
Get a user defined register by its name. The register MUST be previously defined.
pub fn define(name: impl Display, size: usize) -> Self[src]
Define a Register with a given name and size. This will create a Register in the NAMED_REGISTERS map with the value of REGISTER_POINTER as the Register's address.
pub fn get_addr(&self) -> usize[src]
Get the address where this register is stored. This is
used in many instructions, most notably the refer instruction.
pub fn get_size(&self) -> usize[src]
Get the number of cells this register occupies. Both the StackPointer and the Accumulator are one cell each
Trait Implementations
impl Clone for Register[src]
impl Debug for Register[src]
impl PartialEq<Register> for Register[src]
impl PartialOrd<Register> for Register[src]
fn partial_cmp(&self, other: &Register) -> Option<Ordering>[src]
fn lt(&self, other: &Register) -> bool[src]
fn le(&self, other: &Register) -> bool[src]
fn gt(&self, other: &Register) -> bool[src]
fn ge(&self, other: &Register) -> bool[src]
impl StructuralPartialEq for Register[src]
Auto Trait Implementations
impl RefUnwindSafe for Register
impl Send for Register
impl Sync for Register
impl Unpin for Register
impl UnwindSafe for Register
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = !
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>,