GBDK 2020 Docs  4.3.0
API Documentation for GBDK 2020
types.h
Go to the documentation of this file.
1 
4 #ifndef ASM_TYPES_INCLUDE
5 #define ASM_TYPES_INCLUDE
6 
7 #if defined(__PORT_sm83)
8 #include <asm/sm83/types.h>
9 #elif defined(__PORT_z80)
10 #include <asm/z80/types.h>
11 #elif defined(__PORT_mos6502)
12 #include <asm/mos6502/types.h>
13 #else
14 #error Unrecognised port
15 #endif
16 
17 #ifndef OLDCALL
18 #if __SDCC_REVISION >= 12608
19 #define OLDCALL __sdcccall(0)
20 #else
21 #define OLDCALL
22 #endif
23 #endif
24 
25 #ifdef __SDCC
26 #define PRESERVES_REGS(...) __preserves_regs(__VA_ARGS__)
27 #define NAKED __naked
28 #define SFR __sfr
29 #define AT(A) __at(A)
30 #define NORETURN _Noreturn
31 #else
32 #define PRESERVES_REGS(...)
33 #define NAKED
34 #define SFR
35 #define AT(A)
36 #define NORETURN
37 #endif
38 
39 #ifndef NONBANKED
40 #define NONBANKED
41 #endif
42 #ifndef BANKED
43 #define BANKED
44 #endif
45 #ifndef CRITICAL
46 #define CRITICAL
47 #endif
48 #ifndef INTERRUPT
49 #define INTERRUPT
50 #endif
51 
55 typedef INT8 BOOLEAN;
56 
59 typedef INT8 BYTE;
62 typedef UINT8 UBYTE;
64 typedef INT16 WORD;
66 typedef UINT16 UWORD;
68 typedef INT32 LWORD;
70 typedef UINT32 ULWORD;
72 typedef INT32 DWORD;
74 typedef UINT32 UDWORD;
75 
82 typedef union _fixed {
83  struct {
86  };
87  struct {
88  UBYTE l;
89  UBYTE h;
90  } b;
93 
94 #endif
unsigned long UINT32
Definition: types.h:62
signed int INT16
Definition: types.h:53
signed long INT32
Definition: types.h:59
signed char INT8
Definition: types.h:47
unsigned int UINT16
Definition: types.h:56
unsigned char UINT8
Definition: types.h:50
INT8 BYTE
Definition: types.h:59
UINT8 UBYTE
Definition: types.h:62
UINT32 UDWORD
Definition: types.h:74
INT8 BOOLEAN
Definition: types.h:55
INT32 LWORD
Definition: types.h:68
UINT32 ULWORD
Definition: types.h:70
UINT16 UWORD
Definition: types.h:66
union _fixed fixed
INT16 WORD
Definition: types.h:64
INT32 DWORD
Definition: types.h:72
Definition: types.h:82
UWORD w
Definition: types.h:91
struct _fixed::@2 b
UBYTE l
Definition: types.h:84
UBYTE h
Definition: types.h:85