|
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.freescale.M68HC05
public class M68HC05
Motorola / Freescale M68HC05 family.
Coded using M68HC05TB.PDF Implemented registers :
Field Summary | |
---|---|
protected int |
resetVector
Address of reset vector (default to invalid address) |
Fields inherited from class jmce.sim.cpu.AbstractCPU |
---|
interrupts, io, memory, NS100MS, NS1MS |
Fields inherited from interface jmce.freescale.M68HC05Constants |
---|
CCR_AND_MASK, CCR_C, CCR_H, CCR_I, CCR_N, CCR_OR_MASK, CCR_Z, EXT_INTERRUPT, M68HC05_RESET_VECTOR, SWI_INTERRUPT, TIMER_INTERRUPT |
Fields inherited from interface jmce.sim.CPU |
---|
BIG_ENDIAN, IO_MEMORY, LITTLE_ENDIAN, MAIN_MEMORY |
Constructor Summary | |
---|---|
|
M68HC05()
Default constructor. |
protected |
M68HC05(java.lang.String name)
Constructor with name |
Method Summary | |
---|---|
protected void |
ccr(int mask,
boolean mode)
Set/clear bit in the CCR register |
int |
fireISR(Interrupt irq)
This function must be overridden from sub class that implements interrupt. |
int |
getWord(int a)
Read one word (16 bit) from the main memory. |
void |
init(Hardware parent)
Initialize the hardware. |
protected void |
initMemories()
|
protected void |
initOpcodes()
Initialize the CPU opcodes |
protected void |
initOpcodesJumpAddressingMode(int base,
jmce.freescale.M68HC05.CPUOperation op)
Initialize opcode for jmp/call address mode. |
protected void |
initPeripherals()
No peripherals are build in on 6805 this function is present only for compatibility |
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. |
protected int |
pop()
Pop 8 bit from the stack |
protected int |
pop16()
Pop a 16 bit value from the stack. |
protected void |
push(int value)
Push a 8 bit value on the stack |
protected void |
push16(int value)
Push a 16 bit on the stack. |
void |
reset()
Reset the CPU and call all installed ResetListener. |
protected void |
setResetVector(int r)
Setup the reset vector used only by sub class |
void |
setWord(int a,
int v)
Set one word (16 bit) in the main memory |
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 |
---|
protected int resetVector
Constructor Detail |
---|
protected M68HC05(java.lang.String name)
public M68HC05()
Method Detail |
---|
protected void initRegisters()
protected void push(int value) throws SIMException
SIMException
protected int pop() throws SIMException
SIMException
protected void push16(int value) throws SIMException
SIMException
protected int pop16() throws SIMException
SIMException
public final void setWord(int a, int v) throws SIMException
CPU
setWord
in interface CPU
a
- - Addressv
- - value
SIMException
public void reset() throws SIMException
AbstractCPU
Reset is performed in this order :
reset
in interface Hardware
reset
in class AbstractCPU
SIMException
public int fireISR(Interrupt irq) throws SIMException
AbstractCPU
fireISR
in interface CPU
fireISR
in class AbstractCPU
SIMException
public final int pc() throws SIMException
CPU
pc
in interface CPU
SIMException
public final void pc(int pc) throws SIMException
CPU
pc
in interface CPU
pc
- - New value for the program counter.
SIMException
public final boolean isInterruptEnabled()
CPU
isInterruptEnabled
in interface CPU
public final int getWord(int a) throws SIMException
CPU
getWord
in interface CPU
a
- - Address
SIMException
protected final void ccr(int mask, boolean mode)
protected void initMemories() throws SIMException
SIMException
protected void initPeripherals() throws SIMException
SIMException
public void init(Hardware parent) throws SIMException
Hardware
init
in interface Hardware
init
in class AbstractCPU
parent
- Parent of this hardware.
SIMException
protected void initOpcodesJumpAddressingMode(int base, jmce.freescale.M68HC05.CPUOperation op)
protected void initOpcodes()
protected void setResetVector(int r)
|
jmce - 1_02 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |