IMLAC: Fix bug in shift/rotate instructions.

This commit is contained in:
Lars Brinkhoff 2020-06-14 16:16:47 +02:00
parent 782ee133df
commit 582afd9250

View file

@ -214,17 +214,17 @@ static void cpu_class2 (uint16 insn)
if (insn & 0000100) /* DON */ if (insn & 0000100) /* DON */
dp_on (1); dp_on (1);
switch (insn & 0000600) { switch (insn & 0000060) {
case 0000000: /* RAL */ case 0000000: /* RAL */
cpu_ral (n); cpu_ral (n);
break; break;
case 0000200: /* RAR */ case 0000020: /* RAR */
cpu_rar (n); cpu_rar (n);
break; break;
case 0000400: /* SAL */ case 0000040: /* SAL */
AC = (AC & 0100000) | ((AC & 037777) << n); AC = (AC & 0100000) | ((AC & 037777) << n);
break; break;
case 0000600: /* SAR */ case 0000060: /* SAR */
if (AC & 0100000) if (AC & 0100000)
x = 01600000 >> n; x = 01600000 >> n;
else else