ROR 打开溢出标志
ROR turns on the Overflow flag
我在 emu8086 模拟器中有以下几行:
mov al,00100000b
ror al,8
当al
等于0000 0001
时,进位和溢出两个标志被关闭,
但是当 al
等于 1000 0000
时,两个标志被打开。
进位标志正常 - 最后一位 1
在标志中,但为什么此操作也打开溢出标志?
感谢帮助!!!
The OF flag is defined only for the 1-bit rotates; it is undefined in all other cases (except RCL and RCR instructions
only: a zero-bit rotate does nothing, that is affects no flags). For left rotates, the OF flag is set to the exclusive OR
of the CF bit (after the rotate) and the most-significant bit of the result. For right rotates, the OF flag is set to the
exclusive OR of the two most-significant bits of the result.
不完全知道为什么 ROR
有此行为,也许此功能可用于计算奇偶校验位。
我在 emu8086 模拟器中有以下几行:
mov al,00100000b
ror al,8
当al
等于0000 0001
时,进位和溢出两个标志被关闭,
但是当 al
等于 1000 0000
时,两个标志被打开。
进位标志正常 - 最后一位 1
在标志中,但为什么此操作也打开溢出标志?
感谢帮助!!!
The OF flag is defined only for the 1-bit rotates; it is undefined in all other cases (except RCL and RCR instructions only: a zero-bit rotate does nothing, that is affects no flags). For left rotates, the OF flag is set to the exclusive OR of the CF bit (after the rotate) and the most-significant bit of the result. For right rotates, the OF flag is set to the exclusive OR of the two most-significant bits of the result.
不完全知道为什么 ROR
有此行为,也许此功能可用于计算奇偶校验位。