You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If IDIV would produce a quotient of 0x8000 (word) or 0x80 (byte), the real 8086 traps (INT 0, divide overflow). 8086-Emulator yields 0x8000 and continues. (Note this behavior changed between 8086 and 80386, not sure what the 80186/80286 did.)
The text was updated successfully, but these errors were encountered:
neldredge
changed the title
IDIV should trap when producing most negative result
DIV/IDIV should trap on all overflow, not just divide by zero
Mar 9, 2023
In fact the emulator only traps on div/idiv when the divisor is actually zero. It should trap whenever the mathematical result does not fit in the destination register. For instance
If IDIV would produce a quotient of 0x8000 (word) or 0x80 (byte), the real 8086 traps (INT 0, divide overflow). 8086-Emulator yields 0x8000 and continues. (Note this behavior changed between 8086 and 80386, not sure what the 80186/80286 did.)
The text was updated successfully, but these errors were encountered: