diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/simulator.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 |