|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.co.javagear.Accumulator
public final class Accumulator
Zilog Z80 CPU accumulator register emulation.
Field Summary | |
---|---|
private static Flag |
f
Flag register. |
private static int |
reg
First register of the accumulator's bank. |
private static int |
reg2
Second register of the accumulator's bank. |
Constructor Summary | |
---|---|
Accumulator(Flag fl)
Accumulator constructor. |
Method Summary | |
---|---|
void |
adc(int value)
ADC 8 BIT - Add with carry. |
void |
add(int value)
ADD 8 BIT. |
void |
and(int value)
AND Operation. |
void |
clear()
Clear register. |
void |
cp(int value)
CP Operation - Compare with Accumulator. |
void |
cpl()
CPL Operation - Complement Accumulator. |
void |
dec()
Decrement register. |
void |
ex()
Exchange register banks. |
int |
get()
Get value of accumulator. |
void |
inc()
Increment register. |
void |
or(int value)
OR Operation. |
void |
rla()
RLA Operation - Rotate Left Accumulator. |
void |
rlca()
RLCA Operation - Rotate Left With Carry Accumulator. |
void |
rra()
RRA Operation - Rotate Right Accumulator. |
void |
rrca()
RRCA Operation - Rotate Right With Carry Accumulator. |
void |
sbc(int value)
SBC 8 BIT. |
void |
set(int value)
Set register. |
void |
sub(int value)
SUB 8 BIT. |
void |
xor(int value)
XOR Operation (Bitwise Exclusive OR). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static int reg
private static int reg2
private static Flag f
Constructor Detail |
---|
public Accumulator(Flag fl)
Accumulator
constructor.
fl
- pointer to flag register.Method Detail |
---|
public void clear()
public int get()
public void set(int value)
value
- value to set register (0
- 0xFF
).public void inc()
public void dec()
public void ex()
public void add(int value)
value
- value to add.public void adc(int value)
value
- value to add.public void sub(int value)
value
- value to subtract.public void sbc(int value)
value
- subtract with carry.public void and(int value)
value
- value to &.public void or(int value)
value
- Value to |public void xor(int value)
value
- Value to ^public void cp(int value)
value
- Value to comparepublic void cpl()
public void rra()
public void rla()
public void rlca()
public void rrca()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |