#define LB(x)
((unsigned char)(x))
#define HB(x) ((unsigned char)(x>>8))
#define DEC2BCD(x) ((((x/10)<<4)&0xf0) |((x%10)&0x0f) )
#define BCD2DEC(x) ((((x>>4)&0x0f)*10)+(x&0x0f))
#define BCD2BIN(n) (((((n) >> 4) & 0x0F) * 10) + ((n) & 0x0F))
#define LE2BE32(x) ((((u32)x>>24)&0xff)|(((u32)x>>8)&0xff00)|(((u32)x<<8)&0xff0000)|(((u32)x<<24)&0xff000000))
#define GETHH(x) (((u32)x>>24)&0xff)
#define GETHL(x) (((u32)x>>16)&0xff)
#define GETLH(x) (((u32)x>>8)&0xff)
#define GETLL(x) (((u32)x>>0)&0xff)
#define WORD(lb, hb) (((lb) & 0xff) | (((unsigned short)(hb) << 8)& 0xff00 ))
#define DWORD(lw, hw) (((lw) & 0xffff) | ((unsigned long int)((hw) & 0xffff) << 16))
#define GetWord(lb,hb) (((((unsigned short)(hb))<<8)&0xff00) + ((lb)&0xff))
#define GetDWord(lb,mlb,mhb,hb) ((((unsigned int)(hb)<<24)&0xff000000) + (((unsigned int)(mhb)<<16)&0xff0000)+ (((unsigned int)(mlb)<<8)&0xff00)+ ((unsigned int)(lb)&0xff))
#define GetLWord(dw) ((dw) & 0xffff)
#define GetHWord(dw) (((dw) >> 16) & 0xffff)
#define HB(x) ((unsigned char)(x>>8))
#define DEC2BCD(x) ((((x/10)<<4)&0xf0) |((x%10)&0x0f) )
#define BCD2DEC(x) ((((x>>4)&0x0f)*10)+(x&0x0f))
#define BCD2BIN(n) (((((n) >> 4) & 0x0F) * 10) + ((n) & 0x0F))
#define LE2BE32(x) ((((u32)x>>24)&0xff)|(((u32)x>>8)&0xff00)|(((u32)x<<8)&0xff0000)|(((u32)x<<24)&0xff000000))
#define GETHH(x) (((u32)x>>24)&0xff)
#define GETHL(x) (((u32)x>>16)&0xff)
#define GETLH(x) (((u32)x>>8)&0xff)
#define GETLL(x) (((u32)x>>0)&0xff)
#define WORD(lb, hb) (((lb) & 0xff) | (((unsigned short)(hb) << 8)& 0xff00 ))
#define DWORD(lw, hw) (((lw) & 0xffff) | ((unsigned long int)((hw) & 0xffff) << 16))
#define GetWord(lb,hb) (((((unsigned short)(hb))<<8)&0xff00) + ((lb)&0xff))
#define GetDWord(lb,mlb,mhb,hb) ((((unsigned int)(hb)<<24)&0xff000000) + (((unsigned int)(mhb)<<16)&0xff0000)+ (((unsigned int)(mlb)<<8)&0xff00)+ ((unsigned int)(lb)&0xff))
#define GetLWord(dw) ((dw) & 0xffff)
#define GetHWord(dw) (((dw) >> 16) & 0xffff)