Use the extended keyboard handling functions.
authorhpa <hpa>
Wed, 1 Dec 2004 03:02:40 +0000 (03:02 +0000)
committerhpa <hpa>
Wed, 1 Dec 2004 03:02:40 +0000 (03:02 +0000)
conio.inc
ui.inc

index a0a2063..4210061 100644 (file)
--- a/conio.inc
+++ b/conio.inc
@@ -323,7 +323,7 @@ getchar:
                RESET_IDLE
 .again:
                DO_IDLE
-               mov ah,1                ; Poll keyboard
+               mov ah,11h              ; Poll keyboard
                int 16h
                jnz .kbd                ; Keyboard input?
                mov bx,[SerialPort]
@@ -343,8 +343,12 @@ getchar:
                xchg dx,bx              ; Data port
                in al,dx
                ret
-.kbd:          xor ax,ax               ; Get keyboard input
+.kbd:          mov ah,10h              ; Get keyboard input
                int 16h
+               cmp al,0E0h
+               jz .not_ext
+               xor al,al
+.not_ext:
                and al,al
                jz .func_key
                mov bx,KbdMap           ; Convert character sets
diff --git a/ui.inc b/ui.inc
index 8883381..796d5da 100644 (file)
--- a/ui.inc
+++ b/ui.inc
@@ -36,10 +36,10 @@ enter_command:
 ; out, or receive a character press at this time.  Some dorky BIOSes stuff
 ; a return in the buffer on bootup, so wipe the keyboard buffer first.
 ;
-clear_buffer:  mov ah,1                        ; Check for pending char
+clear_buffer:  mov ah,11h                      ; Check for pending char
                int 16h
                jz get_char_time
-               xor ax,ax                       ; Get char
+               mov ah,10h                      ; Get char
                int 16h
                jmp short clear_buffer
 get_char_time: