Can't figure out with the flag. The question is based on the example, why when getting a negative number in one case it is set, in the other there?

Example:

mov cx, 80h sub cx, 7FFFh ;cx = 8081h (Of = 0) mov cx, 80h sub cx, 8000h ;cx = 8080h (Of = 1) ; диапазон 8000h - 8080h дает флаг Of = 1 mov cx, 80h sub cx, 8080h ;cx = 8000h (Of = 1) ; далее Of = 0, результат положительный 
  • And the question is what? - Vladimir Martyanov
  • one
    It's easier to first examine the documentation on the instructions, and then ask questions. Or at least read popular articles, for example, from Wikipedia . Otherwise, it turns out that you cannot formulate a question in an understandable way. It is not clear what surprises you and what have the CX . - Zealint

0