gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
gbdk-lib/include/asm/z80/types.h
1 /** @file asm/z80/types.h
2 @anchor file_asm_z80_types_h
3 Types definitions for the gb.
4 */
5 #ifndef ASM_Z80_TYPES_INCLUDE
6 #define ASM_Z80_TYPES_INCLUDE
7
8 #ifndef __PORT_z80
9 #error z80 only.
10 #endif
11
12 #ifdef __SDCC
13
14 #define Z88DK_CALLEE __sdcccall(0) __z88dk_callee
15 #define Z88DK_FASTCALL __z88dk_fastcall
16
17 #define NONBANKED __nonbanked /**< Placed in the non-banked lower 16K region (bank 0), regardless of the bank selected by it's source file. */
18 #define BANKED __banked /**< The function will use banked sdcc calls, and is placed in the bank selected by it's source file (or compiler switches). */
19 #define REENTRANT /**< Needed for mos6502 target when functions take too many parameters. */
20 #define NO_OVERLAY_LOCALS /**< Optimization for mos6502 target, indicating locals won't conflict with compiler's overlay segment */
21
22 /** Use to create a block of code which should execute with interrupts temporarily turned off.
23
24 __Do not__ use the function definition attributes
25 @ref CRITICAL and @ref INTERRUPT when declaring
26 ISR functions added via add_VBL() (or LCD, etc).
27 These attributes are only required when constructing
28 a bare jump from the interrupt vector itself.
29
30 @see enable_interrupts, disable_interrupts
31 */
32 #define CRITICAL __critical
33
34 /** Indicate to the compiler the function will be used as an interrupt handler.
35
36 __Do not__ use the function definition attributes
37 @ref CRITICAL and @ref INTERRUPT when declaring
38 ISR functions added via add_VBL() (or LCD, etc).
39 These attributes are only required when constructing
40 a bare jump from the interrupt vector itself.
41 */
42 #define INTERRUPT __interrupt
43
44 #else
45
46 #define Z88DK_CALLEE
47 #define Z88DK_FASTCALL
48
49 #endif
50
51 /** Signed eight bit.
52 */
53 typedef signed char INT8;
54 /** Unsigned eight bit.
55 */
56 typedef unsigned char UINT8;
57 /** Signed sixteen bit.
58 */
59 typedef signed int INT16;
60 /** Unsigned sixteen bit.
61 */
62 typedef unsigned int UINT16;
63 /** Signed 32 bit.
64 */
65 typedef signed long INT32;
66 /** Unsigned 32 bit.
67 */
68 typedef unsigned long UINT32;
69
70 #ifndef __SIZE_T_DEFINED
71 #define __SIZE_T_DEFINED
72 typedef unsigned int size_t;
73 #endif
74
75 /** Returned from clock
76 @see clock
77 */
78 typedef unsigned int clock_t;
79
80 #endif
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.