![Samsung S3F84B8 Скачать руководство пользователя страница 163](http://html.mh-extra.com/html/samsung/s3f84b8/s3f84b8_user-manual_347832163.webp)
S3F84B8_UM_REV 1.00
6 INSTRUCTION SET
6-41
EXIT — Exit
EXIT
Operation
: IP
@SP
SP
SP + 2
PC
@IP
IP
IP + 2
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
:
Bytes Cycles Opcode
(Hex)
opc
1
14
(internal
stack) 2F
16
(internal
stack)
Example
:
shows an example of how to use an EXIT statement.
0050
IP
0022
SP
Address
Data
0040
PC
Address
Data
Memory
0052
IP
0022
SP
Address
Data
0060
PC
Address
Data
Memory
Stack
Stack
Before
After
22
Data
20
21
22
IPH
IPL
Data
00
50
50
51
140
PCL old
PCH
Exit
60
00
2F
60
Main
Figure 6-3 Example of the usage of EXIT statement