;****************************************************************************
;*/ Forwarded by Alexander Petrosyan (2:5020/335.8)
;*/ From : Mikle Likhachev at 2:5030/131.131 (27 Oct 94 16:27)
;*/ How to fool a int 9 handler into pressing a key on the keyboard.
;*/ Subj : Re: Reset
;*****************************************************************************

Code    Segment
        Assume  Cs:Code
        Org     100h

WaitM   Macro
        Local   Lab
        Push    Cx
        Xor     Cx,Cx
Lab:    Loop    Lab
        Pop     Cx
        EndM
;
Start:  Cli
        Mov     Al,20h
        Out     64h,Al
        WaitM
        In      Al,60h
        Mov     Dl,Al
        Mov     Al,60h
        Out     64h,Al
        WaitM

        Mov     Al,2           ;;;;;;;;; Here scancode itself
        Out     60h,Al
        WaitM
        Mov     Al,20h
        Out     64h,Al
        WaitM
        Mov     Al,60h
        Out     64h,Al
        WaitM
        Mov     Al,Dl
        Out     60h,Al
        WaitM
        In      Al,60h
        Sti
        int     9
        Int     20h
Code    EndS
        End     Start
