i386: int 0 when aam has a 0 radix (nw)

This commit is contained in:
cracyc 2013-09-12 16:42:26 +00:00
parent 05929e9eaa
commit ca7decf329
2 changed files with 6 additions and 1 deletions

View File

@ -2453,6 +2453,11 @@ static void I386OP(aam)(i386_state *cpustate) // Opcode 0xd4
UINT8 tempAL = REG8(AL);
UINT8 i = FETCH(cpustate);
if(!i)
{
i386_trap(cpustate, 0, 0, 0);
return;
}
REG8(AH) = tempAL / i;
REG8(AL) = tempAL % i;
SetSZPF8( REG8(AL) );

View File

@ -1669,7 +1669,7 @@ WRITE16_MEMBER(i80186_cpu_device::internal_port_w)
UINT32 oldmap = (m_reloc & 0xfff) << 8;
if(!(data & 0x1000) || ((data & 0x1000) && (m_reloc & 0x1000)))
m_program->unmap_readwrite(oldmap, oldmap + 0xff);
if(data & 0x1000)
if(data & 0x1000) // TODO: make work with 80188 if needed
m_program->install_readwrite_handler(newmap, newmap + 0xff, read16_delegate(FUNC(i80186_cpu_device::internal_port_r), this), write16_delegate(FUNC(i80186_cpu_device::internal_port_w), this));
}
m_reloc = data;