From 6b82b8862f8cc69a78eee38a0afba9201694d029 Mon Sep 17 00:00:00 2001 From: Davide Date: Fri, 4 Mar 2022 13:07:42 +0100 Subject: [PATCH 1/3] PC5086 compatibility fix. Removed access to port 64h, not present in the 8255 PPI Reset keyboard by toggling bit 7 of port 61h --- SOURCE/KEYB.PAS | 39 +++++++++------------------------------ 1 file changed, 9 insertions(+), 30 deletions(-) diff --git a/SOURCE/KEYB.PAS b/SOURCE/KEYB.PAS index bf27780..f9dba53 100644 --- a/SOURCE/KEYB.PAS +++ b/SOURCE/KEYB.PAS @@ -1559,31 +1559,19 @@ end; ---- MODULE 7: XT specific routines ----- ------------------------------------------------------------------------} - -CONST - { keyboard commands } - DisableKeyboard = $AD; - EnableKeyboard = $AE; - {************************************************************************ -** EnableKeyboardProc: enable keyboard hardware ** +** EnableKeyboardProc: clear keyboard buffer ** ** ------------------------------------------------------------------- ** ** IN: - ** -** OUT: AX and CX are trashed ** +** OUT: AL is trashed ** *************************************************************************} Procedure EnableKeyboardProc; assembler; -label WaitReady2; asm - XOR CX, CX { counter to 65535! } - -WaitReady2: - IN AL, $64 { read status register } - TEST AL, 2 { bit 1 set: input buffer full? } - LOOPNZ WaitReady2 { loop until timeout or bit 1 clear } - - MOV AL, EnableKeyboard - OUT $64, AL { send the enable command } - + IN AL, $61 { read status register } + OR AL, $F0 { set bit 7, clear keyboard } + OUT $61, AL { clear keyboard } + AND AL, $7F { clear bit 7 } + OUT $61, AL { toggle clear bit to reenable keyboard } end; @@ -1620,15 +1608,6 @@ Start: CLI { disable hardware ints } XOR CX,CX MOV ES,CX - DEC CX { counter to 65535! } - -WaitReady1: - IN AL, $64 { read status register } - TEST AL, 2 { bit 1 set: input buffer full? } - LOOPNZ WaitReady1 { loop until timeout or bit 1 clear } - - MOV AL, DisableKeyboard - OUT $64, AL { send the disable command } {-- Read and authenticate scancode --} IN AL, $60 { get scancode to AL } @@ -1666,7 +1645,7 @@ EndProcessPause: JMP LeaveInt ChainToOld: - CALL EnableKeyboardProc + { CALL EnableKeyboardProc -- not needed, OldInt9h will clear buffer } PUSHF STI CALL DWORD PTR CS:[Offset OldInt9h] @@ -2588,7 +2567,7 @@ begin mov ah, $58 { set alloc strategy } mov al, 1 xor bh,bh - mov bl, $81 { use last fit } + mov bl, $82 { last fit, try high then low } int $21 mov ah, $58 { get UMB link state } From b14c8272dea20c9baa54cb0e42c9e072b24df54c Mon Sep 17 00:00:00 2001 From: Davide Bresolin Date: Thu, 30 Nov 2023 13:28:52 +0100 Subject: [PATCH 2/3] Create README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..4315c4f --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# fd-keyb +FD-KEYB enhances or replaces the BIOS keyboard management to adapt it to international keyboard layouts + +**Archived on November 30th, 2023** +The XT incompatibility has been fixed in FD-KEYB 2.10 (https://gitlab.com/FreeDOS/base/keyb/-/issues/1), hence this repository is not needed anymore. From 4cf98e66a4a7fe9748625ef8e503b85e1dcbc508 Mon Sep 17 00:00:00 2001 From: Davide Bresolin Date: Thu, 30 Nov 2023 13:29:34 +0100 Subject: [PATCH 3/3] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4315c4f..e985eb1 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # fd-keyb FD-KEYB enhances or replaces the BIOS keyboard management to adapt it to international keyboard layouts -**Archived on November 30th, 2023** +### Archived on November 30th, 2023 + The XT incompatibility has been fixed in FD-KEYB 2.10 (https://gitlab.com/FreeDOS/base/keyb/-/issues/1), hence this repository is not needed anymore.