From 5796178981fe51ea279b56a2dca19cf19fb73edf Mon Sep 17 00:00:00 2001 From: Pixel <> Date: Mon, 23 Apr 2001 21:09:03 +0000 Subject: Bug dans le simulateur (2) et ajout de l'exemple "Puissance4" --- lib/simulator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/simulator.c') diff --git a/lib/simulator.c b/lib/simulator.c index f2749e0..c7c709c 100644 --- a/lib/simulator.c +++ b/lib/simulator.c @@ -228,14 +228,14 @@ void DecodeExec(Uint32 instruction) /* Pas de MOV conditionnel */ if (ValeurBit(Extension(instruction), 1) == 0) { /* Mov arg1 arg2 */ if (ValeurBit(Extension(instruction), 0) == 0) { /* arg2 = reg */ - if (champ(Champ1(instruction), 2) == 0) { /* r/m de arg1 = 0 */ + if (champ(Champ1(instruction), 4) == 0) { /* r/m de arg1 = 0 */ EcrireRegistre(Champ3(instruction), LireRegistre(Champ2(instruction))); } else { ST(Adresse (Champ1(instruction), instruction), LireRegistre(Champ2(instruction))); } } else { /* arg2 = imm32 */ - if (champ(Champ1(instruction), 2) == 0) { /* r/m de arg1 = 0 */ + if (champ(Champ1(instruction), 4) == 0) { /* r/m de arg1 = 0 */ EcrireRegistre(Champ3(instruction), LireInstruction()); IncrementeCompteurOrdinal(); } else { @@ -246,7 +246,7 @@ void DecodeExec(Uint32 instruction) } } else { /* mov arg2, arg1 */ if (ValeurBit(Extension(instruction), 0) == 0) { /* arg2 = reg */ - if (champ(Champ1(instruction), 2) == 0) { /* r/m de arg1 = 0 */ + if (champ(Champ1(instruction), 4) == 0) { /* r/m de arg1 = 0 */ EcrireRegistre(Champ2(instruction), LireRegistre(Champ3(instruction))); } else { EcrireRegistre(Champ2 -- cgit v1.2.3