pub struct Flags {
pub carry: bool,
pub parity: bool,
pub adjust: bool,
pub zero: bool,
pub sign: bool,
pub trap: bool,
pub interrupt: bool,
pub direction: bool,
pub overflow: bool,
/* private fields */
}Expand description
https://en.wikipedia.org/wiki/FLAGS_register
Fields§
§carry: bool§parity: bool§adjust: bool§zero: bool§sign: bool§trap: bool§interrupt: bool§direction: bool§overflow: boolImplementations§
Source§impl Flags
impl Flags
pub fn new() -> Self
pub fn new_from_u16(val: u16) -> Flags
pub fn set_sign_u8(&mut self, v: usize)
pub fn set_sign_u16(&mut self, v: usize)
pub fn set_sign_u32(&mut self, v: usize)
pub fn set_parity(&mut self, v: usize)
pub fn set_zero_u8(&mut self, v: usize)
pub fn set_zero_u16(&mut self, v: usize)
pub fn set_zero_u32(&mut self, v: usize)
pub fn set_adjust(&mut self, res: usize, v1: usize, v2: usize)
pub fn set_overflow_add_u8(&mut self, res: usize, v1: usize, v2: usize)
pub fn set_overflow_add_u16(&mut self, res: usize, v1: usize, v2: usize)
pub fn set_overflow_add_u32(&mut self, res: usize, v1: usize, v2: usize)
pub fn set_overflow_sub_u8(&mut self, res: usize, v1: usize, v2: usize)
pub fn set_overflow_sub_u16(&mut self, res: usize, v1: usize, v2: usize)
pub fn set_overflow_sub_u32(&mut self, res: usize, v1: usize, v2: usize)
pub fn set_carry_u8(&mut self, res: usize)
pub fn set_carry_u16(&mut self, res: usize)
pub fn set_carry_u32(&mut self, res: usize)
pub fn carry_val(&self) -> usize
pub fn carry_numeric(&self) -> String
pub fn zero_numeric(&self) -> String
pub fn sign_numeric(&self) -> String
pub fn overflow_numeric(&self) -> String
pub fn adjust_numeric(&self) -> String
pub fn parity_numeric(&self) -> String
pub fn direction_numeric(&self) -> String
pub fn interrupt_numeric(&self) -> String
Trait Implementations§
impl Copy for Flags
impl StructuralPartialEq for Flags
Auto Trait Implementations§
impl Freeze for Flags
impl RefUnwindSafe for Flags
impl Send for Flags
impl Sync for Flags
impl Unpin for Flags
impl UnwindSafe for Flags
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more