;prgramm keyclick.asm   idee aus pc+magazin
;16.06.88


dos        macro
           mov ah,#1
           int 021
#em

link       macro
           mov al,#1
           dos 035
           lea di,word ptr #2
           mov  [di],bx
           mov 2[di],es
           mov dx,offset #3
           dos 025
#em
           org 0100
           jmp  init
msg        db 'key ist installiert $'
oldint09   dw 0000
           dw 0000

int09:     pushf
           push ax
           push cx
           in al,060
           test al,080
           jne  end09
           and al,07f
           cmp al,038
           je end09
           cmp al,02a
           je end09
           cmp al,036
           je end09
           cmp al,01d
           je end09
           in al,061
           cli
ll:        and al,0fc
           or al,2
           out 061,al
           mov cx,30
lll:       loop lll
           and al,0fc
           out 061,al
           mov cx,30
llll:      loop llll
           and al,0fc
           out 061,al
           sti
end09:     pop cx
           pop ax
           popf
           cs:
           jmp far dword ptr oldint09
init:      push es
           link 09,oldint09,int09
           pop es
           mov dx,offset msg
           dos 09
           mov dx,offset init
           inc dx
           int 027

