diff options
Diffstat (limited to 'lib/simulator.c')
-rw-r--r-- | lib/simulator.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/simulator.c b/lib/simulator.c index 729e379..380c705 100644 --- a/lib/simulator.c +++ b/lib/simulator.c @@ -26,6 +26,7 @@ Uint32 LireInstruction(void) void IncrementeCompteurOrdinal(void) { Uint32 of = LireRegistreFLAG(); + EcrireRegistrePC(AdditionNonSigne(LireRegistrePC(), 1)); EcrireRegistreFLAG(of); } @@ -90,7 +91,8 @@ void Initialisation(void) EcrireRegistreSP(ADD_SP); /* initialisation du stack pointer */ } -void Flush(void) { +void Flush(void) +{ FlushMemoire(); } @@ -415,7 +417,8 @@ void Debogueur(void) fprintf(stderr, "Opcode: %02X, extension: %02X, champ1: %02X, champ2: %02X, champ3: %02X\n", Opcode(instruction), Extension(instruction), Champ1(instruction), Champ2(instruction), Champ3(instruction)); - fprintf(stderr, "%08lX:%08lX - %08lX - %08lX > ", LireRegistrePC(), instruction, LD(LireRegistrePC() + 1), LD(LireRegistrePC() + 2)); + fprintf(stderr, "%08lX:%08lX - %08lX - %08lX > ", LireRegistrePC(), instruction, + LD(LireRegistrePC() + 1), LD(LireRegistrePC() + 2)); switch (fgetc(input)) { case 'G': |