Motorola DSP56600 Manual page 35

Application optimization for digital signal processors
Table of Contents

Advertisement

Program Control
The Hardware Stack
3-6
;example of loop and subroutine nesting.
;interrupt definitions: fast interrupt from IRQA_
org
bset
nop
...
;program area
;after jsr execution, sp == 1,
;execution continues at _SUB1
jsr
...
...
...
_SUB1
do
...
do
btst
brkcs
move
move
move
_LOOP2
nop
...
nop
_LOOP1
nop
rts
Direct user access with the MOVEC instruction is possible to
SSL,SSH. Note that MOVEC to/from SSH implicitly increments or
decrements SP, while the same instruction on SSL has no effect on
SP. A manual "pop" operation will usually have the format:
movec
movec
Explicit access to the stack registers is not recommended for the
general user. Such accesses have severe restrictions on them (see
Appendix B in the DSP56300 and DSP56600 Family Manuals ). A
user who wishes to manually access the stack must take into
account pipeline effects that are usually transparent, and that long
interrupts may enter.
Optimizing DSP56300/DSP56600 Applications
p:I_IRQA
#5,x:(r0)
_SUB1
#6,_LOOP1
;after instruction, sp == 3
forever,_LOOP2 ;after instruction, sp == 5
#0,x:(r0)
;if condition true, resume at
;_LOOP2,and sp == 3.
a0,x:(r1)+
;<---- irqA occurs here.
a1,x:(r1)+
a2,x:(r1)+
;after loop is braked, sp == 3
;after normal loop
;termination, sp == 1
;after execution, SP == 0,
;execution returns to main
ssl,<destination 1>
ssh,<destination 2>;implicit sp decrement
MOTOROLA

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dsp56300

Table of Contents