Specifications

MICROPROCESSADORES
CONJUNTO DE INSTRUÇÕES DO 8086
4
Luís Miguel Charrua Figueiredo 4 - 6 E.N.I.D.H.
Modifies flags: CF OF
70C
Rotates the bits in the destination to the left "count" times
with all data pushed out the left side re-entering on the
right. The Carry Flag holds the last bit rotated out.
RCR - Rotate Through Carry Right
Usage: RCR dest,count
Modifies flags: CF OF
70C
Rotates the bits in the destination to the right "count"
times with all data pushed out the right side re-entering on
the left. The Carry Flag holds the last bit rotated out.
REP - Repeat String Operation
Usage: REP
Modifies flags: None
Repeats execution of string instructions while CX != 0.
After each string operation, CX is decremented and the
Zero Flag is tested. The combination of a repeat prefix
and a segment override on CPU's before the 386 may
result in errors if an interrupt occurs before CX=0. The
following code shows code that is susceptible to this and
how to avoid it:
again: rep movs byte ptr ES:[DI],ES:[SI] ; vulnerable
instr.
jcxz next ; continue if REP successful
loop again ; interrupt goofed count
next:
REPE/REPZ - Repeat Equal / Repeat Zero
Usage: REPE
REPZ
Modifies flags: None
Repeats execution of string instructions while CX != 0 and
the Zero Flag is set. CX is decremented and the Zero
Flag tested after each string operation. The combination
of a repeat prefix and a segment override on processors
other than the 386 may result in errors if an interrupt
occurs before CX=0.
REPNE/REPNZ - Repeat Not Equal / Repeat Not Zero
Usage: REPNE
REPNZ
Modifies flags: None
Repeats execution of string instructions while CX != 0 and
the Zero Flag is clear. CX is decremented and the Zero
Flag tested after each string operation. The combination
of a repeat prefix and a segment override on processors
other than the 386 may result in errors if an interrupt
occurs before CX=0.
RET/RETF - Return From Procedure
Usage: RET nBytes
RETF nBytes
RETN nBytes
Modifies flags: None
Transfers control from a procedure back to the instruction
address saved on the stack. "n bytes" is an optional
number of bytes to release. Far returns pop the IP
followed by the CS, while near returns pop only the IP
register.
ROL - Rotate Left
Usage: ROL dest,count
Modifies flags: CF OF
70C
Rotates the bits in the destination to the left "count" times
with all data pushed out the left side re-entering on the
right. The Carry Flag will contain the value of the last bit
rotated out.
ROR - Rotate Right
Usage: ROR dest,count
Modifies flags: CF OF
70C