AltairZ80: i86: Fix bug in AAD instruction.
This commit is contained in:
parent
3bba1bbe14
commit
e1d27aa167
1 changed files with 5 additions and 1 deletions
|
@ -4121,7 +4121,7 @@ static void i86op_opcD3_word_RM_CL(PC_ENV *m)
|
||||||
/* opcode=0xd4*/
|
/* opcode=0xd4*/
|
||||||
static void i86op_aam(PC_ENV *m)
|
static void i86op_aam(PC_ENV *m)
|
||||||
{ uint8 a;
|
{ uint8 a;
|
||||||
a = fetch_byte_imm(m); /* this is a stupid encoding. */
|
a = fetch_byte_imm(m);
|
||||||
if (a != 10)
|
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);
|
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. */
|
/* note the type change here --- returning AL and AH in AX. */
|
||||||
|
@ -4132,6 +4132,10 @@ static void i86op_aam(PC_ENV *m)
|
||||||
/* opcode=0xd5*/
|
/* opcode=0xd5*/
|
||||||
static void i86op_aad(PC_ENV *m)
|
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);
|
m->R_AX = aad_word(m,m->R_AX);
|
||||||
DECODE_CLEAR_SEGOVR(m);
|
DECODE_CLEAR_SEGOVR(m);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue