beautypg.com

Motorola DSP96002 User Manual

Page 599

background image

B-80

DSP96002 USER’S MANUAL

MOTOROLA

neg d1 iflt

neg d0 iflt

tst d0

jlt _set_y_xn

; Increment y, dx positive case

; Set up registers

_set_y_xp

lsr d1 d1.l,d2.l

dec d2 d2.l,d4.l

move d1.l,r0

move d2.l,m0

move d0.l,n0

move d0.l,d5.l

; Draw first point

jsr _draw_point

; Draw additional points

do d4.l,_line_y_xp

inc d7 r0,d2.l

add d5,d2 (r0)+n0

cmp d4,d2

inc d6 ifge

jsr _draw_point

_line_y_xp

rts

; Increment y, dx negative case

; Set up registers

_set_y_xn

lsr d1 d1.l,d2.l

dec d2 d2.l,d4.l

neg d0 d1.l,r0

move d2.l,m0

move d0.l,n0

move d0.l,d5.l

; Draw first point

jsr _draw_point

; Draw additional points

do d4.l,_line_y_xn

inc d7 r0,d2.l

add d5,d2 (r0)+n0