From: sparky4 Date: Tue, 9 Sep 2014 02:35:50 +0000 (-0500) Subject: I fixed the keyboard bug~ ^^ X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=66ab66550fbe0bdbbad70425adf606f1f087aebf;p=16.git I fixed the keyboard bug~ ^^ new file: 16/DOS_KB.EXE modified: 16/Project 16.bfproject modified: 16/dos_kb.c modified: 16/modex16/dos_kb.c modified: 16/modex16/pcxtest.exe modified: 16/modex16/scroll.c modified: 16/modex16/scroll.exe modified: 16/modex16/test.exe modified: 16/modex16/test2.exe --- diff --git a/16/DOS_KB.EXE b/16/DOS_KB.EXE new file mode 100644 index 00000000..35271741 Binary files /dev/null and b/16/DOS_KB.EXE differ diff --git a/16/Project 16.bfproject b/16/Project 16.bfproject index 43a1f5ad..217dd1c1 100644 --- a/16/Project 16.bfproject +++ b/16/Project 16.bfproject @@ -11,10 +11,9 @@ openfiles: /dos/z/16/16/project16.txt:8063:6091:0: openfiles: /dos/z/16/16/16.txt:0:0:0: openfiles: /dos/z/16/16/lib/x/MODEX.H:5511:2798:0: openfiles: /dos/z/16/16/TEST.C:430:6112:0: -openfiles: /dos/z/16/16/modex16/scroll.c:1537:1152:1: -openfiles: /dos/z/16/16/modex16/modex16.h:156:0:0: +openfiles: /dos/z/16/16/modex16/scroll.c:1744:1341:0: openfiles: /dos/z/16/16/modex16/makefile:106:0:0: -openfiles: /dos/z/16/16/modex16/dos_kb.c:3565:2934:0: +openfiles: /dos/z/16/16/modex16/dos_kb.c:1017:217:1: openfiles: /dos/z/16/16/modex16/dos_kb.h:0:0:0: snr_recursion_level: 0 convertcolumn_horizontally: 0 @@ -80,28 +79,28 @@ recent_files: file:///dos/z/16/16/modex16/PCXTEST.C recent_files: file:///dos/z/16/16/lib/MODEX16.C recent_files: file:///dos/z/16/16/lib/MODEX16.H recent_files: file:///dos/z/16/16/modex16/SCROLL.C -recent_files: file:///dos/z/16/16/modex16/scroll.c -recent_files: file:///dos/z/16/16/dos_gfx.h -recent_files: file:///dos/z/16/16/dos_kb.h -recent_files: file:///dos/z/16/16/lib/lib_com.cpp -recent_files: file:///dos/z/16/16/lib/lib_com.h -recent_files: file:///dos/z/16/16/16.txt -recent_files: file:///dos/z/16/16/dos_gfx.cpp -recent_files: file:///dos/z/16/16/project16.txt -recent_files: file:///dos/z/16/16/scroll.txt -recent_files: file:///dos/z/16/16/TEST.C -recent_files: file:///dos/z/16/16/lib/x/MODEX.H recent_files: file:///dos/z/16/src/lib/dos_comm.c recent_files: file:///dos/z/16/src/eng_comm.cpp recent_files: file:///dos/z/16/src/eng_comm.h recent_files: file:///dos/z/16/src/lib/dos_comm.h recent_files: file:///dos/z/16/16/modex16/lib/lib_com.h recent_files: file:///dos/z/16/16/modex16/lib/lib_com.cpp +recent_files: file:///dos/z/16/16/dos_gfx.h +recent_files: file:///dos/z/16/16/dos_gfx.cpp recent_files: file:///dos/z/16/16/dos_kb.c +recent_files: file:///dos/z/16/16/dos_kb.h +recent_files: file:///dos/z/16/16/lib/lib_com.cpp +recent_files: file:///dos/z/16/16/lib/lib_com.h +recent_files: file:///dos/z/16/16/scroll.txt +recent_files: file:///dos/z/16/16/project16.txt +recent_files: file:///dos/z/16/16/16.txt +recent_files: file:///dos/z/16/16/TEST.C +recent_files: file:///dos/z/16/16/modex16/dos_kb.c recent_files: file:///dos/z/16/16/modex16/modex16.h recent_files: file:///dos/z/16/16/modex16/makefile recent_files: file:///dos/z/16/16/modex16/dos_kb.h -recent_files: file:///dos/z/16/16/modex16/dos_kb.c +recent_files: file:///dos/z/16/16/lib/x/MODEX.H +recent_files: file:///dos/z/16/16/modex16/scroll.c snr_replacetype: 0 savedir: file:///dos/z/16/16/modex16 spell_check_default: 1 diff --git a/16/dos_kb.c b/16/dos_kb.c index 74f5a48a..baffad9e 100644 --- a/16/dos_kb.c +++ b/16/dos_kb.c @@ -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){ @@ -35,8 +36,9 @@ void interrupt newkb(void){ 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 diff --git a/16/modex16/dos_kb.c b/16/modex16/dos_kb.c index 7c6030ae..dd924189 100644 --- a/16/modex16/dos_kb.c +++ b/16/modex16/dos_kb.c @@ -37,7 +37,8 @@ void interrupt newkb(void){ /* Interpret the scan code and set our flags */ #ifdef TESTING2 - printf("%d[%d]\n",kee,key[kee]); + //printf("%d[%d]\n",kee,key[kee]); + printf("\0"); // bug #endif if(kee & 0x80) key[kee & 0x7F] = 0; // a key is released @@ -60,7 +61,7 @@ void setkb(int vq){ _dos_setvect(9, oldkb); /* Reset our function pointer to contain no valid address */ oldkb = NULL; - #ifdef TESTING2 + #ifdef TESTING /* Print the key heap */ printf("\n"); for(i=0; ipage); - //mapScrollRight(draw, 1); - //SWAP(draw, show); +// mapScrollRight(draw, 1); +// SWAP(draw, show); } - } + }else if(keyp(75)){ for(q=0; q<16; q++) { mapScrollLeft(draw, 1); modexShowPage(draw->page); - //mapScrollLeft(show, 1); - //SWAP(draw, show); +// mapScrollLeft(show, 1); +// SWAP(draw, show); } } @@ -106,26 +106,25 @@ void main() { for(q=0; q<16; q++) { mapScrollDown(draw, 1); modexShowPage(draw->page); - //mapScrollDown(show, 1); - //SWAP(draw, show); +// mapScrollDown(show, 1); +// SWAP(draw, show); } - } - + }else if(keyp(72)){ for(q=0; q<16; q++) { mapScrollUp(draw, 1); modexShowPage(draw->page); - //mapScrollUp(show, 1); - //SWAP(draw, show); +// mapScrollUp(show, 1); +// SWAP(draw, show); } - }*/ + } - keyp(ch); + //keyp(ch); } - //modexLeave(); + modexLeave(); setkb(0); } diff --git a/16/modex16/scroll.exe b/16/modex16/scroll.exe index 40f86bd0..83b0bfc1 100755 Binary files a/16/modex16/scroll.exe and b/16/modex16/scroll.exe differ diff --git a/16/modex16/test.exe b/16/modex16/test.exe index b0247b18..e32a4751 100644 Binary files a/16/modex16/test.exe and b/16/modex16/test.exe differ diff --git a/16/modex16/test2.exe b/16/modex16/test2.exe index 23ca0df0..6476ebc1 100644 Binary files a/16/modex16/test2.exe and b/16/modex16/test2.exe differ