|
jmce - 1_02 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjmce.sim.AbstractHardware
jmce.sim.cpu.AbstractCPU
jmce.intel.i8080.I8080
jmce.zilog.z80.Z80
public class Z80
Standard Zilog Z80 cpu implementation.
Implements all documented and not documented instruction set. Implemented registers other then i8080:
I8080
register.
The mnemonic for JP xx where xx is one index register are changed from the original Z80 for example the JP (HL) is JP HL because is more correct the jump is made to the address set in the register and not in the memory location where the register is set.
Field Summary | |
---|---|
int |
I
|
int |
IX
|
int |
IY
|
int |
R
|
Fields inherited from class jmce.intel.i8080.I8080 |
---|
A, BC, booleanTable, DE, F, HL, iff1, iff2, parityTable, PC, SP |
Fields inherited from class jmce.sim.cpu.AbstractCPU |
---|
interrupts, io, memory, NS100MS, NS1MS |
Fields inherited from interface jmce.intel.i8080.I8080Constants |
---|
FLAG_3, FLAG_5, FLAG_C, FLAG_H, FLAG_N, FLAG_PV, FLAG_S, FLAG_Z |
Fields inherited from interface jmce.sim.CPU |
---|
BIG_ENDIAN, IO_MEMORY, LITTLE_ENDIAN, MAIN_MEMORY |
Constructor Summary | |
---|---|
Z80()
Default constructor. |
|
Z80(java.lang.String name)
Constructor with the cpu name specified. |
Method Summary | |
---|---|
int |
bit(int value,
int bit)
Check the status of one bit. |
void |
cpd()
CPD Compare A with (HL) and decrement HL and BC |
void |
cpi()
CPI compare a with (HL) and increment HL and decrement BC |
void |
cpSpecial(int v)
Special version of compare used by CPD and CPI is like the normal compare but the C and V flag are untouched. |
void |
ex_af_af1()
Change the AF with AF1 register |
void |
exx()
Exchange the bank of Z80 register BC,DE,HL |
int |
I()
Return the value of the I register. |
int |
im()
Return the interrupt mode. |
void |
im(int n)
Set the interrupt mode. |
void |
ind()
IND Input from the port C store the value at (HL) and decrement the HL register. |
void |
ini()
INI Input from the port C store the value at (HL) and increment the HL pair register. |
protected void |
initOpcodes()
Initialize the Z80 opcodes |
protected void |
initRegisters()
Initialize all standard intel 8080 register. |
void |
ldd()
|
void |
ldi()
|
void |
outd()
|
void |
outi()
|
int |
res(int value,
int bit)
Reset one bit. |
protected void |
resetRegisters()
Reset all register to default value. |
int |
set(int value,
int bit)
Set one bit. |
int |
sla(int value)
|
int |
sll(int value)
|
int |
sra(int value)
|
int |
srl(int value)
|
Methods inherited from class jmce.intel.i8080.I8080 |
---|
adc16, adc8, add16, add8, af, af, and, b, c, ccf, cp, cpl, d, daa, dec, e, f, fireISR, fireNMI, FLAG_3, FLAG_3, FLAG_5, FLAG_5, FLAG_C, FLAG_C, FLAG_H, FLAG_H, FLAG_N, FLAG_N, FLAG_S, FLAG_S, FLAG_V, FLAG_V, FLAG_Z, FLAG_Z, getCCC, getFlagCCC, getPortHI, getPP, getQQ, getRRR, getValuePP, getValueQQ, getValueRRR, getWord, h, in, inc, init, initMemories, initOpcodeDecoder, initPeripherals, isInterruptEnabled, l, or, out, pc, pc, pop, push, rl, rla, rlc, rlca, rr, rra, rrc, rrca, sbc16, sbc8, scf, setValuePP, setValueQQ, setValueRRR, setWord, sub8, xor |
Methods inherited from class jmce.sim.AbstractHardware |
---|
addHardware, createFrame, getHardware, getHardware, getHardware, getHardware, getHardware, getHardwareCount, getHardwareForName, getHardwareInstances, getHardwareTree, getName, getParent, initSwing, removeHardware, removeHardware, setHardware, setHardware, setName, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jmce.sim.Hardware |
---|
addHardware, getHardware, getHardware, getHardware, getHardware, getHardwareCount, getHardwareInstances, getHardwareTree, getName, getParent, initSwing, removeHardware, removeHardware, setHardware, setHardware, setName |
Field Detail |
---|
public int IX
public int IY
public int I
public int R
Constructor Detail |
---|
public Z80()
public Z80(java.lang.String name)
Method Detail |
---|
protected void initRegisters()
I8080
initRegisters
in class I8080
public final int I()
public final int srl(int value)
public final int sll(int value)
public final int sra(int value)
public final int sla(int value)
public final int res(int value, int bit)
value
- - valuebit
- - Number of the bit.
public final int set(int value, int bit)
public final int bit(int value, int bit)
public final void ex_af_af1()
public final int im()
public final void im(int n)
public final void exx()
protected void resetRegisters() throws SIMException
AbstractCPU
resetRegisters
in class I8080
SIMException
public final void cpSpecial(int v)
public void cpi() throws SIMException
SIMException
public void cpd() throws SIMException
SIMException
public void ind() throws SIMException
SIMException
public void ini() throws SIMException
SIMException
public void outd() throws SIMException
SIMException
public void outi() throws SIMException
SIMException
public void ldi() throws SIMException
SIMException
public void ldd() throws SIMException
SIMException
protected void initOpcodes()
initOpcodes
in class I8080
|
jmce - 1_02 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |