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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/03/01 03:55
Read: times


 
#12142 - RE: Keil C : read two byte?
unsigned int x;

x = P1 << 8 + P0;

... or you can use:

x = P1 * 256 + P0;

... or you can use | P0 in either of the above instead of +P0. All four options accomplish the same thing. Which is fastest or most compact will depend on your compiler and your optimization options.

Craig Steiner


List of 18 messages in thread
TopicAuthorDate
Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      

Back to Subject List