Motorola DSP96002 User Manual

Page 591

Advertising
background image

B-72

DSP96002 USER’S MANUAL

MOTOROLA

B.1.39

Nth Order Polynomial Evaluation for Two Points

;An Nth order polynomial c1X

N

+ c2X

N-1

+ ...cNX + cN+1 can be factored

;and represented as ((c1X + c2)X + c3)X + ...) + cN+1. This routine

;evaluates the polynomial at both X = s and X = t.

;

;Memory Map : X Y

;

; r1 -> s t

; .

; .

; r0 -> c1

; c2

; c3

; .

; .

; cN+1

; Setup N equ order of polynomial

move #coef,r0

move #2_pts,r1

move x:(r1)+,d5.s y:,d4.s ; s, t

move x:(r0)+,d1.s ; c1

move d1.s,d0.s

; Inner loop for evaluating 2 consecutive points

do #N,_loop

fmpy.x d1,d5,d1 x:(r0)+,d2.s ; c(n)*s, c(n+1)

fmpy d0,d4,d0 fadd.x d2,d1 ; c(n)*t, c(n)*s+c(n+1)

fadd.x d2,d0 ; c(n)*t+c(n+1) _loop

B.1.40

Graphics BITBLT (Bit Block Transfer)

The bit block transfer (BITBLT) is an operation that transfers a bit field from one area of memory to another.

Four parameters describe the BITBLT operation:

SOURCE - The source address of the block to be transferred. Data transferred from the source starts at

the lsb of the first data word.

COUNT - The number of words to transfer from the source field. This must be greater than zero.

DEST - Destination starting address.

OFFSET - The starting bit number of the destination word that the transfer is to start. The offset is in the

range of 0-31.

Note that the source data starts at the lsb of the first word whereas the destination starts at an arbitrary

offset from the lsb.

Advertising