|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpicmicrocontroller.Instruction
public abstract class Instruction
This class holds all the instructions of a PIC16F877. Each instruction class simulates the interior behavior of the PIC.
Field Summary | |
---|---|
protected int |
b
|
protected ConsolePane |
console
|
protected int |
d
|
protected boolean |
detail
|
protected int |
f
|
protected int |
k
|
protected PIC |
pic
|
Constructor Summary | |
---|---|
Instruction()
|
Method Summary | |
---|---|
void |
adjustCarry(int res)
Sets the carry flag to the appropriate value according to the result |
void |
adjustDigitCarry(int res)
Sets the digit flag to the appropriate value according to the result |
void |
adjustZeroFlag(int res)
Sets the zero flag to the appropriate value according to the result |
void |
setDetail(boolean value)
|
abstract void |
simulate()
Simulate the instruction by changing registers of PIC data memory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected PIC pic
protected int f
protected int d
protected int b
protected int k
protected boolean detail
protected ConsolePane console
Constructor Detail |
---|
public Instruction()
Method Detail |
---|
public abstract void simulate()
public void setDetail(boolean value)
public void adjustZeroFlag(int res)
res
- result of an instructionpublic void adjustCarry(int res)
res
- result of an instructionpublic void adjustDigitCarry(int res)
res
- result of an instruction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |