diff --git a/AltairZ80/i86_ops.c b/AltairZ80/i86_ops.c index c7a1f4e2..de2b8fab 100644 --- a/AltairZ80/i86_ops.c +++ b/AltairZ80/i86_ops.c @@ -4121,7 +4121,7 @@ static void i86op_opcD3_word_RM_CL(PC_ENV *m) /* opcode=0xd4*/ static void i86op_aam(PC_ENV *m) { uint8 a; - a = fetch_byte_imm(m); /* this is a stupid encoding. */ + a = fetch_byte_imm(m); if (a != 10) sim_printf("CPU: " ADDRESS_FORMAT " Error decoding AAM: Expected 0x0a but got 0x%2x.\n", m->Sp_regs.IP.I16_reg.x_reg, a); /* note the type change here --- returning AL and AH in AX. */ @@ -4132,6 +4132,10 @@ static void i86op_aam(PC_ENV *m) /* opcode=0xd5*/ static void i86op_aad(PC_ENV *m) { + uint8 a; + a = fetch_byte_imm(m); + if (a != 10) + sim_printf("CPU: " ADDRESS_FORMAT " Error decoding AAD: Expected 0x0a but got 0x%2x.\n", m->Sp_regs.IP.I16_reg.x_reg, a); m->R_AX = aad_word(m,m->R_AX); DECODE_CLEAR_SEGOVR(m); }