English
Language : 

GMS30C2216 Datasheet, PDF (104/320 Pages) Hynix Semiconductor – 16/32 BIT RISC/DSP
3-42
CHAPTER 3
3.33.1 Do Instruction
The Do instruction is executed as a Software instruction. The associated subprogram is
entered, the stack address of the destination operand and one double-word source operand
are passed to it (see section 3.33. Software Instructions for details).
The half-word succeeding the Do instruction will be used by the associated subprogram to
differentiate branches to subordinate routines; the associated subprogram must increment
the saved return program counter PC by two.
Format Notation
Operation
LL
DO xx... Ld, Ls
execute Software instruction;
"xx..." stands for the mnemonic of the differentiating half-word after the OP-code of the
Do instruction.
The Do instruction must not be placed as delay instruction since then xx... cannot be
located.
Note: The Do instruction provides very code efficient passing of parameters to routines
executing software implemented extensions of the instruction set.
Branching to unimplemented subordinate routines with the interrupt-lock flag L set to one
must be excluded by bounds checks of the differentiating half-word at runtime; out-of-
range values cannot be securely excluded at the assembly level.
The L flag must be cleared when the execution of a subordinate routine exceeds the regular
interrupt latency time.
Application Note: The definition of subprograms entered via the Do instruction is reserved
for system implementations. The values assigned to the differentiating half-word xx... after
the OP-code of the Do instruction must be in ascending and contiguous order, starting with
zero. This order enables fast range checking for an upper bound and also avoids unused
space in the differentiating branch table.