|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jfrace.cpu.Intel8080 | +--jfrace.cpu.Z80
Implements an emulation of Zilog's Z80 8-bit processor.
All the restrictions of Intel8080
hold also
for this Z80 implementation.
Field Summary | |
static int |
As
Index of register A' (accumulator). |
static int |
Bs
Index of register B' . |
static int |
Cs
Index of register C' . |
static int |
Ds
Index of register D' . |
static int |
Es
Index of register E' . |
static int |
Fs
Index of register F' (flags). |
static int |
Hs
Index of register H' . |
static int |
I
Index of register I . |
static int |
IX
Index of register IX . |
static int |
IY
Index of register IY . |
static int |
Ls
Index of register L' . |
static int |
R
Index of register R . |
static int |
SUB_MASK
Mask for the substraction flag. |
static int |
SUB_POS
Bit position of the substraction flag. |
Fields inherited from class jfrace.cpu.Intel8080 |
A, ACI, ADC, ADD, ADD_MASK, ADI, ANA, ANI, as, AUX_CARRY_MASK, AUX_CARRY_POS, B, C, CALL, CARRY_MASK, CARRY_POS, Cc, CMA, CMC, CMP, CONDITION_NAMES, CPI, D, DAA, DAD, DATA_REGISTER_NAMES, DCR, DCX, DI, E, EI, errorDescription, F, H, HLT, IN, INR, INR_MASK, interruptEnabled, INX, Jc, JMP, L, LDA, LDAX, LHLD, LXI, memory, MOV, MVI, NOP, NULL_BYTE, OP_CODE_TYPE, ORA, ORI, OUT, PARITY_MASK, PARITY_POS, PC, PCHL, POP, portBiasAddress, programCounter, PUSH, RAL, RAR, Rc, REGISTER_PAIR_NAMES, REGISTER_PAIR_NAMES2, registers, RET, RLC, ROT_MASK, RRC, RST, SBB, SBI, SHLD, SIGN_MASK, SIGN_POS, SP, SPHL, STA, stackPointer, STAX, STC, SUB, SUI, UDEF, XCHG, XRA, XRI, XTHL, ZERO_MASK, ZERO_POS |
Constructor Summary | |
Z80()
|
Method Summary | |
protected void |
addToAccu(byte operand,
int carry,
int flagMask)
Add operand and carry bit to accumulator and set the flags. |
int |
disassemble(java.lang.StringBuffer sb,
int address)
Return disassemble instruction in standard Zilog Z80 assembler syntax. |
protected int |
disassembleUDEF(byte opCode,
java.lang.StringBuffer sb,
int address)
|
java.lang.String |
getName()
Return "Zilog Z80". |
int |
getNumberOfRegisters()
Return 22. |
Register |
getRegister(int index)
Return a register. |
int |
next()
Proceed one opcode. |
protected boolean |
processINRorDCR(byte opCode,
int increment)
Process INR and DCR commands. |
protected boolean |
processUDEF(byte opCode)
Process an op-code which is undefined for Intel 8080. |
void |
reset()
Reset the CPU. |
void |
setRegisterValue(int index,
int value)
Set the value of a register. |
protected void |
subtractFromAccu(byte operand,
int carry,
int flagMask)
Subtract operand and carry from accumulator and set the flags. |
java.lang.String |
toString()
Show register states like CP/M DDTZ. |
Methods inherited from class jfrace.cpu.Intel8080 |
calculateParityFlag, checkCondition, disassembleByte, disassembleWord, getAddressSpace, getErrorDescription, getNumberOfBits, getPortBiasAddress, getProgramCounter, getRegisterPair, getWord, hardwareMoved, interrupt, popFromStack, processHLT, pushOnStack, readByte, setAccuAndFlags, setAddressSpace, setPortBiasAddress, setRegisterPair, storeByte, supportsDisassembling |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int As
A'
(accumulator).public static final int Fs
F'
(flags).public static final int Bs
B'
.public static final int Cs
C'
.public static final int Ds
D'
.public static final int Es
E'
.public static final int Hs
H'
.public static final int Ls
L'
.public static final int IX
IX
.public static final int IY
IY
.public static final int I
I
.public static final int R
R
.public static final int SUB_POS
public static final int SUB_MASK
Constructor Detail |
public Z80()
Method Detail |
public java.lang.String toString()
toString
in class Intel8080
public java.lang.String getName()
getName
in class Intel8080
public int getNumberOfRegisters()
getNumberOfRegisters
in class Intel8080
public Register getRegister(int index)
CPU
getRegister
in class Intel8080
jfrace.CPU
index
- Index of the register.null
if no register exists for the
given index.public void setRegisterValue(int index, int value)
CPU
setRegisterValue
in class Intel8080
jfrace.CPU
index
- Index of the register.value
- New value.public void reset()
Intel8080
reset
in class Intel8080
public int next()
Intel8080
next
in class Intel8080
jfrace.cpu.Intel8080
protected boolean processINRorDCR(byte opCode, int increment)
Intel8080
INR
and DCR
commands.processINRorDCR
in class Intel8080
protected void addToAccu(byte operand, int carry, int flagMask)
Intel8080
addToAccu
in class Intel8080
protected void subtractFromAccu(byte operand, int carry, int flagMask)
Intel8080
subtractFromAccu
in class Intel8080
protected boolean processUDEF(byte opCode)
processUDEF
in class Intel8080
protected int disassembleUDEF(byte opCode, java.lang.StringBuffer sb, int address)
disassembleUDEF
in class Intel8080
public int disassemble(java.lang.StringBuffer sb, int address)
disassemble
in class Intel8080
jfrace.CPU
sb
- String buffer.address
- Address of op-code.address
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |