[−][src]Enum zeerust::ops::Op
Op represents a single operation.
This representation (and backing implementation) is more expressive than
the processor itself.
For example ADD8(Location8::Reg(Reg8::D), Location8::Immediate(10))
is a valid representation, but
the Z80 features no such instruction.
Usually executing an instruction like this will just work, but in some cases a panic will occur
(Such as attempting to store to an immediate, which doesn't make any sense).
It is probably best to stick to the "guide rails" of the Z80 operations.
Variants
ADC(Location8, Location8)
ADd including Carry
ADD8(Location8, Location8)
ADD (8-bit)
INC(Location8)
INCrement
SBC(Location8, Location8)
SuBtract including borrow (Carry bit)
SUB8(Location8, Location8)
SUBtraction (8-bit)
DEC(Location8)
DECrement
AND(Location8)
bitwise AND
OR(Location8)
bitwise OR
XOR(Location8)
bitwise XOR
CP(Location8)
two's ComPliment
CPL
One's ComPLiment
NEG
sign NEGation (two's compliment)
CCF
toggle the Carry Flag
SCF
Set the Carry Flag unconditionally
NOP
Do nothing (No-OPeration)
HALT
HALT execution (until woken)
DAA
BCD nonsense. Not implemented
RLCA
Rotate Accumulator Left, set Carry
RLA
Rotate Accumulator Left, through carry
RRCA
Rotate Accumulator Right, set Carry
RRA
Rotate Accumulator Left, through carry
RLC(Location8)
Rotate Left, set Carry
RL(Location8)
Rotate Left, through carry
RRC(Location8)
Rotate Right, set Carry
RR(Location8)
Rotate Right, through carry
SLA(Location8)
Shift Left
SRL(Location8)
Shift Right
SRA(Location8)
Shift Right, preserving 7th bit
RLD
Rotate nibbles Left through accumulator
RRD
Rotate nibbles Right through accumulator
BIT(u8, Location8)
set zero flag if BIT is on
SET(u8, Location8)
SET b bit in location
RES(u8, Location8)
RESet b bit in location
IN(Location8, Location8)
INput from a peripheral
OUT(Location8, Location8)
OUTput to a peripheral
JP(JumpConditional, Location16)
JumP to the given position
JR(JumpConditional, i8)
Jump to the given Relative position
DJNZ(i8)
Decrement register b, then Jump if register b is Non Zero
CALL(JumpConditional, u16)
CALL a method
RET(JumpConditional)
RETurn from a method call
POP(Location16)
Pop an address off of the stack
PUSH(Location16)
Push an address onto a stack
LD8(Location8, Location8)
LoaD the given address (8-bit)
LD16(Location16, Location16)
LoaD the given address (16-bit)
Trait Implementations
impl PartialEq<Op> for Op
[src]
impl Clone for Op
[src]
fn clone(&self) -> Op
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Op
[src]
Auto Trait Implementations
Blanket Implementations
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> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom 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 for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,