pub struct RegId(_);
Expand description
Represents a 6-bit register ID, guaranteed to be masked by construction.
Implementations§
source§impl RegId
impl RegId
sourcepub const OF: Self = _
pub const OF: Self = _
Contains overflow/underflow of addition, subtraction, and multiplication.
sourcepub const SSP: Self = _
pub const SSP: Self = _
Stack start pointer. Memory address of bottom of current writable stack area.
sourcepub const SP: Self = _
pub const SP: Self = _
Stack pointer. Memory address on top of current writable stack area (points to free memory).
sourcepub const HP: Self = _
pub const HP: Self = _
Heap pointer. Memory address below the current bottom of the heap (points to free memory).
sourcepub const IS: Self = _
pub const IS: Self = _
Instructions start. Pointer to the start of the currently-executing code.
sourcepub const fn new(u: u8) -> Self
pub const fn new(u: u8) -> Self
Construct a register ID from the given value.
The given value will be masked to 6 bits.
sourcepub fn new_checked(u: u8) -> Option<Self>
pub fn new_checked(u: u8) -> Option<Self>
Construct a register ID from the given value.
Returns None
if the value is outside the 6-bit value range.
Trait Implementations§
source§impl Ord for RegId
impl Ord for RegId
source§impl PartialEq<RegId> for RegId
impl PartialEq<RegId> for RegId
source§impl PartialOrd<RegId> for RegId
impl PartialOrd<RegId> for RegId
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more