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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Andy Neil
09/13/02 02:45
Read: 921 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
Passing parameters      Spencer Lee      09/12/02 14:36      
RE: Passing parameters      Dan Henry      09/12/02 14:39      
RE: Passing parameters      Spencer Lee      09/12/02 14:48      
RE: Passing parameters      Andy Neil      09/13/02 02:45      
RE: Passing parameters      Spencer Lee      09/13/02 10:20      
RE: Passing parameters      Andy Neil      09/13/02 15:40      
Debugging preprocessor problems      Andy Neil      09/13/02 15:55      
RE: Debugging preprocessor problems      Dan Henry      09/13/02 16:36      
RE: lint      Andy Neil      09/15/02 07:41      

Back to Subject List