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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/13/02 08:45
Read: times


 
#29108 - RE: Passing parameters
void test(unsigned int ival);
Don't forget that the 8051 is an 8-bit processor; an int is most likely to be 16 bits - so the compiler will have to generate code to cope with the 2-byte value.
Unless you really need to pass 16 bits (which isn't the case in your example), avoid int - use unsigned char instead.

Better still, create your own typedefs such as U8, U16, etc so that your data sizes (and signedness) are independent of the implementation.

List of 9 messages in thread
TopicAuthorDate
Passing parameters            01/01/70 00:00      
RE: Passing parameters            01/01/70 00:00      
RE: Passing parameters            01/01/70 00:00      
RE: Passing parameters            01/01/70 00:00      
RE: Passing parameters            01/01/70 00:00      
RE: Passing parameters            01/01/70 00:00      
Debugging preprocessor problems            01/01/70 00:00      
RE: Debugging preprocessor problems            01/01/70 00:00      
RE: lint            01/01/70 00:00      

Back to Subject List