home *** CD-ROM | disk | FTP | other *** search
- ;* ------------------------------------------------------- *
- ;* MOUSEKEY.ASM *
- ;* Assemblermodul für Unit Mouse *
- ;* (c) 1990 Raimond Reichert & TOOLBOX *
- ;* ------------------------------------------------------- *
- DATA SEGMENT WORD PUBLIC
- EXTRN OldInt09 : DWORD
- DATA ENDS
-
- CODE SEGMENT BYTE PUBLIC
- ASSUME CS:Code
- PUBLIC NewMouHandler
- PUBLIC NewKeybHandler
- EXTRN CallMouHandler : NEAR
- EXTRN CallKeybHandler : NEAR
-
- ;* ------------------------------------------------------- *
- NewMouHandler PROC FAR
-
- PUSH AX ; Prozessorregister sichern
- PUSH BX
- PUSH CX
- PUSH DX
- PUSH DI
- PUSH SI
- PUSH BP
- PUSH ES
- PUSH DS
- ; Parameter für den Aufruf von
- ; CallMouhandler auf den Stack
- PUSH AX ; Flags
- PUSH BX ; Buttons
- PUSH CX ; X-Koordinate
- ; ACHTUNG: X- und Y-Koordinate sind auf
- ; den virtuellen Grafikbildschirm bezogen,
- ; der Handler muss sie für Textmodus um-
- ; rechnen
- PUSH DX ; Y-Koordinate
- MOV AX,Data ; Segmentadresse in AX
- MOV DS,AX ; bzw in DX
-
- CALL CallMouHandler
- POP DS
- POP ES
- POP BP
- POP SI
- POP DI
- POP DX
- POP CX
- POP BX
- POP AX
- RET
-
- NewMouHandler ENDP
-
- ;* ------------------------------------------------------- *
- NewKeybHandler PROC FAR
-
- STI ; Interruptaufrufe zulassen
- PUSH AX ; Prozessorregister sichern
- PUSH BX
- PUSH CX
- PUSH DX
- PUSH DI
- PUSH SI
- PUSH BP
- PUSH ES
- PUSH DS
- IN AL,60h ; Scancode der Taste einlesen
- XOR AH,AH ; ist nur in AL
- PUSH AX ; --> auf den Stack
- MOV AX,Data
- MOV DS,AX
- PUSHF
- ; alten Interrupthandler aufrufen
- CALL DS:[OldInt09]
- CALL CallKeybHandler
-
- POP DS ; Register wiederherstellen
- POP ES
- POP BP
- POP SI
- POP DI
- POP DX
- POP CX
- POP BX
- POP AX
- IRET ; WICHTIG: ist Interrupt !
-
- NewKeybHandler ENDP
-
- CODE ENDS
- END
- ;* ------------------------------------------------------- *
- ;* Ende von MOUSEKEY.ASM *
-