]> 4ch.mooo.com Git - 16.git/blob - 16/lib/lib_com.h
56c957efbc8f292da6e86d6dcfeb59adf29faaa7
[16.git] / 16 / lib / lib_com.h
1 #ifndef _LIBCOM_H_\r
2 #define _LIBCOM_H_\r
3 #include <dos.h>\r
4 #include <stdio.h>\r
5 #include <conio.h> // just for wait\r
6 #include <time.h> // just for wait
7 #include "lib\types.h"\r
8 \r
9 /* Control codes for all keys on the keyboard */\r
10 //here temperarly\r
11 #define KEY_A           (0x1E)\r
12 #define KEY_B           (0x30)\r
13 #define KEY_C           (0x2E)\r
14 #define KEY_D           (0x20)\r
15 #define KEY_E           (0x12)\r
16 #define KEY_F           (0x21)\r
17 #define KEY_G           (0x22)\r
18 #define KEY_H           (0x23)\r
19 #define KEY_I           (0x17)\r
20 #define KEY_J           (0x24)\r
21 #define KEY_K           (0x25)\r
22 #define KEY_L           (0x26)\r
23 #define KEY_M           (0x32)\r
24 #define KEY_N           (0x31)\r
25 #define KEY_O           (0x18)\r
26 #define KEY_P           (0x19)\r
27 #define KEY_Q           (0x10)\r
28 #define KEY_R           (0x13)\r
29 #define KEY_S           (0x1F)\r
30 #define KEY_T           (0x14)\r
31 #define KEY_U           (0x16)\r
32 #define KEY_V           (0x2F)\r
33 #define KEY_W           (0x11)\r
34 #define KEY_X           (0x2D)\r
35 #define KEY_Y           (0x15)\r
36 #define KEY_Z           (0x2C)\r
37 #define KEY_1           (0x02)\r
38 #define KEY_2           (0x03)\r
39 #define KEY_3           (0x04)\r
40 #define KEY_4           (0x05)\r
41 #define KEY_5           (0x06)\r
42 #define KEY_6           (0x07)\r
43 #define KEY_7           (0x08)\r
44 #define KEY_8           (0x09)\r
45 #define KEY_9           (0x0A)\r
46 #define KEY_0           (0x0B)\r
47 #define KEY_DASH                (0x0C)  /* -_ */\r
48 #define KEY_EQUAL               (0x0D)  /* =+ */\r
49 #define KEY_LBRACKET    (0x1A)  /* [{ */\r
50 #define KEY_RBRACKET    (0x1B)  /* ]} */\r
51 #define KEY_SEMICOLON   (0x27)  /* ;: */\r
52 #define KEY_RQUOTE      (0x28)  /* '" */\r
53 #define KEY_LQUOTE      (0x29)  /* `~ */\r
54 #define KEY_PERIOD      (0x33)  /* .> */\r
55 #define KEY_COMMA               (0x34)  /* ,< */\r
56 #define KEY_SLASH               (0x35)  /* /? */\r
57 #define KEY_BACKSLASH   (0x2B)  /* \| */\r
58 #define KEY_F1          (0x3B)\r
59 #define KEY_F2          (0x3C)\r
60 #define KEY_F3          (0x3D)\r
61 #define KEY_F4          (0x3E)\r
62 #define KEY_F5          (0x3F)\r
63 #define KEY_F6          (0x40)\r
64 #define KEY_F7          (0x41)\r
65 #define KEY_F8          (0x42)\r
66 #define KEY_F9          (0x43)\r
67 #define KEY_F10         (0x44)\r
68 #define KEY_ESC         (0x01)\r
69 #define KEY_BACKSPACE   (0x0E)\r
70 #define KEY_TAB         (0x0F)\r
71 #define KEY_ENTER               (0x1C)\r
72 #define KEY_CONTROL     (0x1D)\r
73 #define KEY_LSHIFT      (0x2A)\r
74 #define KEY_RSHIFT      (0x36)\r
75 #define KEY_PRTSC               (0x37)\r
76 #define KEY_ALT         (0x38)\r
77 #define KEY_SPACE               (0x39)\r
78 #define KEY_CAPSLOCK    (0x3A)\r
79 #define KEY_NUMLOCK     (0x45)\r
80 #define KEY_SCROLLLOCK  (0x46)\r
81 #define KEY_HOME                (0x47)\r
82 #define KEY_UP          (0x48)\r
83 #define KEY_PGUP                (0x49)\r
84 #define KEY_MINUS               (0x4A)\r
85 #define KEY_LEFT                (0x4B)\r
86 #define KEY_CENTER      (0x4C)\r
87 #define KEY_RIGHT               (0x4D)\r
88 #define KEY_PLUS                (0x4E)\r
89 #define KEY_END         (0x4F)\r
90 #define KEY_DOWN                (0x50)\r
91 #define KEY_PGDOWN      (0x51)\r
92 #define KEY_INS         (0x52)\r
93 #define KEY_DEL         (0x53)\r
94 \r
95 #define KEY_LWIN                (0x73)\r
96 #define KEY_RWIN                (0x74)\r
97 #define KEY_MENU                (0x75)\r
98 \r
99 \r
100 //typedef unsigned char byte;
101 //typedef unsigned int word;
102 //typedef unsigned short syte;\r
103 \r
104 void wait(clock_t wait);\r
105 \r
106 #endif/*_LIBCOM_H_*/\r