SDS: Fix overflow test instructions OVT and OTO

Improper implementation of the OVT and OTO instructions. OV is always zero or one, so the Boolean AND in the  original if statement would always fail. Also, these instructions are supposed to skip if overflow is not set, the opposite of the way it was coded.
This commit is contained in:
Mark Emmer 2015-02-05 17:42:04 -06:00
parent c9eb08c767
commit 3b33804327

View file

@ -969,7 +969,7 @@ switch (op) { /* case on opcode */
/* Overflow instruction */ /* Overflow instruction */
case OVF: case OVF:
if ((inst & 0100) & OV) if ((inst & 0100) && !OV)
P = (P + 1) & VA_MASK; P = (P + 1) & VA_MASK;
if (inst & 0001) if (inst & 0001)
OV = 0; OV = 0;