From 58561958ffbf7d292e2c4e755c9ae37f53acf4dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Strohh=C3=A4cker?= Date: Sat, 15 Jul 2006 20:41:42 +0000 Subject: [PATCH] fix AAM instruction Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2671 --- src/cpu/instructions.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cpu/instructions.h b/src/cpu/instructions.h index d2830733..bcda9acb 100644 --- a/src/cpu/instructions.h +++ b/src/cpu/instructions.h @@ -18,7 +18,7 @@ /* Jumps */ -/* All Byte genereal instructions */ +/* All Byte general instructions */ #define ADDB(op1,op2,load,save) \ lf_var1b=load(op1);lf_var2b=op2; \ lf_resb=lf_var1b+lf_var2b; \ @@ -578,7 +578,7 @@ SETFLAGBIT(PF,parity_lookup[reg_al]); #define AAM(op1) \ - { \ + if ((Bit8u)op1!=0) { \ Bit8u BLAH=op1; \ reg_ah=reg_al / BLAH; \ reg_al=reg_al % BLAH; \ @@ -589,7 +589,7 @@ SETFLAGBIT(OF,0); \ SETFLAGBIT(AF,0); \ lflags.type=t_UNKNOWN; \ - } + } else EXCEPTION(0); //Took this from bochs, i seriously hate these weird bcd opcodes