Fix RRF
This commit is contained in:
@ -295,9 +295,9 @@ public class Commands {
|
|||||||
|
|
||||||
public static void RRF(int file, int destination) {
|
public static void RRF(int file, int destination) {
|
||||||
int fcontent = DataRegister.getRegister(file);
|
int fcontent = DataRegister.getRegister(file);
|
||||||
int carry = DataRegister.getCarryFlag();
|
int carry = DataRegister.getCarryFlag() << 7;
|
||||||
int contentlow = fcontent & 0b1;
|
int contentlow = fcontent & 0b1;
|
||||||
int result = fcontent >> 1 | carry;
|
int result = (fcontent >> 1) | carry;
|
||||||
DataRegister.setCarryFlag(contentlow);
|
DataRegister.setCarryFlag(contentlow);
|
||||||
if (destination == 0){
|
if (destination == 0){
|
||||||
wRegister = result & 0xFF;
|
wRegister = result & 0xFF;
|
||||||
|
|||||||
@ -74,16 +74,11 @@ public class Controller_Frontend {
|
|||||||
@FXML
|
@FXML
|
||||||
private Button autoRunGUI;
|
private Button autoRunGUI;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private void autoRunGUI(ActionEvent event) {
|
private void autoRunGUI(ActionEvent event) {
|
||||||
Thread autoRunThread = new Thread(() -> {
|
Thread autoRunThread = new Thread(() -> {
|
||||||
try {
|
try {
|
||||||
while (DataRegister.getPC() < prog.length) {
|
while (DataRegister.getPC() < prog.length ) {
|
||||||
|
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
try {
|
try {
|
||||||
@ -92,7 +87,7 @@ public class Controller_Frontend {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Thread.sleep(200); // Millisekunden
|
Thread.sleep(20); // Millisekunden
|
||||||
}
|
}
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|||||||
Reference in New Issue
Block a user