Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

endian68.h File Reference


Detailed Description

System byte order.

Author:
Benjamin Gerard <ben@sashipa.com>
Date:
2003/08/12
Id
endian68.h,v 2.0 2003/08/21 04:58:35 benjihan Exp

Go to the source code of this file.

Functions

int SC68byte_order (void)
 Get integer byte order.
int SC68little_endian (void)
 Check if byte order is little endian.
int SC68big_endian (void)
 Check if byte order is big endian.


Function Documentation

int SC68byte_order void   ) 
 

Get integer byte order.

The SC68byte_order() function returns an integer which gives the position of each byte in the memory.

Examples:

  • Intel little endian will return 0x03020100.
  • Motorola big endian will return 0x00010203.

Returns:
byte order.

int SC68little_endian void   ) 
 

Check if byte order is little endian.

The SC68little_endian() function checks if the byte order is little endian.

Returns:
little endian test.
Return values:
1 byte order is little endian.
0 byte order is not little endian.
Warning:
The function only test if the less signifiant byte is stored at offset 0.

int SC68big_endian void   ) 
 

Check if byte order is big endian.

The SC68big_endian() function checks if the byte order is big endian. By the way it returns !SC68little_endian().

Returns:
big endian test.
Return values:
1 byte order is big endian.
0 byte order is not big endian.
See also:
SC68little_endian();


Generated on Fri Jan 21 13:18:17 2005 for sc68fordevelopers by  doxygen 1.3.9.1