Keil™, An ARM® Company

8051 Instruction Set Manual

RET

The RET instruction pops the high-order and low-order bytes of the PC from the stack (and decrements the stack pointer by 2). Program execution resumes from the resulting address which is typically the instruction following an ACALL or LCALL instruction. No flags are affected by this instruction.

See Also: ACALL, LCALL

RET
CACF0RS1RS0OV P
Bytes1
Cycles2
Encoding
00100010
Operation
RET
PC15-8 = (SP)
SP = SP - 1
PC7-0 = (SP)
SP = SP - 1
Example
RET