We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I have problem with code size. When I check the map file it shows LIB CODE size 631h as follows
CODE 0076H 0631H UNIT ?C?LIB_CODE
why LIB CODE size such big? what could be the reason?. FYI: Below are MAP file information for library routine inclusion. I
C:\KEIL\C51\LIB\C51FPC.LIB (?C?FPADD) C:\KEIL\C51\LIB\C51FPC.LIB (?C?FPMUL) C:\KEIL\C51\LIB\C51FPC.LIB (?C?FPDIV) C:\KEIL\C51\LIB\C51FPC.LIB (?C?FPCMP) C:\KEIL\C51\LIB\C51FPC.LIB (?C?FCAST) C:\KEIL\C51\LIB\C51FPC.LIB (?C?CASTF) C:\KEIL\C51\LIB\C51FPC.LIB (?C?FPGETOPN) C:\KEIL\C51\LIB\C51C.LIB (?C_STARTUP) C:\KEIL\C51\LIB\C51C.LIB (?C?COPY) C:\KEIL\C51\LIB\C51C.LIB (?C?CLDPTR) C:\KEIL\C51\LIB\C51C.LIB (?C?CLDOPTR) C:\KEIL\C51\LIB\C51C.LIB (?C?CSTPTR) C:\KEIL\C51\LIB\C51C.LIB (?C?IMUL) C:\KEIL\C51\LIB\C51C.LIB (?C?UIDIV) C:\KEIL\C51\LIB\C51C.LIB (?C?LNEG) C:\KEIL\C51\LIB\C51C.LIB (?C?LLDIDATA) C:\KEIL\C51\LIB\C51C.LIB (?C?LLDIDATA0) C:\KEIL\C51\LIB\C51C.LIB (?C?LSTIDATA) C:\KEIL\C51\LIB\C51C.LIB (?C?CCASE) C:\KEIL\C51\LIB\C51C.LIB (?C?ICASE) C:\KEIL\C51\LIB\C51C.LIB (?C?MEMSET) C:\KEIL\C51\LIB\C51C.LIB (?C_INIT)
Thanks in advance
But as you knew I could not get the correct result out that division arithmetic instructions.
Interesting you should say that, since you're using floating-point arithmetics. That won't give you "the correct" result very often, either.
Before you can qualify correctness of a result, you have to decide how this result should be represented. Fixed-point is often preferable over floating-point, particularly on a '51. Fractions may be even better. E.g. the simplest representation in this case would be in units of 1/255.