ch
This commit is contained in:
parent
1d357c6c96
commit
d40c23038a
30 changed files with 208 additions and 100 deletions
|
|
@ -26,7 +26,7 @@ void Executor::start() {
|
|||
emit signalEnded();
|
||||
break;
|
||||
}
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -55,21 +55,21 @@ void Executor::step() {
|
|||
emit signalEnded();
|
||||
return;
|
||||
}
|
||||
|
||||
emit signalStarted();
|
||||
|
||||
int pc_before = machine->getPC();
|
||||
|
||||
// Izvedi en ukaz
|
||||
machine->execute();
|
||||
|
||||
int pc_after = machine->getPC();
|
||||
emit updateRequested();
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(50));
|
||||
emit signalStopped();
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(50));
|
||||
|
||||
// Če PC ostane isti → neskončna zanka → HALT
|
||||
emit updateRequested();
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||
emit signalStopped();
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||
|
||||
if (pc_after == pc_before) {
|
||||
ended = true;
|
||||
emit signalEnded();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue