S3C8248/C8245/P8245/C8247/C8249/P8249
INSTRUCTION SET
6-41
ENTER
—
Enter
ENTER
Operation:
SP
←
SP – 2
@SP
←
IP
IP
←
PC
PC
←
@IP
IP
←
IP + 2
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:
Bytes
Cycles
Opcode
(Hex)
opc
1
14
1F
Example:
The diagram below shows one example of how to use an ENTER statement.
0050
IP
0022
SP
22
Data
Address
Data
0040
PC
40
41
42
43
Enter
Address H
Address L
Address H
Address
Data
1F
01
10
Memory
0043
IP
0020
SP
20
21
22
IPH
IPL
Data
Address
Data
0110
PC
40
41
42
43
Enter
Address H
Address L
Address H
Address
Data
1F
01
10
Memory
00
50
Stack
Stack
110
Routine
Before
After
Содержание S3C8248
Страница 31: ...ADDRESS SPACES S3C8248 C8245 P8245 C8247 C8249 P8249 2 20 NOTES ...
Страница 107: ...INTERRUPT STRUCTURE S3C8248 C8245 P8245 C8247 C8249 P8249 5 18 NOTES ...
Страница 195: ...INSTRUCTION SET S3C8248 C8245 P8245 C8247 C8249 P8249 6 88 NOTES ...
Страница 221: ...I O PORTS S3C8248 C8245 P8245 C8247 C8249 P8249 9 16 NOTES ...
Страница 245: ...16 BIT TIMER 0 1 S3C8248 C8245 P8245 C8247 C8249 P8249 12 10 NOTES ...
Страница 249: ...WATCH TIMER S3C8248 C8245 P8245 C8247 C8249 P8249 13 4 NOTES ...
Страница 267: ...A D CONVERTER S3C8248 C8245 P8245 C8247 C8249 P8249 15 6 NOTES ...
Страница 299: ...S3P8245 P8249 OTP S3C8248 C8245 P8245 C8247 C8249 P8249 21 8 NOTES ...
Страница 307: ......
Страница 309: ......
Страница 311: ......
Страница 313: ......
Страница 315: ...BOOK SPINE TEXT SAMSUNG Logo S3C8248 C8245 P8245 C8247 C8249 P8249 Microcontrollers User s Manual Rev 3 March 2002 ...