86
Chapter 3 Functions
3.2 Functions
Register information for the task whose task number = 0. (See the above diagram.)
SP correction value for the task whose task number = 0. (See the above diagram.)
Register information for the task whose task number = 1. (See the above diagram.)
SP correction value for the task whose task number = 1. (See the above diagram.)
Register information for the task whose task number = n
*1
. (See the above diagram.)
SP correction value for the task whose task number = n
*1
. (See the above diagram.)
LoaD ConTeXt
Restore context
[ Related Instructions ]
STCTX
LDCTX
LDCTX
[ Syntax ]
LDCTX
abs16,abs20
LDCTX
Ram,Rom_TBL
[ Description Example ]
[ Flag Change ]
U
I
O
B
S
Z
D
C
[ Instruction Code/Number of Cycles ]
Page=189
Flag
Change
[ Function ]
• This instruction restores task context from the stack area.
• Set the RAM address that contains the task number in abs16 and the start address of table data in abs20.
• The required register information is specified from table data by the task number and the data in the stack area
is transferred to each register according to the specified register information. Then the SP correction value is
added to the stack pointer (SP). For this SP correction value, set the number of bytes you want to the trans-
ferred.
• Information on transferred registers is configured as shown below. Logic 1 indicates a register to be
transferred and logic 0 indicates a register that is not transferred.
FB SB A1 A0 R3 R2 R1 R0
LSB
MSB
Transferred sequentially
beginning with R0
• The table data is comprised as shown below.The address indicated by abs20 is the base address of
the table. The data stored at an address apart from the base address as much as twice the content of
abs16 indicates register information, and the next address contains the stack pointer correction value.
abs20
Base address
of table
D i r e c t i o n i n
which address
increases
abs16 2
*1
n=0 to 255
Содержание R8C/Tiny Series
Страница 50: ...Chapter 3 Functions 3 1 Guide to This Chapter 3 2 Functions...
Страница 151: ...134 Chapter 3 Functions 3 2 Functions Blank for page layout...
Страница 152: ...Chapter 4 Instruction Code Number of Cycles 4 1 Guide to This Chapter 4 2 Instruction Code Number of Cycles...
Страница 278: ...Chapter 6 Calculation Number of Cycles 6 1 Instruction queue buffer...
Страница 287: ...Glossary 1 Glossary Technical terms used in this software manual are explained below They are good in this manual only...
Страница 291: ...Symbol 1 Table of symbols Symbols used in this software manual are explained below They are good in this manual only...
Страница 295: ...REVISION HISTORY R8C Tiny Series SOFTWARE MANUAL Rev Date Description Page Summary B 1 1 00 Jun 19 03 First Edition...
Страница 297: ...R8C Tiny Series Software Manual 2 6 2 Ote machi Chiyoda ku Tokyo 100 0004 Japan...