![background image](http://html.mh-extra.com/html/texas-instruments/msp50c614/msp50c614_user-manual_1097109352.webp)
Implementation Details
5-52
constant int M1[4]={0x04CB,0x71FB,0x011F,0x0};
constant int M2[4]={0x85EB,0x8FD9,0x08FB,0x0};
cmm_func string_multiply(int *p,int lgp,int *m1,int lgm1,int *m2,int lgm2)
{
/* note: length of p,(lgp+2) must be at least (lgm1+2) + (lgm2+2) +1 */
/* this function string multiplies string m1 of length lgm1+2 by string m2 of
length lgm2+2, and puts the result into string p, of length lgp+2 */
int sign,i,j;
int *mm1,*mm2,*pp;
sign=1;
mm1=calloc(sizeof(int),lgm1+2);
mm2=calloc(sizeof(int),lgm2+2);
pp =calloc(sizeof(int),lgp+2);
if(test_string(m1,0,lgm1,LTS_N))
{
neg_string(mm1,m1,lgm1);
sign*=–1;
}
else
copy_string(mm1,m1,lgm1);
if(test_string(m2,0,lgm2,LTS_N))
{
neg_string(mm2,m2,lgm2);
sign*=–1;
}
else
copy_string(mm2,m2,lgm2);
for(j=0;j<lgp+2;j++)
p[j]=0;
for(i=0;i<lgm2+2;i++)
{
for(j=0;j<lgp+2;j++)
pp[j]=0;
umul_string(&pp[i],mm1,mm2[i],lgm1);
add_string(p,pp,p,lgm1+i+1);
}
if(sign == –1)
{
neg_string(pp,p,STR_LENGTH((lgp+2)));
copy_string(p,pp,STR_LENGTH((lgp+2)));
}
free(mm1);
Summary of Contents for MSP50C614
Page 1: ...MSP50C614 Mixed Signal Processor User s Guide SPSU014 January 2000 Printed on Recycled Paper ...
Page 6: ...vi ...
Page 92: ...3 22 ...
Page 300: ...Instruction Set Summay 4 208 Assembly Language Instructions ...
Page 314: ...Software Emulator 5 14 Figure 5 13 Project Menu Figure 5 14 Project Open Dialog ...
Page 325: ...Software Emulator 5 25 Code Development Tools Figure 5 25 EPROM Programming Dialog ...
Page 331: ...Software Emulator 5 31 Code Development Tools Figure 5 31 Context Sensitive Help System ...
Page 368: ...5 68 ...
Page 394: ...7 12 ...
Page 402: ...A 8 ...
Page 412: ...Packaging B 10 ...