Samsung KS57C2308 Manual page 152

Single-chip cmos microcontroller
Table of Contents

Advertisement

SAM47 INSTRUCTION SET
RET
— Return From Subroutine
RET
Operation:
Operand
Description:
RET pops the PC values successively from the stack, incrementing the stack pointer by six.
Program execution continues from the resulting address, generally the instruction immediately
following a CALL or CALLS.
Operand
Example:
The stack pointer contains the value 0FAH. RAM locations 0FAH, 0FBH, 0FCH, and and 0FDH
contain 1H, 0H, 5H, and 2H, respectively. The instruction
RET
leaves the stack pointer with the new value of 00H and program execution continues from
location
0125H.
During a return from subroutine, PC values are popped from stack locations as follows:
SP
SP + 1 (0FBH)
SP + 2(0FCH)
SP + 3(0FDH)
SP + 4(0FEH)
SP + 5(0FFH)
SP + 6(00H)
5-78
Return from subroutine
1
1
0
(0FAH)
PC11–PC8
0
0
PC3–PC0
PC7–PC4
0
0
0
0
Operation Summary
Binary Code
0
0
1
0
PC13
PC12
EMB
ERB
0
0
KS57C2308/P2308/C2316/P2316
Bytes
1
Operation Notation
1
PC13–8
(SP+1) (SP)
PC7–0
(SP+2) (SP+3)
PSW
EMB,ERB
SP
SP+6
Cycles
3

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

P2308C2316P2316Ks57p2308Ks57c2316Ks57p2316

Table of Contents