🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: de.comp.sys.ibm
Article #213

Tasten abfangen

#213
From: Eike Rathke
Date: Thu, 30 Jul 1992 01:42
89 lines
3130 bytes
                                in Hamburg war es Donnerstag der 30.07.92

moi Moin..

mal was Grundprinzipielles zum Tasten abfangen, als
InterruptServiceRoutine in den Int 09 KeyBoard-Handler einbinden..
die alte IntRoutine wird bei der betreffenden Taste _nicht_ mehr
aufgerufen..

BegISR:
        sti
        push    ax              ; zur weiterverarbeitung sichern
        in      al, 60h         ; von Tastaturport
        cmp     al, ScanCode    ; isses die Taste?
        jne     IsNichScan
        push    es
        mov     ax, 40h         ; bios datensegment
        mov     es, ax
        mov     al, es:[17h]    ; keyboard control 1
        and     al, dcMask1     ; mit don't care Maske ANDen
        cmp     al, ShiftCode1  ; isses der?
        jne     IsNichShift
        mov     al, es:[18h]    ; keyboard control 2
        and     al, dcMask2     ; mit don't care Maske ANDen
        cmp     al, ShiftCode2  ; isses der?
        jne     IsNichShift
        pop     es
WegMitTaste:
        cli                     ; nix dazwischenfunken lassen
        in      al, 61h         ; Tastaturstatus
        or      al, 80h         ; bit 7 setzen
        out     61h, al         ; clear keyboard
        and     al, 7Fh         ; bit 7 loeschen
        out     61h, al         ; status wieder herstellen
        mov     al, 20h
        out     20h, al         ; interrupt controller resetten
        sti                     ; nu koennse wieder
        pop     ax
        [... sonstige Aktionen ...]  ; z.B. fuer einen Prozess ein Flag setzen
        jmp     EndISR
IsNichShift:
        pop     es
IsNichScan:
        pop     ax
        cli
        pushf                   ; int simulieren
        call    AlteKeybIntRoutine
EndISR:
        iret



keyboard control 1 bei 40:17   wenn bit gesetzt, dann aktiv bzw. gedrueckt
~~~~~~~~~~~~~~~~~~
bit 7   insert modus
    6   caps lock modus
    5   num lock modus
    4   scroll lock modus
    3   alt taste
    2   ctrl taste
    1   linke shift taste
    0   rechte shift taste

keyboard control 2 bei 40:18
~~~~~~~~~~~~~~~~~~
bit 7   insert taste
    6   caps lock taste
    5   num lock taste
    4   scroll lock taste
    3   pause taste oder ctrl+num lock
    2   sys req taste
    1   linke alt taste
    0   linke ctrl taste



ScanCodes jetzt mit aufzufuehren wird mir zu viel, die sollten aber
in jedem besseren Tabellenwerk dabei sein.. (_nicht_ ASCII !!)


N8 auch..

g.u.t.
       Eike

--
## CrossPoint v1.21 ##
  
Technical Details
Message-ID: <4irYiArJag@P-ERACK.zer.sub.org>
Path: arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!darwin.sura.net!jvnc.net!yale.edu!nigel.msen.com!math.fu-berlin.de!fub!news.netmbx.de!news.Hamburg.Germany.EU.net!malihh!shlink.hanse.de!shgate!data-hh.zer.sub.org!erack

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!darwin.sura.net!jvnc.net!yale.edu!nigel.msen.com!math.fu-berlin.de!fub!news.netmbx.de!news.Hamburg.Germany.EU.net!malihh!shlink.hanse.de!shgate!data-hh.zer.sub.org!erack
From: erack@data-hh.zer.sub.org (Eike Rathke)
Newsgroups: de.comp.sys.ibm
Followup-To: de.comp.sys.ibm
Subject: Tasten abfangen
Message-ID: <4irYiArJag@P-ERACK.zer.sub.org>
Date: Thu, 30 Jul 92 02:42:00 MET
Organization: Zerberus Network Area, Germany
X-Z-Path: DATA-HH!LINK-HH!SHLINK
X-Gateway: US SHLINK [shgate V1.89]
Lines: 90