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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/30/01 22:59
Read: times


 
#10436 - RE: Low and High Byte into Integer
The most efficient way in 'C' is probably to use a union, but remember that this will be non-portable (byte ordering).

Your compiler might provide a standard macro to do it.

In you example, 255 should be 256 (ie, 0x100).

Whether multplying by 256 is more efficient that shifting will depend upon your compiler - you'd have to examine the generated code to be sure.

List of 5 messages in thread
TopicAuthorDate
Low and High Byte into Integer            01/01/70 00:00      
RE: Low and High Byte into Integer            01/01/70 00:00      
RE: Low and High Byte into Integer            01/01/70 00:00      
RE: Low and High Byte into Integer            01/01/70 00:00      
RE: Low and High Byte into Integer            01/01/70 00:00      

Back to Subject List