Two of the bits in the FLAGS register that add and sub instructions set are overflow and carry flag:
Overflow flag:
Set for signed arithmetic when the ture result is too big to fit into the destination.
Carry flag:
If there is a carry in the MSB of an addition or a borrow in the MSB of a subtraction, the carry flag is set. Thus, it can be used to detect overflow for unsigned arithmetic.
本文地址:http://com.8s8s.com/it/it25654.htm