;Copyright (C) 1996 Donald Bindner ; ;This program is free software; you can redistribute it and/or ;modify it under the terms of the GNU General Public License ;as published by the Free Software Foundation; either version 2 ;of the License, or (at your option) any later version. ; ;************************ data for AMIS protocol signature_string: db 'dbindner', 'dvorak96', 0 version_number equ 0100h hook_list: ; list of interrupts we are catching db 15h dw offset int15h4Fh db 2Dh dw offset my_Int2Dh multiplex_number db 0 ; multiplex number we are using my_Int2Dh_reset: ; required for interrupt sharing protocol iret my_Int2Dh: ;************************************ Interrupt sharing protocol header jmp short .H0 ; jump to actual start of handler .old_Int2Dh dd 0 ; address of next handler in chain dw 424Bh ; signature db 00h ; EOI flag jmp short my_Int2Dh_reset ; hardware reset routine times 7 db 0 ; reserved ;************************************ End of header .H0: cmp ah, [cs:multiplex_number] ; if not our multiplex number do old interrupt if_ne jmp far [cs:.old_Int2Dh] sti ; set interrupts on .L0: cmp al, 0h ; function 0 -- installation check jne .L1 ; if not, check next function dec al ; else set to al=FFh mov dx, cs ; segment of signature string mov di, offset signature_string ; and the offset mov cx, version_number ; version number of prog ch=major cl=minor iret ; and return .L1: ; cmp al, 01h ; function 1 -- get entry point ; jne .L2 ; if not, check next function ; mov al, 0h ; 0 == not supported ; iret .L2: cmp al, 02h ; function 2 -- uninstall jne .L3 ; if not, check next function mov byte [cs:dvorak_disabled], 1 ; disable program mov bx, cs ; segment of resident program mov al, 4h ; safe to remove iret .L3: ; cmp al, 03h ; function 3 -- request pop-up ; jne .L4 ; if not, check next function ; mov al, 0h ; not supported ; iret .L4: cmp al, 04h ; function 4 -- determine chained interrupts jne .L5 ; if not, check next function mov dx, cs ; segment of hook_list mov bx, offset hook_list ; offset of hook_list mov al, 04h ; list of interrupts returned iret .L5: ; cmp al, 05h ; function 5 -- get hotkeys ; jne .L99 ; if not, we're done ; mov al, 0h ; not implemented ; iret .L99: mov al, 0h ; not implemented iret ; return