Motorola DSP96002 User Manual
Page 618
MOTOROLA
DSP96002 USER’S MANUAL
B-99
fmpy d5,d6,d2 fadd.s d3,d1 d4.s,y:(r1)+ ; Wo 1 1
fadd.s d3,d2 d1.s,y:(r6) ;Wnd 1 1
; Calculate reciprocal 1/W (old point)
fseedd d2,d6 ; 1 1
fmpy.s d2,d6,d1 d9.s,d4.s ; 1 1
fsub.s d1,d4 d4.s,d3.s ; 1 1
fmpy.s d1,d4,d1 (r4)-n4 ; r4-2 1 1
fmpy d6,d4,d1 fsub.s d1,d3 ; 1 1
fmpy.s d1,d3,d1 x:(r4)+,d4.s y:,d3.s ;Xs Xf 1 1
; Multiply coordinates by 1/W, scale and add offset (old point)
fmpy.s d0,d4,d2 ; 1 1
fmpy.s d2,d1,d2 x:(r4)-,d4.s y:,d6.s ;Ys Yf 1 1
fmpy d7,d4,d3 fadd.s d3,d2 y:(r1)+n1,d4.s ; Zn 1 1
fmpy.s d3,d1,d3 d4.s,y:(r1)+n1 ; Zo 1 1
fadd.s d6,d3 d2.s,y:(r5)+ ; X1 1 1
move y:(r6)-,d1.s ; Wnd 1 1
move d3.s,y:(r5)+ ; Y1 1 1
; Calculate reciprocal 1/W (new point)
fseedd d1,d6 ; 1 1
fmpy.s d1,d6,d1 d9.s,d4.s ; 1 1
fsub.s d1,d4 d4.s,d3.s y:(r6)-,d5.s ; Ynd 1 1
fmpy.s d1,d4,d1 y:(r6),d0.s ; Xnd 1 1
fmpy d6,d4,d1 fsub.s d1,d3 ; 1 1
fmpy.s d1,d3,d1 x:(r4)+,d4.s y:,d3.s ;Xs Xf 1 1
; Multiply coordinates by 1/W, scale and add offset (old point)