88
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 ]
UIOBSZDC
[ Instruction Code/Number of Cycles ]
Page=
192
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
Direction in
which address
increases
abs16 2
*1 n=0 to 255
Commentaires sur ces manuels