<< Previous | Next >>

RET     Return     Rabbit 2000/3000/4000/5000 Instruction

Opcode
Instruction
Operation
C9 RET PClow = (SP)
PChigh = (SP + 1) SP = SP + 2

8-Bit Access
16-Bit Unaligned
16-Bit Aligned
Rabbit 2000/3000/4000
8
n/a
n/a
Rabbit 5000
8
8
8

Flags ALTD IOI/IOE
S
Z
L/V
C
F
R
SP
S
D
-
-
-
-

Description

Transfers execution from a subroutine to the program that called the subroutine by popping the return address from the stack into PC.

First, the low-order byte of PC is loaded with the data at the memory address in SP then the high-order byte of PC is loaded with the data at the memory address immediately following the one held in SP. The data in SP is then incremented twice.


Rabbit Instructions << Previous | Next >> rabbit.com