AnsweredAssumed Answered

CodeWarriro don`t support 16-bit multiply 16-bit

Question asked by YANG TIANXI on Feb 23, 2011
Latest reply on Feb 23, 2011 by YANG TIANXI

in my application, i  need  operation of 16-bit * 16-bit

 

volatile  dword  mytempDword;

volatile  word   mytempword1 = 300;

volatile  word   mytempword2= 312;

 

main()

{

   ...

 

 mytempDword =  mytempword1 * mytempword2;

 

}

 

Codewarriror gives wrong result of  28064, but the correct result is 93600,  i found that 93600 = 65536 + 28064 , obviously, the 16th bit is  ignored by CodeWarrior.  why?   my setting options of CodeWarrior is default. and CodeWarriror version is 5.9

 

Anybody here know why? thanks

 

regards

Outcomes