AAM and AAD instruction fixes, fixes #2551.

This commit is contained in:
OBattler
2022-08-01 23:40:11 +02:00
parent 9b37a1a0eb
commit 754058e2e5
6 changed files with 31 additions and 6 deletions

View File

@@ -31,7 +31,14 @@ static int opAAD(uint32_t fetchdat)
static int opAAM(uint32_t fetchdat)
{
int base = getbytef();
if (!base || !cpu_isintel) base = 10;
if (base == 0) {
x86de(NULL, 0);
return 1;
}
if (!cpu_isintel) base = 10;
AH = AL / base;
AL %= base;
setznp16(AX);