Exit Exit - Samsung S3P80C5 User Manual

8-bit cmos microcontrollers
Table of Contents

Advertisement

INSTRUCTION SET
EXIT
— Exit
EXIT
Operation:
IP
SP
PC
IP
This instruction is useful when implementing threaded-code languages. The stack value is
popped and loaded into the instruction pointer. The program memory word that is pointed to by
the instruction pointer is then loaded into the program counter, and the instruction pointer is
incremented by two.
Flags:
No flags are affected.
Format:
opc
Example:
The diagram below shows one example of how to use an EXIT statement.
Address
Data
0050
IP
PC
0040
0022
SP
20
IPH
00
21
IPL
50
22
Data
Stack
6-42
@SP
SP + 2
@IP
IP + 2
Before
Address
50
PCL old
51
PCH
140
Exit
Memory
Bytes
1
Address
0052
IP
Data
PC
0060
60
00
0022
SP
2F
22
Data
Stack
S3P80C5/C80C5/C80C8
Cycles
14 (internal stack)
16 (internal stack)
After
Data
Address
60
Main
Memory
Opcode (Hex)
2F
Data

Advertisement

Table of Contents
loading

This manual is also suitable for:

S3c80c5S3c80c8

Table of Contents