00001 #ifndef COMMONS_X86ASM_H 00002 #define COMMONS_X86ASM_H 00003 00004 namespace commons 00005 { 00006 00011 inline unsigned char 00012 high(unsigned int r) 00013 { 00014 return static_cast<unsigned char>((r >> 8) & 0xffU); 00015 } 00016 00021 inline unsigned char 00022 low(unsigned int r) 00023 { 00024 return static_cast<unsigned char>(r & 0xffU); 00025 } 00026 00027 } 00028 00029 #endif