help me to get reduce code and time for simple percent = (value/256)*100
its work fine but i want to using fumnction pointers in arreays for divide and multiply.
Sohil I Chan
{power to the compiler}
using fumnction pointers in arreays for divide and multiply the '51 architecture is singularily unsuited for function pointers and thus taking advantage of Keils admirable effort to squeeze them in will cost you more in aspirin than using them will save you in time.
Erik
Why do you want to use function pointers at all?
And why, particularly, on an 8051?
http://www.keil.com/appnotes/docs/apnt_129.asp
http://www.keil.com/support/man/docs/bl51/bl51_ol_fp.htm
etc, etc,...
reduce code and time for simple percent = (value/256)*100
How about reducing errors first? That almost certainly needs to read (value * 100)/256. If you absolutely must micro-optimize that, try (value * 25u)/64u or (value * 25u)>>6, and pay special attention to your choice of data type for "value".
i want to using fumnction pointers in arreays for divide and multiply.
No, you don't. Seriously.