assembly - When are the carry flags set? -
what meant "applying neg instruction nonzero operand sets carry flag."
why substracting 2 1 set carry flag? 00000001 (1) + 11111110 (-2) [in 2-complement form] --------------------- cf:1 11111111 (-1) [ why carry flag set here???]
you view neg a
equivalent sub 0, a
. if a
non-zero, set carry flag (as always result in unsigned overflow).
Comments
Post a Comment