mirror of
https://github.com/FDOS/kernel.git
synced 2025-07-24 14:24:46 +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
|
||||
|
||||
;
|
||||
; (taken from nansi.sys)
|
||||
;
|
||||
global ConInit
|
||||
ConInit:
|
||||
; Jam special test code into keyboard buffer
|
||||
mov ah,5
|
||||
mov cx,0ffffh
|
||||
int 16h
|
||||
; Try to read special test code from keyboard buffer
|
||||
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:
|
||||
mov ax,40h
|
||||
mov ds,ax
|
||||
mov al,[96h]
|
||||
and al,10h
|
||||
mov byte[cs:kbdType],al ; enhanced keyboard if bit 4 set
|
||||
jmp _IOExit
|
||||
|
||||
;
|
||||
|
Loading…
x
Reference in New Issue
Block a user