#ifndef TYPES_H
#define TYPES_H

#ifdef NO_EXTERN
#define GLOBAL
#else
#define GLOBAL extern
#endif

#define FALSE               0
#define TRUE                1

#define HI_WORD(x)          ((x) >> 16)
#define LO_WORD(x)          ((x) & 0x0000FFFF)

#define HI_BYTE(x)          ((x) >> 8)
#define LO_BYTE(x)          ((x) & 0x00FF)

#define F_ABS(x)            ((x) > 0 ? (x) : (-(x)))

//typedef unsigned char       bool;
typedef unsigned char       uchar;
typedef unsigned short      ushort;
typedef unsigned int        uint;
typedef unsigned long       ulong;

typedef   signed char       schar;
typedef   signed short      sshort;
typedef   signed int        sint;
typedef   signed long       slong;

/*
#ifdef __cplusplus
#include <int64.h>
#include <int128.h>
#endif
*/

#endif
