0

im playing with some instructions in 8086 assembly,and im wondering why the SF flag doesnt set even though the MSB of the result is a 1.

my code is :

 mov al,-48
  
 mov bl,4

 imul bl

the result that gets stored in AX is FF40H,the flags that get set are:

CF=1

OF=1

SF=0

why is the SF still at 0 even though the result is negative? and the MSB is also 1?

blake
  • 107
  • 1
  • 7

1 Answers1

3

For this particular instruction, the sign flag is not set.

https://www.felixcloutier.com/x86/imul

Look also in the Intel Software Development Manual Vol 1 table A-2

Something Something
  • 3,999
  • 1
  • 6
  • 21