[−][src]Struct z80emu::RegisterPair
A struct that represents a register pair, that can be treated as a single 16-bit register or a separate 8-bit (MSB/LSB) registers.
Implementations
impl RegisterPair
[src]
pub fn ptr8hi(&mut self) -> *mut u8
[src]
pub fn ptr8lo(&mut self) -> *mut u8
[src]
pub fn get16(self) -> u16
[src]
pub fn set16(&mut self, val: u16)
[src]
pub fn get8hi(self) -> u8
[src]
pub fn get8lo(self) -> u8
[src]
pub fn set8hi(&mut self, val: u8)
[src]
pub fn set8lo(&mut self, val: u8)
[src]
pub fn get(self) -> (u8, u8)
[src]
Returns values of this pair of registers as a tuple of (MSB, LSB)
.
pub fn set(&mut self, hi: u8, lo: u8)
[src]
pub fn inc16(&mut self)
[src]
pub fn add16(&mut self, val: u16)
[src]
pub fn dec16(&mut self)
[src]
pub fn dec16_is_zero(&mut self) -> bool
[src]
Subtracts 1 from the 16-bit register and returns true if the result is 0.
pub fn op16<F: FnOnce(u16) -> (u8, u8)>(&mut self, op: F)
[src]
Applies op to the 16-bit register value and modifies it in place.
pub fn op8hi<F: FnOnce(u8) -> u8>(&mut self, op: F)
[src]
Applies op to the 8-bit high half value and modifies it in place.
pub fn op8lo<F: FnOnce(u8) -> u8>(&mut self, op: F)
[src]
Applies op to the 8-bit low half value and modifies it in place.
Trait Implementations
impl Clone for RegisterPair
[src]
fn clone(&self) -> RegisterPair
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for RegisterPair
[src]
impl Debug for RegisterPair
[src]
impl Default for RegisterPair
[src]
fn default() -> RegisterPair
[src]
impl<'de> Deserialize<'de> for RegisterPair
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Eq for RegisterPair
[src]
impl From<[u8; 2]> for RegisterPair
[src]
impl From<i16> for RegisterPair
[src]
impl From<u16> for RegisterPair
[src]
impl Hash for RegisterPair
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<RegisterPair> for RegisterPair
[src]
fn eq(&self, other: &RegisterPair) -> bool
[src]
fn ne(&self, other: &RegisterPair) -> bool
[src]
impl Serialize for RegisterPair
[src]
impl StructuralEq for RegisterPair
[src]
impl StructuralPartialEq for RegisterPair
[src]
Auto Trait Implementations
impl RefUnwindSafe for RegisterPair
impl Send for RegisterPair
impl Sync for RegisterPair
impl Unpin for RegisterPair
impl UnwindSafe for RegisterPair
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> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
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 = Infallible
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>,