beautypg.com

Motorola DSP96002 User Manual

Page 617

background image

B-98

DSP96002 USER’S MANUAL

MOTOROLA

fjsgt _clip2_ynp ; 2 2

fadd.s d1,d6 y:(r1)+n1,d5.s ;Zn 1 1

fjslt _clip2_ynn ; 2 2

fsub.s d1,d5 d5.s,d6.s ; 1 1

fjsgt _clip2_znp ; 2 2

ftst d6 ; 1 1

fjslt _clip2_znn ; 2 2

; Check for rejection

move x:(r1)+n1,d3.s y:(r6),d5.s ;Xo to 1 1

fcmp d5,d7 d7.s,d4.s ; 1 1

fjlt _clip2_reject ; 2 2

; Calculate end point coordinates: X

move x:(r1)+n1,d6.s ;Xn 1 1

fsub.s d3,d6 d6.s,x:(r1)- ;Xo 1 1

fmpy.s d4,d6,d1 ; 1 1

fmpy d5,d6,d2 fadd.s d3,d1 x:(r1)+n1,d6.s ;Yn 1 1

fadd.s d3,d2 x:(r1),d3.s ;Yo 1 1

; Calculate end point coordinates: Y

fsub.s d3,d6 d6.s,x:(r1)+n1 d1.s,y:(r6)+ ;Yo Xnd 1 1

fmpy.s d4,d6,d1 d2.s,d0.s ; 1 1

fmpy d5,d6,d2 fadd.s d3,d1 y:(r1)+n1,d6.s ; Wn 1 1

fadd.s d3,d2 y:(r1)+n1,d3.s ; Wo 1 1

; Calculate end point coordinates: W

fsub.s d3,d6 d1.s,y:(r6)+ ;Ynd 1 1

fmpy.s d4,d6,d1 d2.s,d7.s y:(r1)+n1,d4.s ; Wn 1 1