Skip to content

Fix faulty keyboard handler #12

@kjliew

Description

@kjliew

https://www.vogons.org/viewtopic.php?p=818225#p818225
Patch

--- orig/src/libc/go32/exceptn.S        2002-12-21 21:08:39.000000000 -0800
+++ ./exceptn.S 2020-01-18 18:37:27.397176800 -0800
@@ -337,6 +337,15 @@
        je      6f
        orb     $2,%ah  /* If RShift is set, set LShift as well */
 6:
+        movb    %ah,%al
+       andb    %cs:___djgpp_sigint_mask, %ah   /* Mask off irrelevant bits */
+       cmpb    %cs:___djgpp_sigint_key+1, %ah  /* Test for SIGINT */
+        je      60f
+        movb    %al,%ah
+       andb    %cs:___djgpp_sigquit_mask, %ah  /* Mask off irrelevant bits */
+       cmpb    %cs:___djgpp_sigquit_key+1, %ah /* Test for SIGQUIT*/
+       jne     Lkbd_chain
+60:
        inb     $0x60,%al                       /* Read the scan code */
 99:
        movb    %ah,%bh                         /* Save KB status */

Fix toolchain without recompiling by replacing the object file within libc

$ i686-pc-msdosdjgpp-gcc -c -o exceptn.o exceptn.S
$ i686-pc-msdosdjgpp-ar ru /opt/djgpp/i686-pc-msdosdjgpp/lib/libc.a exceptn.o

Affected DJGPP apps (for eg. Vim) can then be rebuilt to replace the faulty keyboard handler.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions