]> 4ch.mooo.com Git - 16.git/blobdiff - 16/modex16/lib/lib_com.h
16_ca needs huge amounts of work and I should remember what needs to be done soon...
[16.git] / 16 / modex16 / lib / lib_com.h
diff --git a/16/modex16/lib/lib_com.h b/16/modex16/lib/lib_com.h
new file mode 100755 (executable)
index 0000000..5a203b9
--- /dev/null
@@ -0,0 +1,106 @@
+#ifndef _LIBCOM_H_\r
+#define _LIBCOM_H_\r
+#include <dos.h>\r
+#include <stdio.h>\r
+#include <conio.h> // just for wait\r
+#include <time.h> // just for wait
+#include "types.h"\r
+\r
+/* Control codes for all keys on the keyboard */\r
+//here temperarly\r
+#define KEY_A          (0x1E)\r
+#define KEY_B          (0x30)\r
+#define KEY_C          (0x2E)\r
+#define KEY_D          (0x20)\r
+#define KEY_E          (0x12)\r
+#define KEY_F          (0x21)\r
+#define KEY_G          (0x22)\r
+#define KEY_H          (0x23)\r
+#define KEY_I          (0x17)\r
+#define KEY_J          (0x24)\r
+#define KEY_K          (0x25)\r
+#define KEY_L          (0x26)\r
+#define KEY_M          (0x32)\r
+#define KEY_N          (0x31)\r
+#define KEY_O          (0x18)\r
+#define KEY_P          (0x19)\r
+#define KEY_Q          (0x10)\r
+#define KEY_R          (0x13)\r
+#define KEY_S          (0x1F)\r
+#define KEY_T          (0x14)\r
+#define KEY_U          (0x16)\r
+#define KEY_V          (0x2F)\r
+#define KEY_W          (0x11)\r
+#define KEY_X          (0x2D)\r
+#define KEY_Y          (0x15)\r
+#define KEY_Z          (0x2C)\r
+#define KEY_1          (0x02)\r
+#define KEY_2          (0x03)\r
+#define KEY_3          (0x04)\r
+#define KEY_4          (0x05)\r
+#define KEY_5          (0x06)\r
+#define KEY_6          (0x07)\r
+#define KEY_7          (0x08)\r
+#define KEY_8          (0x09)\r
+#define KEY_9          (0x0A)\r
+#define KEY_0          (0x0B)\r
+#define KEY_DASH               (0x0C)  /* -_ */\r
+#define KEY_EQUAL              (0x0D)  /* =+ */\r
+#define KEY_LBRACKET   (0x1A)  /* [{ */\r
+#define KEY_RBRACKET   (0x1B)  /* ]} */\r
+#define KEY_SEMICOLON  (0x27)  /* ;: */\r
+#define KEY_RQUOTE     (0x28)  /* '" */\r
+#define KEY_LQUOTE     (0x29)  /* `~ */\r
+#define KEY_PERIOD     (0x33)  /* .> */\r
+#define KEY_COMMA              (0x34)  /* ,< */\r
+#define KEY_SLASH              (0x35)  /* /? */\r
+#define KEY_BACKSLASH  (0x2B)  /* \| */\r
+#define KEY_F1         (0x3B)\r
+#define KEY_F2         (0x3C)\r
+#define KEY_F3         (0x3D)\r
+#define KEY_F4         (0x3E)\r
+#define KEY_F5         (0x3F)\r
+#define KEY_F6         (0x40)\r
+#define KEY_F7         (0x41)\r
+#define KEY_F8         (0x42)\r
+#define KEY_F9         (0x43)\r
+#define KEY_F10                (0x44)\r
+#define KEY_ESC                (0x01)\r
+#define KEY_BACKSPACE   (0x0E)\r
+#define KEY_TAB                (0x0F)\r
+#define KEY_ENTER              (0x1C)\r
+#define KEY_CONTROL    (0x1D)\r
+#define KEY_LSHIFT     (0x2A)\r
+#define KEY_RSHIFT     (0x36)\r
+#define KEY_PRTSC              (0x37)\r
+#define KEY_ALT                (0x38)\r
+#define KEY_SPACE              (0x39)\r
+#define KEY_CAPSLOCK   (0x3A)\r
+#define KEY_NUMLOCK    (0x45)\r
+#define KEY_SCROLLLOCK (0x46)\r
+#define KEY_HOME               (0x47)\r
+#define KEY_UP         (0x48)\r
+#define KEY_PGUP               (0x49)\r
+#define KEY_MINUS              (0x4A)\r
+#define KEY_LEFT               (0x4B)\r
+#define KEY_CENTER     (0x4C)\r
+#define KEY_RIGHT              (0x4D)\r
+#define KEY_PLUS               (0x4E)\r
+#define KEY_END                (0x4F)\r
+#define KEY_DOWN               (0x50)\r
+#define KEY_PGDOWN     (0x51)\r
+#define KEY_INS                (0x52)\r
+#define KEY_DEL                (0x53)\r
+\r
+#define KEY_LWIN               (0x73)\r
+#define KEY_RWIN               (0x74)\r
+#define KEY_MENU               (0x75)\r
+\r
+\r
+//typedef unsigned char byte;
+//typedef unsigned int word;
+//typedef unsigned short syte;\r
+\r
+void wait(clock_t wait);\r
+\r
+#endif/*_LIBCOM_H_*/\r