English
Language : 

C166SV2 Datasheet, PDF (293/438 Pages) Infineon Technologies AG – 16-Bit Microcontroller
User Manual
C166S V2
Detailed Instruction Description
RETP
Group
Return from Subroutine and Pop Word
Return Instructions
Syntax
RETP op1
Source Operand(s)
none
RETP
Destination Operand(s) op1 → WORD
Operation
(IP) ← ((SP))
(SP) ← (SP) + 2
(tmp) ← ((SP))
(SP) ← (SP) + 2
(op1) ← (tmp)
Description
Returns from a subroutine. First the IP is popped from the system stack and then the
next word is popped from the system stack into the operand specified by op1.
CPU Flags
E
Z
V
C
N
*
*
-
-
*
E Set if the value of the popped word represents the lowest possible
negative number. Cleared otherwise. Used to signal the end of a table.
Z Set if the value of the popped word equals zero. Cleared otherwise.
V Not affected.
C Not affected.
N Set if the most significant bit of the popped word is set. Cleared
otherwise.
Encoding
Mnemonic
RETP
reg
Format
EB RR
Bytes
2
User Manual
8-293
V 1.7, 2001-01