mirror of
https://github.com/FDOS/kernel.git
synced 2025-07-26 23:34:18 +02:00
Simple extended keyboard detection using 40:96
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@608 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
2a83b111c4
commit
7c8b87380f
@ -56,30 +56,13 @@ uScanCode db 0 ; Scan code for con: device
|
|||||||
|
|
||||||
kbdType db 0 ; 00 for 84key, 10h for 102key
|
kbdType db 0 ; 00 for 84key, 10h for 102key
|
||||||
|
|
||||||
;
|
|
||||||
; (taken from nansi.sys)
|
|
||||||
;
|
|
||||||
global ConInit
|
global ConInit
|
||||||
ConInit:
|
ConInit:
|
||||||
; Jam special test code into keyboard buffer
|
mov ax,40h
|
||||||
mov ah,5
|
mov ds,ax
|
||||||
mov cx,0ffffh
|
mov al,[96h]
|
||||||
int 16h
|
and al,10h
|
||||||
; Try to read special test code from keyboard buffer
|
mov byte[cs:kbdType],al ; enhanced keyboard if bit 4 set
|
||||||
mov cx, 10h
|
|
||||||
kbdLoop:
|
|
||||||
; Get keystroke using extended keyboard read
|
|
||||||
mov ah, 10h
|
|
||||||
int 16h
|
|
||||||
; Is it our special test code?
|
|
||||||
cmp ax, 0ffffh
|
|
||||||
; Yes; Set flag saying that the extended keyboard BIOS is supported
|
|
||||||
je kbdExtended
|
|
||||||
loop kbdLoop
|
|
||||||
jmp short kbdSimple
|
|
||||||
kbdExtended:
|
|
||||||
mov byte[cs:kbdType],10h
|
|
||||||
kbdSimple:
|
|
||||||
jmp _IOExit
|
jmp _IOExit
|
||||||
|
|
||||||
;
|
;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user