|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.co.javagear.Registers
public final class Registers
Zilog Z80 CPU BC, DE, HL, IX, IY register pair emulation.
Field Summary | |
---|---|
private Flag |
f
Flag register. |
private int |
high
The register pair's high byte. |
private int |
high2
The high byte of the second register of the pair. |
private int |
low
The register pair's low byte. |
private int |
low2
The low byte of the second register of the pair. |
Constructor Summary | |
---|---|
Registers(Flag fl)
Register pair constructor. |
Method Summary | |
---|---|
void |
adc(int value)
ADC 16 BIT - Add with carry. |
void |
add(int value)
ADD 16 BIT (Verified with ZEXALL). |
void |
clear()
Clear register. |
void |
dec()
Decrement register pair. |
private int |
dec8(int value)
Used to decrement the high or low bytes of the register pair. |
void |
decH()
Decrement high byte of pair. |
void |
decL()
Decrement low byte of pair. |
void |
ex()
Exchange register banks. |
int |
get()
Get value of register pair. |
int |
getH()
Get high byte of pair. |
int |
getL()
Get low byte of pair. |
void |
inc()
Increment register pair. |
private int |
inc8(int value)
Used to increment the high or low bytes of the register pair. |
void |
incH()
Increment high byte of pair. |
void |
incL()
Increment low byte of pair. |
void |
sbc(int value)
SBC 16 BIT - Subtract with carry. |
void |
set(int value)
Set register pair. |
void |
setH(int value)
Set high byte of register pair. |
void |
setL(int value)
Set low byte of register pair. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int high
private int low
private int high2
private int low2
private Flag f
Constructor Detail |
---|
public Registers(Flag fl)
fl
- pointer to flag register.Method Detail |
---|
public void clear()
public int get()
public int getH()
public int getL()
public void set(int value)
value
- the value to set the register to
(0
- 0xFFFF
).public void setH(int value)
value
- value to set the high byte of the register to
(0
- 0xFF
).public void setL(int value)
value
- value to set the low byte of the register to
(0
- 0xFF
).public void inc()
public void incL()
public void incH()
private int inc8(int value)
value
- the value of the register pair's byte.
public void dec()
public void decL()
public void decH()
private int dec8(int value)
value
- the value of the register pair's byte.
public void ex()
public void add(int value)
value
- value to add.public void adc(int value)
value
- value to add.public void sbc(int value)
value
- value to subtract.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |