This commit is contained in:
2024-05-06 16:25:17 +02:00
parent 061021748e
commit e6928339de
2 changed files with 4 additions and 9 deletions

View File

@ -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;

View File

@ -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();