当前位置 博文首页 > Aaron's Blog:Overflow flag & Carry flag

    Aaron's Blog:Overflow flag & Carry flag

    作者:[db:作者] 时间:2021-09-06 16:11

    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.

    cs
    下一篇:没有了