|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--jfrace.cpu.MC6502
The 6502 microprocessor.
| Field Summary | |
static int |
A
Index of register A (accumulator). |
static int |
B_POS
Bit position of the break flag. |
static int |
C_POS
Bit position of the carry flag. |
static int |
D_POS
Bit position of the decimal mode flag. |
static int |
I_POS
Bit position of the interrupt disable flag. |
static int |
N_POS
Bit position of the negative flag. |
static int |
P
Index of register P (processor status). |
static int |
PC
Index of register PC (pogram counter). |
static int |
S
Index of register S (stack pointer). |
static int |
V_POS
Bit position of the overflow flag. |
static int |
X
Index of register X (index register). |
static int |
Y
Index of register X (index register). |
static int |
Z_POS
Bit position of the zero flag. |
| Constructor Summary | |
MC6502()
|
|
| Method Summary | |
int |
disassemble(java.lang.StringBuffer sb,
int address)
Disassemble the next op-code at the given address and append it to the given string buffer. |
AddressSpace |
getAddressSpace()
Get the address space. |
java.lang.String |
getErrorDescription()
Return error description. |
java.lang.String |
getName()
Return "6502". |
int |
getNumberOfBits()
Return 8. |
int |
getNumberOfRegisters()
Return 6. |
Register |
getProgramCounter()
Return the program counter. |
Register |
getRegister(int index)
Return a register. |
void |
interrupt(long interrupt)
Not implemented. |
int |
next()
Proceed one opcode further. |
void |
reset()
Reset the hardware. |
void |
setAddressSpace(AddressSpace addressSpace)
Set the address space. |
void |
setRegisterValue(int index,
int value)
Set the value of a register. |
boolean |
supportsDisassembling()
Disassembling is supported. |
java.lang.String |
toString()
Return the state of the CPU as a well-formed string. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int A
A (accumulator).public static final int X
X (index register).public static final int Y
X (index register).public static final int S
S (stack pointer).public static final int P
P (processor status).public static final int PC
PC (pogram counter).public static final int N_POS
public static final int V_POS
public static final int B_POS
public static final int D_POS
public static final int I_POS
public static final int Z_POS
public static final int C_POS
| Constructor Detail |
public MC6502()
| Method Detail |
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getName()
getName in interface CPUpublic int getNumberOfBits()
getNumberOfBits in interface Hardwarepublic int getNumberOfRegisters()
getNumberOfRegisters in interface CPUpublic Register getRegister(int index)
CPUgetRegister in interface CPUjfrace.CPUindex - Index of the register.null if no register exists for the
given index.public Register getProgramCounter()
CPUgetProgramCounter in interface CPU
public void setRegisterValue(int index,
int value)
CPUsetRegisterValue in interface CPUjfrace.CPUindex - Index of the register.value - New value.public void setAddressSpace(AddressSpace addressSpace)
CPUsetAddressSpace in interface CPUpublic AddressSpace getAddressSpace()
CPUgetAddressSpace in interface CPUpublic void reset()
Hardwarereset in interface Hardwarepublic void interrupt(long interrupt)
interrupt in interface CPUjfrace.CPUinterrupt - Bit pattern of the interrupt. The meaning of
the bits depend on the implementation.public java.lang.String getErrorDescription()
CPUCPU.next() returns -1.getErrorDescription in interface CPUpublic int next()
CPUnext in interface CPUjfrace.CPU-1 if an error occured.public boolean supportsDisassembling()
supportsDisassembling in interface CPU
public int disassemble(java.lang.StringBuffer sb,
int address)
CPUdisassemble in interface CPUjfrace.CPUsb - String buffer.address - Address of op-code.address.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||