hades.models.pic
Class PicCalcSUBWF

java.lang.Object
  extended byhades.models.pic.PicCalc
      extended byhades.models.pic.PicCalcSUBWF

class PicCalcSUBWF
extends PicCalc

SUBWF-Operation


Field Summary
static int CARRY
           
static int DIGITCARRY
           
protected  boolean skip
           
protected  PicByteReg statusReg
           
static int ZERO
           
 
Constructor Summary
PicCalcSUBWF(PicByteReg statusReg)
           
 
Method Summary
 int calc(int op1, int op2)
           
 boolean getSkip()
           
protected  void testCarry(int value)
          note that the CARRY flag is realized as NOTBORROW flag in the Pic16C84 ALU, see Microship datasheet 30445C.
protected  void testDigitCarry(int value)
          note that the DIGITCARRY flag is realized as NOTBORROW flag in the Pic16C84 ALU, see Microship datasheet 30445C.
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

PicCalcSUBWF

public PicCalcSUBWF(PicByteReg statusReg)
Method Detail

calc

public int calc(int op1,
                int op2)
Overrides:
calc in class PicCalc

testCarry

protected void testCarry(int value)
note that the CARRY flag is realized as NOTBORROW flag in the Pic16C84 ALU, see Microship datasheet 30445C. Therefore, we override the testCarry() from PicCalc to implement this (inverted) behavior. (FNH)

Overrides:
testCarry in class PicCalc

testDigitCarry

protected void testDigitCarry(int value)
note that the DIGITCARRY flag is realized as NOTBORROW flag in the Pic16C84 ALU, see Microship datasheet 30445C. Therefore, we override the testDigitCarry() from PicCalc to implement this (inverted) behavior. (FNH)

Overrides:
testDigitCarry in class PicCalc

testZero

protected void testZero(int value)

getSkip

public boolean getSkip()