pub enum AluUnaryOp {
RotateLeft8,
RotateLeft9,
RotateRight8,
RotateRight9,
DecimalAdjust,
SetCarryFlag,
Compliment,
ComplimentCarryFlag,
}Expand description
Type of unary ALU operation. All ops here apply only to A and Flags.
Variants§
RotateLeft8
8-bit left rotate. Bit 7 goes to both the carry and bit 0.
RotateLeft9
9-bit left rotate. Bit 7 goes to carry and carry goes to bit 0.
RotateRight8
8-bit right rotate. Bit 0 goes to both the carry and bit 7.
RotateRight9
9-bit left rotate. Bit 0 goes to carry and carry goes to bit 7.
DecimalAdjust
Helper for doing binary-coded-decimal. Adjusts the hex didgits to keep both nybbles in range 0..=9 by adding 0x06 and/or 0x60 to push the digit to the next nybble.
SetCarryFlag
Sets the carry flag.
Compliment
Inverts the Accumulator.
ComplimentCarryFlag
Inverts the carry flag.
Trait Implementations§
Source§impl Clone for AluUnaryOp
impl Clone for AluUnaryOp
Source§fn clone(&self) -> AluUnaryOp
fn clone(&self) -> AluUnaryOp
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AluUnaryOp
impl Debug for AluUnaryOp
Source§impl Display for AluUnaryOp
impl Display for AluUnaryOp
Source§impl From<AluUnaryOp> for InstrBuilder
Builds the microcode for a single ALU unary operation. This handles reading the
accumulator and flags as needed, and handles applying the results.
impl From<AluUnaryOp> for InstrBuilder
Builds the microcode for a single ALU unary operation. This handles reading the accumulator and flags as needed, and handles applying the results.
Source§fn from(value: AluUnaryOp) -> Self
fn from(value: AluUnaryOp) -> Self
Converts to this type from the input type.
Source§impl Ord for AluUnaryOp
impl Ord for AluUnaryOp
Source§fn cmp(&self, other: &AluUnaryOp) -> Ordering
fn cmp(&self, other: &AluUnaryOp) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for AluUnaryOp
impl PartialEq for AluUnaryOp
Source§impl PartialOrd for AluUnaryOp
impl PartialOrd for AluUnaryOp
impl Copy for AluUnaryOp
impl Eq for AluUnaryOp
impl StructuralPartialEq for AluUnaryOp
Auto Trait Implementations§
impl Freeze for AluUnaryOp
impl RefUnwindSafe for AluUnaryOp
impl Send for AluUnaryOp
impl Sync for AluUnaryOp
impl Unpin for AluUnaryOp
impl UnwindSafe for AluUnaryOp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more