Download Print this page

Samsung S3C8248 User Manual page 148

8-bit cmos

Advertisement

S3C8248/C8245/P8245/C8247/C8249/P8249
ENTER
— Enter
ENTER
Operation:
SP
@SP
IP
PC
IP
This instruction is useful when implementing threaded-code languages. The contents of the
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.
Flags:
No flags are affected.
Format:
opc
Example:
The diagram below shows one example of how to use an ENTER statement.
Address
Data
0050
IP
0040
PC
0022
SP
22
Data
Stack
SP – 2
IP
PC
@IP
IP + 2
Before
Address
40
Enter
41
Address H
42
Address L
43
Address H
Memory
Bytes
1
Address
0043
IP
Data
0110
1F
PC
01
10
0020
SP
20
IPH
21
IPL
22
Data
Stack
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
6-41

Advertisement

loading

This manual is also suitable for:

C8245P8245C8249C8247P8249