/* void _MulUnsArr(src1,dst,num,n) * * ARGUMENT * unsigned *src1, *dst, num; * unsigned n; * * DESCRIPTION * Multiplies the number 'a' (of 'n' 16-bits ints) by num and places * the result in dst. We assume that the caller has made sure there are * enough ints to hold the result. We don't check for overflow!!!. * * SIDE EFFECTS * Can't have more than 10 ints to multiply. * * RETURNS * None. * * AUTHOR * Brugnoli Giugno 1992 * * MODIFICATIONS * */ #include #include #include "gm.h" #include "gmsystem.h" void _MulUnsArr(src1, dst, num, n) unsigned SHORT src1[], dst[], num; int n; { int i; unsigned long pdst[10]; unsigned SHORT carry = 0; for (i=0;iMAXUNSINT) { carry=(unsigned SHORT)(pdst[i]>>BITSPERUI); dst[i]=(unsigned SHORT)(pdst[i]&MAXUNSINT); } else { carry=0; dst[i]=(unsigned SHORT)pdst[i]; } } }