hades.models.pic
Class PicCalc

java.lang.Object
  extended byhades.models.pic.PicCalc
Direct Known Subclasses:
PicCalcADDWF, PicCalcANDWF, PicCalcCLR, PicCalcCOMF, PicCalcDECF, PicCalcDECFSZ, PicCalcINCF, PicCalcINCFSZ, PicCalcIORWF, PicCalcMOVF, PicCalcMOVLW, PicCalcMOVWF, PicCalcNOP, PicCalcRLF, PicCalcRRF, PicCalcSUBWF, PicCalcSWAPF, PicCalcXORWF

class PicCalc
extends java.lang.Object

Perfom one calculation, this is defined to do both register and literal calculations with different opcodes for equal instructions


Field Summary
static int CARRY
           
static int DIGITCARRY
           
protected  boolean skip
           
protected  PicByteReg statusReg
           
static int ZERO
           
 
Constructor Summary
PicCalc(PicByteReg _statusReg)
           
 
Method Summary
 int calc(int op1, int op2)
           
 boolean getSkip()
           
protected  void testCarry(int value)
           
protected  void testDigitCarry(int value)
           
protected  void testZero(int value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

statusReg

protected PicByteReg statusReg

skip

protected boolean skip

CARRY

public static int CARRY

DIGITCARRY

public static int DIGITCARRY

ZERO

public static int ZERO
Constructor Detail

PicCalc

public PicCalc(PicByteReg _statusReg)
Method Detail

testZero

protected void testZero(int value)

testCarry

protected void testCarry(int value)

testDigitCarry

protected void testDigitCarry(int value)

calc

public int calc(int op1,
                int op2)

getSkip

public boolean getSkip()