Figure 6-3 Example Of The Usage Of Exit Statement - Samsung S3F84B8 User Manual

8-bit cmos
Hide thumbs Also See for S3F84B8:
Table of Contents

Advertisement

S3F84B8_UM_REV 1.00
EXIT — Exit
EXIT
IP
Operation:
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.
No flags are affected.
Flags:
Format:
opc
Example:
Figure 6-3
Address
0050
IP
PC
0040
0022
SP
20
IPH
21
IPL
22
Data
Stack
@SP
SP + 2
@IP
IP + 2
shows an example of how to use an EXIT statement.
Before
Data
Address
50
PCL old
51
PCH
140
Exit
00
50
Memory
Figure 6-3
Example of the usage of EXIT statement
Bytes
1
Address
0052
IP
Data
PC
0060
60
00
0022
SP
2F
22
Data
Stack
6-41
6 INSTRUCTION SET
Cycles
14 (internal stack)
16 (internal stack)
After
Data
Address
60
Main
Memory
Opcode (Hex)
2F
Data

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents