rcr

8086 and later

Rotate Right through Carry Flag

rcr r/m8, 1 | rcr r/m16, 1 | rcr r/m32, 1 | rcr r/m64, 1 | rcr r/m8, cl | rcr r/m16, cl | rcr r/m32, cl | rcr r/m64, cl | rcr r/m8, imm8 | rcr r/m16, imm8 | rcr r/m32, imm8 | rcr r/m64, imm8 | rcr [reg8], r/m8, 1 | rcr [reg16], r/m16, 1 | rcr [reg32], r/m32, 1 | rcr [reg64], r/m64, 1 | rcr [reg8], r/m8, cl | rcr [reg16], r/m16, cl | rcr [reg32], r/m32, cl | rcr [reg64], r/m64, cl | rcr [reg8], r/m8, imm8 | rcr [reg16], r/m16, imm8 | rcr [reg32], r/m32, imm8 | rcr [reg64], r/m64, imm8

RCL and RCR perform a 9-bit, 17-bit or 33-bit bitwise rotation operation, involving the given source/destination (first) operand and the carry bit. Thus, for example, in the operation RCL AL,1, a 9-bit rotation is performed in which AL is shifted left by 1, the top bit of AL moves into the carry flag, and the original value of the carry flag is placed in the low bit of AL.

The number of bits to rotate by is given by the second operand. Only the bottom five bits of the rotation count are considered by processors above the 8086.

You can force the longer (286 and upwards, beginning with a C1 byte) form of RCL foo,1 by using a BYTE prefix: \c{RCL foo,BYTE 1}. Similarly with RCR.

Loading...

Forms

Every form of rcr the assembler accepts, from NASM's own instruction table. The second column is the processor that introduced the form; a badge marks a form that needs an extension, that is lockable, or that long mode dropped.

FormSinceNotes
rcr r/m8, 18086
rcr r/m16, 18086
rcr r/m32, 1386
rcr r/m64, 1x86-64long
rcr r/m8, cl8086
rcr r/m16, cl8086
rcr r/m32, cl386
rcr r/m64, clx86-64long
rcr r/m8, imm8186
rcr r/m16, imm8186
rcr r/m32, imm8386
rcr r/m64, imm8x86-64long
rcr [reg8], r/m8, 1x86-64apxlong
rcr [reg16], r/m16, 1x86-64apxlong
rcr [reg32], r/m32, 1x86-64apxlong
rcr [reg64], r/m64, 1x86-64apxlong
rcr [reg8], r/m8, clx86-64apxlong
rcr [reg16], r/m16, clx86-64apxlong
rcr [reg32], r/m32, clx86-64apxlong
rcr [reg64], r/m64, clx86-64apxlong
rcr [reg8], r/m8, imm8x86-64apxlong
rcr [reg16], r/m16, imm8x86-64apxlong
rcr [reg32], r/m32, imm8x86-64apxlong
rcr [reg64], r/m64, imm8x86-64apxlong