No-Flags
This commit is contained in:
@ -48,11 +48,15 @@ public class DataRegister {
|
||||
}
|
||||
|
||||
public static void clearBit(int address, int bit) {
|
||||
dataRegister[bank() + address] -= (int) Math.pow(2, bit);
|
||||
if (getBit(address, bit) == 1) {
|
||||
dataRegister[bank() + address] -= (int) Math.pow(2, bit);
|
||||
}
|
||||
}
|
||||
|
||||
public static void setBit(int address, int bit) {
|
||||
dataRegister[bank() + address] += (int) Math.pow(2, bit);
|
||||
if (getBit(address, bit) == 0) {
|
||||
dataRegister[bank() + address] += (int) Math.pow(2, bit);
|
||||
}
|
||||
}
|
||||
|
||||
private static int programCounter = 0;
|
||||
@ -81,5 +85,4 @@ public class DataRegister {
|
||||
public static int getPC(){
|
||||
return programCounter;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user