Understanding sign and overflow flag in assembly
问题 This question is about the cmp instruction in assembly. I cannot understand how my books reasoning regarding the SF and OF flags. cmp vleft, vright According to my book: For signed integers, there are three flags that are important: the zero (ZF) flag, the overflow (OF) flag and the sign (SF) flag. The overflow flag is set if the result of an operation overflows (or underflows). The sign flag is set if the result of an operation is negative. If vleft = vright , the ZF is set (just as for