ROR
Instruction
ROR
(rotate right) instruction shifts each bit to the right. Also, the lowest bit is copied both into the Carry
flag and into the highest bit at the same time.
ROR — Rotate Right |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Rotate Carry Left 4 Bits | Restore Value | Rotate Carry Right |
.data value BYTE 84h .code clc rcl value, 04 movzx eax, value call WriteHex |
.data value BYTE 01101011b .code shl value, 1 rcr value, 1 movzx eax, value call WriteBin |
.code stc mov ah, 10h rcr ah, 1 movzx eax, ah call WriteBin |
Output | Output | Output |