Enter — Enter - Samsung S3F84B8 User Manual

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

Advertisement

S3F84B8_UM_REV 1.00
6.3.28 ENTER — ENTER
ENTER
SP
Operation:
@SP
IP
PC
IP
This instruction is useful while implementing threaded-code languages. The contents of
instruction pointer are pushed to the stack. The program counter (PC) value is then written to the
instruction pointer. The program memory word that is pointed to by the instruction pointer is
loaded into the PC, and the instruction pointer is incremented by two.
No flags are affected.
Flags:
Format:
opc
Example:
Figure 6-2
Address
Data
0050
IP
0040
PC
SP
0022
22
Data
Stack
SP – 2
IP
PC
@IP
IP + 2
shows an example of how to use an ENTER statement.
Before
Address
40
Enter
41
Address H
42
Address L
43
Address H
Memory
Figure 6-2
Example of the Usage of ENTER Statement
Bytes
1
Address
0043
IP
Data
0110
1F
PC
01
10
SP
0020
20
IPH
21
IPL
22
Data
Stack
6-40
6 INSTRUCTION SET
Cycles
Opcode
(Hex)
14
1F
After
Data
Address
40
Enter
41
Address H
42
Address L
43
Address H
00
110
Routine
50
Memory
Data
1F
01
10

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents