1 /* Project 16 Source Code~
2 * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
4 * This file is part of Project 16.
6 * Project 16 is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
11 * Project 16 is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>, or
18 * write to the Free Software Foundation, Inc., 51 Franklin Street,
19 * Fifth Floor, Boston, MA 02110-1301 USA.
27 #include <conio.h> // just for wait
28 #include <time.h> // just for wait
30 #include "src/lib/types.h"
32 /* Control codes for all keys on the keyboard */
71 #define KEY_DASH (0x0C) // -_
72 #define KEY_EQUAL (0x0D) // =+
73 #define KEY_LBRACKET (0x1A) // [{
74 #define KEY_RBRACKET (0x1B) // ]}
75 #define KEY_SEMICOLON (0x27) // ;:
76 #define KEY_RQUOTE (0x28) // '"
77 #define KEY_LQUOTE (0x29) // `~
78 #define KEY_PERIOD (0x33) // .>
79 #define KEY_COMMA (0x34) // ,<
80 #define KEY_SLASH (0x35) // /?
81 #define KEY_BACKSLASH (0x2B) // \|
91 #define KEY_F10 (0x44)
92 #define KEY_ESC (0x01)
93 #define KEY_BACKSPACE (0x0E)
94 #define KEY_TAB (0x0F)
95 #define KEY_ENTER (0x1C)
96 #define KEY_CONTROL (0x1D)
97 #define KEY_LSHIFT (0x2A)
98 #define KEY_RSHIFT (0x36)
99 #define KEY_PRTSC (0x37)
100 #define KEY_ALT (0x38)
101 #define KEY_SPACE (0x39)
102 #define KEY_CAPSLOCK (0x3A)
103 #define KEY_NUMLOCK (0x45)
104 #define KEY_SCROLLLOCK (0x46)
105 #define KEY_HOME (0x47)
106 #define KEY_UP (0x48)
107 #define KEY_PGUP (0x49)
108 #define KEY_MINUS (0x4A)
109 #define KEY_LEFT (0x4B)
110 #define KEY_CENTER (0x4C)
111 #define KEY_RIGHT (0x4D)
112 #define KEY_PLUS (0x4E)
113 #define KEY_END (0x4F)
114 #define KEY_DOWN (0x50)
115 #define KEY_PGDOWN (0x51)
116 #define KEY_INS (0x52)
117 #define KEY_DEL (0x53)
119 #define KEY_LWIN (0x73)
120 #define KEY_RWIN (0x74)
121 #define KEY_MENU (0x75)
124 //#define FARPTR(S, O) MK_FP(S, O)
\r
126 //#define inportb(P) inp(P)
\r
127 //#define outportb(P,V) outp(P,V)
\r
128 //#define outportw(P,V) outpw(P,V)
\r
130 //#define R_AX w.ax
\r
131 //#define R_BX w.bx
\r
132 //#define R_BP w.bp
\r
133 //#define R_ES w.es
\r
135 /* WARNING: for 32-bit code, unused fields of regs_t
\r
136 must be zeroed before using this macro */
\r
137 //#define trap(N,R) intr(N,R)
\r
139 typedef union REGPACK regs_t;
140 typedef enum {false,true} boolean;
142 void wait(clock_t wait);
143 void* AllocateLargestFreeBlock(size_t* Size);
144 size_t GetFreeSize(void);
145 long int filesize(FILE *fp);
147 /* THIS FUNCTION CONVERTS A POINTER TO AN INTEL LONG */
\r
148 //int long ptr2long(char *p);
150 #endif/*_LIBHEAD_H_*/