NEC CLR1 instructions (#8)

Wraps up the fixed bitfield manipulation instructions
This commit is contained in:
Cacodemon345
2022-09-05 02:00:29 +06:00
committed by GitHub
parent 2280685526
commit 199bbed5ee

View File

@@ -1805,6 +1805,25 @@ execx86(int cycs)
handled = 1;
break;
}
case 0x12: /* CLR1 r8/m8, CL*/
case 0x13: /* CLR1 r16/m16, CL*/
case 0x1a: /* CLR1 r8/m8, imm3 */
case 0x1b: /* CLR1 r16/m16, imm4 */
{
bits = 8 << (opcode & 0x1);
do_mod_rm();
wait(3, 0);
{
uint8_t bit = (opcode & 0x8) ? (pfq_fetchb()) : (CL);
bit &= ((1 << (3 + (opcode & 0x1))) - 1);
read_ea(0, bits);
if (bits == 8) seteab((cpu_data & 0xFF) & ~(1 << bit));
else seteaw((cpu_data & 0xFFFF) & ~(1 << bit));
}
handled = 1;
break;
}
default: {
opcode = orig_opcode;
break;