Add compiler

This commit is contained in:
Asraelite 2024-05-17 18:37:51 +02:00
parent 476972f85a
commit 3f3125ef43
31 changed files with 2625 additions and 3 deletions

View file

@ -633,7 +633,12 @@ class ParvaEmulator implements Emulator {
}
step() {
const instructionsFetched = (2 - (this.pc % 2)) + (this.previousFrameAccessedMemory ? 0 : 2);
this.previousFrameAccessedMemory = false;
for (let i = 0; i < instructionsFetched; i++) {
if (this.stepCore()) break;
}
}
stepCore(): boolean {
@ -724,6 +729,7 @@ class ParvaEmulator implements Emulator {
}
this.previousFrameAccessedMemory = true;
coreTerminates = true;
} else if (operationType === '11') {
// branching
const special = condition.startsWith('11');