|
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.i8086.I8086
public class I8086
Intel 8086
Field Summary | |
---|---|
int |
AX
General register |
int |
BP
Special register |
int |
BX
General register |
int |
CS
Segment register |
int |
CX
General register |
int |
DI
Index register |
int |
DS
Segment register |
int |
DX
General register |
int |
ES
Segment register |
int |
F
Special register |
int |
IP
Special register |
int |
SI
Index register |
int |
SP
Special register |
int |
SS
Segment register |
Fields inherited from class jmce.sim.cpu.AbstractCPU |
---|
interrupts, io, memory, NS100MS, NS1MS |
Fields inherited from interface jmce.intel.i8086.I8086Constants |
---|
AX_R, BP_R, BX_R, CS_R, CX_R, DI_R, DS_R, DX_R, ES_R, F_AF, F_CF, F_DF, F_IF, F_OF, F_PF, F_R1, F_R3, F_R5, F_SF, F_TF, F_ZF, REPE_P, REPNE_P, RESET_CS, RESET_IP, SI_R, SP_R, SS_R |
Fields inherited from interface jmce.sim.CPU |
---|
BIG_ENDIAN, IO_MEMORY, LITTLE_ENDIAN, MAIN_MEMORY |
Constructor Summary | |
---|---|
I8086()
|
Method Summary | |
---|---|
protected int |
add16(int a,
int b)
|
protected int |
add8(int a,
int b)
|
protected Runtime8086 |
createRuntime()
CPU implementing istruction with RuntimeOpcode must in this method create the appropriate runtime class. |
int |
get_cd(int pc)
Get operand ssss:oooo |
java.lang.String |
get_ew(Runtime8086 r)
|
int |
getByte(int s,
int a)
|
int |
getSegBase(int s)
|
protected int |
getValue_eb(Runtime8086 r)
|
protected int |
getValue_ew(Runtime8086 r)
|
int |
getValue_rb(int r)
|
int |
getValue_rw(int opcode)
|
int |
getWord(int a)
Read one word (16 bit) from the main memory. |
int |
getWord(int s,
int a)
|
void |
init(Hardware parent)
Initialize the hardware. |
protected void |
initMemories()
|
protected void |
initOpcodeALU(int base,
int time,
java.lang.String desc,
jmce.intel.i8086.I8086.ALUOP op)
|
protected void |
initOpcodeDecoder()
|
protected void |
initOpcodes()
|
protected void |
initPeripherals()
|
protected void |
initRegisters()
|
boolean |
isInterruptEnabled()
Return the status of the interrupt enable |
int |
pc()
Return the register used as program counter |
void |
pc(int pc)
Set the program counter. |
void |
setByte(int s,
int a,
int v)
|
protected void |
setValue_eb(Runtime8086 r,
int value)
|
protected void |
setValue_ew(Runtime8086 r,
int value)
|
void |
setValue_rb(int r,
int v)
|
void |
setValue_rw(int r,
int value)
Set value for operand rw (word register) |
protected void |
setValue_sw(Runtime8086 r,
int value)
|
void |
setWord(int a,
int v)
Set one word (16 bit) in the main memory |
void |
setWord(int s,
int a,
int v)
|
protected int |
sub16(int a,
int b)
|
protected int |
sub8(int a,
int b)
|
protected int |
xor16(int a,
int b)
|
protected int |
xor8(int a,
int b)
|
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 F
public int IP
public int SP
public int BP
public int SI
public int DI
public int AX
public int BX
public int CX
public int DX
public int CS
public int DS
public int SS
public int ES
Constructor Detail |
---|
public I8086()
Method Detail |
---|
public final void setWord(int a, int v) throws SIMException
CPU
setWord
in interface CPU
a
- - Addressv
- - value
SIMException
public final int getWord(int a) throws SIMException
CPU
getWord
in interface CPU
a
- - Address
SIMException
protected void initPeripherals() throws SIMException
SIMException
protected void initMemories()
public void init(Hardware parent) throws SIMException
Hardware
init
in interface Hardware
init
in class AbstractCPU
parent
- Parent of this hardware.
SIMException
protected void initOpcodeALU(int base, int time, java.lang.String desc, jmce.intel.i8086.I8086.ALUOP op)
protected final int add8(int a, int b)
protected final int add16(int a, int b)
protected final int sub8(int a, int b)
protected final int sub16(int a, int b)
protected final int xor8(int a, int b)
protected final int xor16(int a, int b)
protected void initOpcodes()
protected void setValue_sw(Runtime8086 r, int value)
public int getSegBase(int s) throws SIMException
SIMException
public void setByte(int s, int a, int v) throws SIMException
SIMException
public void setWord(int s, int a, int v) throws SIMException
SIMException
public int getWord(int s, int a) throws SIMException
SIMException
public int getByte(int s, int a) throws SIMException
SIMException
public java.lang.String get_ew(Runtime8086 r) throws SIMException
SIMException
protected void setValue_eb(Runtime8086 r, int value) throws SIMException
SIMException
protected void setValue_ew(Runtime8086 r, int value) throws SIMException
SIMException
protected int getValue_ew(Runtime8086 r) throws SIMException
SIMException
protected int getValue_eb(Runtime8086 r) throws SIMException
SIMException
protected void initOpcodeDecoder()
protected void initRegisters()
public boolean isInterruptEnabled()
CPU
isInterruptEnabled
in interface CPU
public final void pc(int pc)
CPU
pc
in interface CPU
pc
- - New value for the program counter.public int pc()
CPU
pc
in interface CPU
public int getValue_rb(int r)
public int getValue_rw(int opcode)
public void setValue_rb(int r, int v)
public void setValue_rw(int r, int value)
public int get_cd(int pc) throws SIMException
SIMException
protected Runtime8086 createRuntime() throws SIMException
AbstractCPU
createRuntime
in class AbstractCPU
SIMException
|
jmce - 1_02 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |