汇编中OF,PF,AF,ZF,SF,CF各自的意义

1.CF-Carry Flag(进位标志位)

主要用来反映运算是否产生进位或错位,产生进位或错位则CF = 1,否则CF = 0。

Equals to 1 if a transfer occurs beyond the limits of N bits or happens a loan from outside.

2.PF-Parity Flag (奇偶标志位)

用于反映运算结果中“1”的个数的奇偶性,如果“1”的个数为偶数,则PF = 1,否则,PF = 0。

It is equal to 1 if the operation result's low byte contains an even number of ones.

3.AF-Auxiliary(Adjust) Carry Flag (辅助进位标志位)

运算时不论长度是多少,看最后四位,最后四位向前有进位或借位,则AF = 1,否则,AF = 0。

Equals to 1 if there is a loan or a transfer between the first and second nibble (half of byte).

4.ZF-Zero Flag (零标志位)

用来反映运算结果是否为0,如果运算结果为0,则ZF = 1,否则,ZF = 0。

Equals 1 if the result of the operation is zero.

5.SF-Sign Flag (符号标志位)

二进制中0表示正,1表示负,用来反映运算结果正负的符号位,运算结果为正时,SF = 0,否则,

SF = 1。

It is equal to 1 if the result of the operation is negative, otherwise - 0.

6.OF-Overflow Flag (溢出标志位)

用于反映有符号数运算所得结果是否溢出,如果运算结果超过当前运算位数表示的范围时,则为溢出,OF = 1; 不溢出时,OF = 0。

It is equal to 1 if the operation's result does not fit the N bit (when using a two's complement).

  • 3
    点赞
  • 40
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值