Functional Sublw instruction (#8)
* Functional Sublw instruction * Fixed zeroBit in Addlw after overflow and result == 0
This commit is contained in:
@@ -6,7 +6,7 @@ public class CommandUtils
|
||||
{
|
||||
protected void checkZeroBit(int result)
|
||||
{
|
||||
if(result == 0){
|
||||
if((result % 256) == 0){
|
||||
Memory.setZeroBit();
|
||||
} else{
|
||||
Memory.clearZeroBit();
|
||||
@@ -22,7 +22,7 @@ public class CommandUtils
|
||||
}
|
||||
}
|
||||
|
||||
protected void checkDigitCarryBit(int result, int literal)
|
||||
protected void checkDigitCarryBit(int literal)
|
||||
{
|
||||
if(((Memory.workingRegister & 0x0F) + (literal & 0x0F)) > 15){
|
||||
Memory.setDigitCarryBit();
|
||||
|
||||
Reference in New Issue
Block a user