News for hackers. Stuff that matters.
Re:Reverse-engineering the division microcode in the Intel 8... by powerpiglet on Sunday April 09, 2023 @08:41PM (#35507917)
> Signed multiplication and division use an internal flag called F1 to keep track of the sign. The F1 flag is toggled by microcode through the CF1 (Complement F1) micro-instruction. The F1 flag is implemented with a flip-flop, along with a multiplexer to select the value. It is cleared when a new instruction starts, set by a REP prefix, and toggled by the CF1 micro-instruction.

Does this mean that one can run 'REP DIV' and get a negated quotient?

Re:Reverse-engineering the division microcode in the Intel 8... by kens on Sunday April 09, 2023 @11:51PM (#35509012)
Yes, REP IDIV will negate the quotient. Andrew Jenner discusses that: https://www.reenigne.org/blog/8086-microcode-disassembled/
Re:Reverse-engineering the division microcode in the Intel 8... by powerpiglet on Tuesday April 11, 2023 @04:18PM (#35530928)
That's fascinating. Thanks for the pointer.