★ HARDWARE Manual ★ SCU User's Manual
▲ Back | Forward ▼
SCU User's Manual / Chapter 4 DSP Control
■ 4.2 Instruction list
Below is a list of the instructions used by the SCU-DSP.
◆ Arithmetic instructions- NOP
- Do nothing.
- AND
- It takes the logical product of [ACL] and [PL].
- OR
- OR the [ACL] and [PL].
- XOR
- Takes the exclusive OR of [ACL] and [PL].
- ADD
- Add [ACL] and [PL].
- SUB
- Subtract [PL] from [ACL].
- AD2
- Add [ACH] [ACL] and [PH] [PL].
- SR
- Shifts [ACL] 1 bit to the right and stores the LSB in the carry flag.
- RR
- Rotate [ACL] 1 bit to the right and store the LSB in the carry flag.
- SL
- Shift [ACL] 1 bit to the left, store 0 in the LSB of [ACL] and MSB in the carry flag.
- RL
- Rotate the ACL 1 bit to the left and store the MSB in the carry flag.
- RL8
- Rotate [ACL] 8-bit left and store b24 in the carry flag.
- NOP
- Do nothing.
- MOV [s], X
- Transfer data from data RAM to [RX].
- MOV MUL, P
- Transfer the data of [MULTIPLIER] to [PH] [PL].
- MOV [s], P
- Transfer data from data RAM to [PL].
- NOP
- Do nothing.
- MOV [s], Y
- Transfer data from data RAM to [RY].
- CLR A
- Clear [ACH] and [ACL] to 0.
- MOV ALU, A
- Transfer the data of [ALU] to [ACH] [ACL].
- MOV [s], A
- Transfer data from data RAM to [ACL].
- NOP
- Do nothing.
- MOV SImm, [d]
- Stores SImm (short immediate) data in the data RAM or register specified by [d].
- MOV [s], [d]
- Transfers data from the data RAM or register specified by [s] to the data RAM or register specified by [d].
- MVI Imm, [d]
- Stores Imm (immediate) data in the data RAM or register specified by [d].
- MVI Imm, [d], Z
- Only when the Z (zero flag) of the program control port is 1, the Imm (immediate) data is stored in the data RAM or register specified by [d].
- MVI Imm, [d], NZ
- Only when the Z (zero flag) of the program control port is 0, the Imm (immediate) data is stored in the data RAM or register specified by [d].
- MVI Imm, [d], S
- Only when the S (sign flag) of the program control port is 1, the Imm (immediate) data is stored in the data RAM or register specified by [d].
- MVI Imm, [d], NS
- Only when the S (sign flag) of the program control port is 0, the Imm (immediate) data is stored in the data RAM or register specified by [d].
- MVI Imm, [d], C
- Only when the C (carry flag) of the program control port is 1, the Imm (immediate) data is stored in the data RAM or register specified by [d].
- MVI Imm, [d], NC
- Only when the C (carry flag) of the program control port is 0, the Imm (immediate) data is stored in the data RAM or register specified by [d].
- MVI Imm, [d], TO
- Only when the TO (D0 bus DMA executing flag) of the program control port is 1, the Imm (immediate) data is stored in the data RAM or register specified by [d].
- MVI Imm, [d], NTO
- Only when the TO (D0 bus DMA executing flag) of the program control port is 0, the Imm (immediate) data is stored in the data RAM or register specified by [d].
- MVI Imm, [d], ZS
- Only when either Z (zero flag) or S (sign flag) of the program control port is 1, the Imm (immediate) data is stored in the data RAM or register specified by [d].
- MVI Imm, [d], NZS
- Only when both Z (zero flag) and S (sign flag) of the program control port are 0, the Imm (immediate) data is stored in the data RAM or register specified by [d].
- DMA D0, [RAM], SImm
- Set the SImm (Short Immediate) data as a transfer counter in the transfer word counter ([TN0]), and transfer the data from the outside to the RAM area specified by [RAM] using the D0 bus. The transfer start address ([RA0]) and transfer word count counter ([TN0]) are updated to the values at the end of transfer.
- DMA [RAM], D0, SImm
- Set the SImm (Short Immediate) data as a transfer counter in the transfer word counter ([TN0]), and transfer the data to the outside from the RAM area specified in [RAM] using the D0 bus. The transfer start address ([WA0]) and transfer word count counter ([TN0]) are updated to the values at the end of transfer.
- DMA D0, [RAM], [s]
- Set the data in the data RAM specified by [s] as a transfer counter in the transfer word counter ([TN0]), and use the D0 bus to externally transfer the data to the RAM area specified by [RAM]. forward. The transfer start address ([RA0]) and transfer word count counter ([TN0]) are updated to the values at the end of transfer.
- DMA [RAM], D0, [s]
- Set the data in the data RAM specified by [s] as a transfer counter in the transfer word counter ([TN0]), and use the D0 bus to transfer data to the outside from the RAM area specified by [RAM]. forward. The transfer start address ([WA0]) and transfer word count counter ([TN0]) are updated to the values at the end of transfer.
- DMAH D0, [RAM], SImm
- Set the SImm (Short Immediate) data as a transfer counter in the transfer word counter ([TN0]), and transfer the data from the outside to the RAM area specified by [RAM] using the D0 bus. The transfer start address ([RA0]) and the transfer word count counter ([TN0]) hold the values at the start of the transfer.
- DMAH [RAM], D0, SImm
- Set the SImm (Short Immediate) data as a transfer counter in the transfer word counter ([TN0]), and transfer the data to the outside from the RAM area specified in [RAM] using the D0 bus. The transfer start address ([WA0]) and the transfer word count counter ([TN0]) hold the values at the start of the transfer.
- DMAH D0, [RAM], [s]
- Set the data in the data RAM specified by [s] as a transfer counter in the transfer word counter ([TN0]), and use the D0 bus to externally transfer the data to the RAM area specified by [RAM]. forward. The transfer start address ([RA0]) and the transfer word count counter ([TN0]) hold the values at the start of the transfer.
- DMAH [RAM], D0, [s]
- Set the data in the data RAM specified by [s] as a transfer counter in the transfer word counter ([TN0]), and use the D0 bus to transfer data to the outside from the RAM area specified by [RAM]. forward. The transfer start address ([WA0]) and the transfer word count counter ([TN0]) hold the values at the start of the transfer.
- JMP Imm
- Moves to the address indicated by Imm (immediate).
- JMP Z, Imm
- When Z (zero flag) of the program control port is 1, it moves to the address indicated by Imm (immediate).
- JMP NZ, Imm
- When Z (zero flag) of the program control port is 0, it moves to the address indicated by Imm (immediate).
- JMP S, Imm
- When the S (sign flag) of the program control port is 1, it moves to the address indicated by Imm (immediate).
- JMP NS, Imm
- When the S (sign flag) of the program control port is 0, it moves to the address indicated by Imm (immediate).
- JMP C, Imm
- When C (carry flag) of the program control port is 1, it moves to the address indicated by Imm (immediate).
- JMP NC, Imm
- When C (carry flag) of the program control port is 0, it moves to the address indicated by Imm (immediate).
- JMP TO, Imm
- When the TO (D0 bus DMA executing flag) of the program control port is 1, it moves to the address indicated by Imm (immediate).
- JMP NTO, Imm
- When the TO (D0 bus DMA executing flag) of the program control port is 0, the program moves to the address indicated by Imm (immediate).
- JMP ZS, Imm
- When either Z (zero flag) or S (sign flag) of the program control port is 1, the address indicated by Imm (immediate) is moved.
- JMP NZS, Imm
- When both Z (zero flag) and S (sign flag) of the program control port are 0, the address indicated by Imm (immediate) is moved.
- BTM
- When the loop counter ([LOP]) is non-zero, the top address register ([TOP]) is stored in the program counter and the loop counter ([LOP]) is decremented. When it is 0, nothing is done.
- LPS
- When the loop counter ([LOP]) is non-zero, the program counter is stopped, the next instruction is executed, the loop counter ([LOP]) is decremented, and the loop counter is repeated until it becomes 0.
- END
- Stop the program and reset the EX (program execution control flag) of the program control port.
- ENDI
- Stop the program, reset the EX (program execution control flag) of the program control port, and set E (program end interrupt flag).
● DSP program description
- For a description of constants or assembler, see the appendix " SCU DSP Arambler User's Manual ".
▲ Back | Forward ▼
★ HARDWARE Manual ★ SCU User's Manual
Copyright SEGA ENTERPRISES, LTD., 1997