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;
|
||||
|
||||
@ -74,16 +74,11 @@ public class Controller_Frontend {
|
||||
@FXML
|
||||
private Button autoRunGUI;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@FXML
|
||||
private void autoRunGUI(ActionEvent event) {
|
||||
Thread autoRunThread = new Thread(() -> {
|
||||
try {
|
||||
while (DataRegister.getPC() < prog.length) {
|
||||
while (DataRegister.getPC() < prog.length ) {
|
||||
|
||||
Platform.runLater(() -> {
|
||||
try {
|
||||
@ -92,7 +87,7 @@ public class Controller_Frontend {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
Thread.sleep(200); // Millisekunden
|
||||
Thread.sleep(20); // Millisekunden
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
|
||||
Reference in New Issue
Block a user