Motorola DSP96002 User Manual page 596

32-bit digital signal processor
Table of Contents

Advertisement

; Calculate dx and dy
fsub.s d6,d2
fsub.s d7,d3
; Determine whether to increment x or y
fcmpm
fjge
; Switch endpoints if necessary
_inc_y
ftst
ftfr.s d4,d6
ftfr.s d5,d7
; Fix y0 and dy
int
int
neg
jeq
; Calculate dx/dy
fseedd d3,d4
fmpy.s d3,d4,d5
fmpy
fmpy.s d5,d2,d5
fmpy
fmpy.s d0,d3,d0
; Draw first point
int
jsr
; d0 = dx/dy
do
fadd.x d0,d2
inc
int
jsr
_end_y
rts
_draw1_y
int d6
jsr
rts
MOTOROLA
d2.s,d4.s
d3.s,d5.s
d3,d2
_inc_x
d3
d7
d1
d1
_draw1_y
d0,d4,d0 fsub.s d5,d2 d2.s,d3.s
d0,d4,d0 fsub.s d5,d3
d6
_draw_point
d1 = dy
d6 = x0
d1.l,_end_y
d7
d6
_draw_point
_draw_point
DSP96002 USER'S MANUAL
d2.s,d0.s
fflt
fflt
d3.s,d1.s
iflt
d9.s,d2.s
d2.s,d4.s
d6.s,d2.s
application dependent
d7 = y0
d2.s,d6.s
application dependent
application dependent
Program
ICycles
Words
1
1
1
1
1
1
2
2
1
1
1
1
1
1
1
1
1
1
1
1
2
2
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2
3
1
1
1
1
1
1
2
2
1
1
2
2
B-77

Advertisement

Table of Contents
loading

Table of Contents