pub struct ConditionCodes(/* private fields */);Expand description
The 6809 Condition Code register, stored as a packed byte.
#[repr(transparent)] guarantees that this type has exactly the same
memory layout as a u8, making it safe to use in #[repr(C)] structs
and directly accessible from JIT-emitted code.
Implementations§
Source§impl ConditionCodes
impl ConditionCodes
pub const fn new() -> Self
pub const fn from_byte(b: u8) -> Self
pub const fn to_byte(self) -> u8
pub const fn carry(self) -> bool
pub const fn overflow(self) -> bool
pub const fn zero(self) -> bool
pub const fn negative(self) -> bool
pub const fn irq_inhibit(self) -> bool
pub const fn half_carry(self) -> bool
pub const fn firq_inhibit(self) -> bool
pub const fn entire(self) -> bool
pub fn set_carry(&mut self, v: bool)
pub fn set_overflow(&mut self, v: bool)
pub fn set_zero(&mut self, v: bool)
pub fn set_negative(&mut self, v: bool)
pub fn set_irq_inhibit(&mut self, v: bool)
pub fn set_half_carry(&mut self, v: bool)
pub fn set_firq_inhibit(&mut self, v: bool)
pub fn set_entire(&mut self, v: bool)
Trait Implementations§
Source§impl Clone for ConditionCodes
impl Clone for ConditionCodes
Source§fn clone(&self) -> ConditionCodes
fn clone(&self) -> ConditionCodes
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 ConditionCodes
impl Debug for ConditionCodes
Source§impl Default for ConditionCodes
impl Default for ConditionCodes
Source§fn default() -> ConditionCodes
fn default() -> ConditionCodes
Returns the “default value” for a type. Read more
Source§impl Display for ConditionCodes
impl Display for ConditionCodes
Source§impl PartialEq for ConditionCodes
impl PartialEq for ConditionCodes
impl Copy for ConditionCodes
impl Eq for ConditionCodes
impl StructuralPartialEq for ConditionCodes
Auto Trait Implementations§
impl Freeze for ConditionCodes
impl RefUnwindSafe for ConditionCodes
impl Send for ConditionCodes
impl Sync for ConditionCodes
impl Unpin for ConditionCodes
impl UnsafeUnpin for ConditionCodes
impl UnwindSafe for ConditionCodes
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