Table 6-31 Change Of Flow Instructions; Table 6-32 Looping Instructions - Motorola DSP56800 Manual

16-bit digital signal processor
Table of Contents

Advertisement

Table 6-30. Branch on Bit-Manipulation Instructions (Continued)
Operation
BRSET
#MASK8,DDDDD,AA
#MASK8,X:(R2+xx),AA
#MASK8,X:(SP-xx),AA
#MASK8,X:xxxx,AA
1.
First cycle count is if branch is taken (condition is true); second is if branch is not taken.
Operation
Operands
Bcc
BRA
Jcc
xxxx
JMP
xxxx
JSR
xxxx
RTI
RTS
1.
First cycle count is if branch is taken (condition is true); second is if branch is not taken.
Operation
Operands
DO
#xx,xxxx
DDDDD,xxxx
Operands
#MASK8,X:aa,AA
#MASK8,X:pp,AA
Table 6-31. Change of Flow Instructions
1
W
C
xx
6/4
1
7-bit signed PC relative offset. (xx <=> <OFFSET7>)
xx
6
1
7-bit signed PC relative offset. (xx <=> <OFFSET7>)
6/4
2
16-bit absolute address
6
2
16-bit absolute address
8
2
Push 16-bit return address and jump to 16-bit target address
10
1
Return from interrupt, restoring 16-bit PC and SR from the
stack
10
1
Return from subroutine, restoring 16-bit PC from the stack
Table 6-32. Looping Instructions
C
W
6
2
6
2
Instruction Set Introduction
DSP56800 Instruction Set Summary
1
W
C
10/8
2
BRSET tests all bits selected by the immediate
mask. If all selected bits are set, then the carry bit
12/10
2
is set and a PC relative branch occurs. Otherwise
12/10
2
it is cleared and no branch occurs.
10/8
2
All registers in DDDDD are permitted except
10/8
2
HWS.
12/10
3
MASK8 specifies a 16-bit immediate value where
either the upper or lower 8 bits contains all zeros.
AA specifies a 7-bit PC relative offset.
X:aa represents a 6-bit absolute address.
X:pp represents a 6-bit absolute I/O address.
Comments
Comments
Load LC register with unsigned value and start hardware
DO loop with 6-bit immediate loop count. The last address
is 16-bit absolute. #xx = 0 not allowed by assembler.
Load LC register with unsigned value. If LC is not equal to
zero, start hardware DO loop with 16-bit loop count in regis-
ter. Otherwise, skip body of loop (adds three additional
cycles). The last address is 16-bit absolute.
Any register allowed except: SP, M01, SR, OMR, and HWS.
Comments
6-27

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents