www.pudn.com > g729Decoder.rar > Dot_prod.asm


;======================================================= 
;  File Name 
;  ---------- 
;  Dot_prod.ASM 
; 
;  Brief Description of the Code: 
;  ------------------------------ 
;  Compute result of scalar product. 
; 
;  Ref 
;  ------ 
;  pitch_a.C (dot_product) 
;======================================================== 
        .mmregs 
 
        .include  ..\include\const.h 
        .include  ..\include\tab_ld8a.h 
        .include  ..\include\ld8amem.h 
 
        .def      Dot_product 
 
 
;------------------------------------------------------- 
; Dot_product 
;------------------------------------------------------- 
; void Dot_product(  /* (o) :Result of csalar product. */ 
;      Word16  X[],  /* (i) :Frist vector.             */ 
;      Word16  Y[],  /* (i) :Second vector.            */ 
;      Word16  lg    /* (i) :Number of point.          */ 
;  ) 
;------------------------------------------------------- 
;  Contstants : 
;       sum=0; 
;       for(i=0;i sum 
;  Modify register: AR0, AR3, AR4, AR5 
;------------------------------------------------------- 
 
        .asg    "AR3", pX 
        .asg    "AR4", pY 
 
Dot_product: 
 
        LD      #0, A 
        RPT     *(AR6) 
 
		MAC		*pX+,*pY+,A 
	 
        SAT     A 
 
        RET