mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2025-01-26 22:31:38 +00:00
Whoops: The processor should only execute instructions while it is powered. Otherwise, it'll get into an infinite loop.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
This commit is contained in:
parent
711d4f4384
commit
406e651c66
@ -19,9 +19,9 @@ void EightBit::Processor::initialise() {
|
||||
|
||||
int EightBit::Processor::run(int limit) {
|
||||
int current = 0;
|
||||
do {
|
||||
while (powered() && current < limit) {
|
||||
current += singleStep();
|
||||
} while (current < limit);
|
||||
}
|
||||
return current;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user