HARDWARE ManualSCU User's Manual
BackForward
SCU User's Manual / Chapter 4 DSP Control

■ 4.4 Execution of special processing

The DSP can perform the special processing shown below.

  1. How to load a program by DMA instruction
  2. Repeated execution of one instruction
  3. Execution of subroutine program

◆ How to load a program by DMA instruction

We mentioned earlier how to load a program from the CPU (see Section 2.3), but you can also use the DSP's DMA instructions to load the program into the DSP's program RAM.
The program will be loaded in the following format.

	MVI Imm, [RA0]; External memory transfer start address set DMA D0, [PRG], SImm; Transfer word number set, Transfer start MVI Imm, [PC]; Program execution start address set

◆ Repeated execution of one instruction

The format for repeated execution of one instruction is shown below. One instruction repeat execution instruction (LPS instruction, refer to Section 4.5 "Instruction" LOOP BOTTOM instruction section) is to repeatedly execute the next instruction. The number of repetitions is executed once more than the set value.

	MVI Imm, [LOP]; Repeat count set LPS; Repeat execution command ###; This command is repeatedly executed.
  

◆ Execution of subroutine program

The DSP program (mnemonic) does not have instructions dedicated to executing subroutines. The subroutine is realized as shown in Fig. 4.4 by combining the Load immediate instruction to [PC] and the LOOP BOTTOM instruction.

Figure 4.4 Executing a subroutine program


BackForward
HARDWARE ManualSCU User's Manual
Copyright SEGA ENTERPRISES, LTD., 1997