]> 4ch.mooo.com Git - 16.git/blobdiff - 16/dos_kb.c
renamed: ptmp0.pcx -> data/ptmp0.pcx
[16.git] / 16 / dos_kb.c
index 9e813b898083d26bbffa05f965b754f887eb2ec5..baffad9e17d8b608a445039e6a622ed93127019f 100644 (file)
@@ -19,6 +19,7 @@ static void interrupt (far *oldkb)(void) = NULL; /* BIOS keyboard handler */
  * to be included.
  */
 #define TESTING
+#define TESTING2
 
 /*****************NEW KEYBOARD 09h ISR***********************/
 void interrupt newkb(void){
@@ -28,15 +29,16 @@ void interrupt newkb(void){
        kee = inp(0x60);        /* Read the keyboard scan code */
 
        /* Clear keyboard controller on XT machines */
-       qx = inp(0x61);           /* Get keyboard control register */
+       qx = inp(0x61);    /* Get keyboard control register */
        qx |= 0x82;
-       outp(0x61, qx);           /* Toggle acknowledge bit high */
+       outp(0x61, qx);    /* Toggle acknowledge bit high */
        qx &= 0x7F;
-       outp(0x61, qx);           /* Toggle acknowledge bit low */
+       outp(0x61, qx);    /* Toggle acknowledge bit low */
 
        /* Interpret the scan code and set our flags */
-       #ifdef TESTING
-       printf("%d[%d]\n",kee,key[kee]);
+       #ifdef TESTING2
+       //printf("%d[%d]\n",kee,key[kee]);
+       printf("\0"); // bug
        #endif
        if(kee & 0x80)
                key[kee & 0x7F] = 0; // a key is released
@@ -93,11 +95,11 @@ void setkb(int vq){
 }
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
- * keyp                                                              *
- *                                                                         *
- * Returns the status of the key requested.                                *
+ * keyp                                                              *
+ *                                                                      *
+ * Returns the status of the key requested.                            *
  * The status is 1 if the key is pressed or has been pressed since the     *
- * last call to this function for that particular key.                     *
+ * last call to this function for that particular key.              *
 \* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 int keyp(byte c){
        register char retVal;