Motorola DSP56301 User Manual

Page 309

Advertising
background image

DSP56301 User’s Manual

A

-13

rep n0

mac x0,x1,a x,l:(r0)+ ;; exercise mac, write x/y ram

else ;; x/y ram not symmetrical

;; write x memory

clr a #start_xram,r0 ;; start of xram

move #>length_xram,n0 ;; length of xram

rep n0

mac x0,y0,a x1,x:(r0)+ ;; exercise mac, write xram

;; write y memory

clr a #start_yram,r1 ;; start of yram

move #>length_yram,n1 ;; length of yram

rep n1

mac x1,y0,a x0,y:(r1)+ ;; exercise mac, write yram

endif

;; write p memory

clr a #start_pram,r2 ;; start of pram

move #>length_pram,n2 ;; length of pram

rep n2

move y0,p:(r2)+ ;; write pram

;; check memory contents

if (EQUALDATA) ;; x/y ram symmetrical

;; check dram

clr a #start_dram,r0 ;; restore pointer, clear a

do n0,_loopd

move x:(r0),a1 ;; a0=a2=0

eor x1,a

add a,b ;; accumulate error in b

move y:(r0)+,a1 ;; a0=a2=0

eor x0,a

add a,b ;; accumulate error in b

_loopd

else ;; x/y ram not symmetrical

;; check xram

clr a #start_xram,r0 ;; restore pointer, clear a

do n0,_loopx

move x:(r0)+,a1 ;; a0=a2=0

eor x1,a

add a,b ;; accumulate error in b

_loopx

;; check yram

clr a #start_yram,r1 ;; restore pointer, clear a

do n1,_loopy

move y:(r1)+,a1 ;; a0=a2=0

eor x0,a

add a,b ;; accumulate error in b

_loopy

endif

Advertising