[][src]Struct z80emu::RegisterPair

pub struct 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]

impl Copy for RegisterPair[src]

impl Debug for RegisterPair[src]

impl Default for RegisterPair[src]

impl<'de> Deserialize<'de> for RegisterPair[src]

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]

impl PartialEq<RegisterPair> for RegisterPair[src]

impl Serialize for RegisterPair[src]

impl StructuralEq for RegisterPair[src]

impl StructuralPartialEq for RegisterPair[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.