Masm32 SDK description, downloads and other helpful links
Started by xXZexxMooreXx, March 01, 2017, 07:14:55 PM
mov ax, 7FF0hadd al, 10h ; a) CF = 1, SF = 0, ZF = 1, OF = 0 add ah, 1 ; b) CF = 0, SF = 1, ZF = 0, OF = 1add ax, 2 ; c) CF = ?, SF = ?, ZF = ?, OF = ?
Aflags: CZsox:al 00 ; new result is zero, and to reach it, al had to go beyond 255 = carry!Bflags: czSOx:ah 80 ; not beyond 255, but result is negativeCflags: czSox:ax 8002 ; again, not beyond 65535, but result is negative
Quote from: jj2007 on March 01, 2017, 07:57:42 PMRe overflow flag: the signed two's-complement result would not fit in the number of bits used for the operation or (much more detailed) http://teaching.idallen.com/dat2343/10f/notes/040_overflow.txt