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

■4.4 Executing special processing

DSP can perform special processing as shown below.

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

◆How to load programs using DMA instructions

Previously, we explained how to load programs from the CPU (see Section 2.3), but you can also load programs into the DSP's program RAM using the DSP's DMA instructions.
The program is loaded in the following format.

	MVI Imm,[RA0]      ; Set the external memory transfer start address
	DMA D0,[PRG],SImm  ; Set the number of transfer words, start transfer
	MVI Imm,[PC]       ; Set the program execution start address

◆Repeated execution of one instruction

The format for repeated execution of one instruction is shown below. The 1-instruction repeat execution instruction (LPS instruction, see Section 4.5 "Instructions" LOOP BOTTOM instruction section) repeatedly executes the next instruction. The number of repetitions will be one more than the set value.

	MVI Imm,[LOP]      ; Set the number of repetitions
	LPS                ; Repeat execution command
	###                ; This command is executed repeatedly.
  

◆Execution of subroutine program

DSP programs (mnemonics) do not have instructions dedicated to subroutine execution. A subroutine is realized by combining the Load immediate instruction to [PC] and the LOOP BOTTOM instruction as shown in Figure 4.4.

Figure 4.4 Execution of subroutine program


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