Fix RRF
This commit is contained in:
@ -295,9 +295,9 @@ public class Commands {
|
||||
|
||||
public static void RRF(int file, int destination) {
|
||||
int fcontent = DataRegister.getRegister(file);
|
||||
int carry = DataRegister.getCarryFlag();
|
||||
int carry = DataRegister.getCarryFlag() << 7;
|
||||
int contentlow = fcontent & 0b1;
|
||||
int result = fcontent >> 1 | carry;
|
||||
int result = (fcontent >> 1) | carry;
|
||||
DataRegister.setCarryFlag(contentlow);
|
||||
if (destination == 0){
|
||||
wRegister = result & 0xFF;
|
||||
|
||||
Reference in New Issue
Block a user