Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/06/05 18:47
Read: times


 
#94403 - 87c52 floating point calculation
Hi
I have a need to solve the following equation using my 87c52 mcu.

result = 54.2535 * ((float) (A) + (float) (B) /65536);

I'm using the SDCC compiler and the variables are defined as:

xdata at 0x8100 float result;
xdata at 0x8105 unsigned char A;
xdata at 0x8106 unsigned char B;

Command line = SDCC --code-loc 0x0000 --stack-after-data --xram-loc 0x8000 -I c:sdccsharesdccinclude test.c

I've also tried linking the large memory model but that doesn't work either. Have compiled the problem with ms c++ and it works fine on a PC, but it jibberish on the 87c52.

I'll appreciate any advice

Thanks Jim

List of 4 messages in thread
TopicAuthorDate
87c52 floating point calculation            01/01/70 00:00      
   Re            01/01/70 00:00      
   also            01/01/70 00:00      
   re            01/01/70 00:00      

Back to Subject List