home *** CD-ROM | disk | FTP | other *** search
- Inline(
- {; STAYI9.400}
- {; Routine to watch for the HOTKEY within Keyboard Interrupt 9}
- {; Set a flag if found, and Ignore the key therafter}
- $5D { Pop Bp ; Remove Turbo Prologue}
- /$5D { Pop Bp}
- /$50 { Push Ax ; Save scratch register}
- /$1E { Push DS ; Save interrupted DataSeg}
- /$B8/$40/$00 { Mov Ax,$40 ; Address BIOS data segment}
- /$8E/$D8 { Mov DS,Ax}
- /$A0/$17/$00 { Mov Al,[$17] ; Fetch Shift codes}
- /$1F { Pop DS}
- /$2E { CS:}
- /$3A/$06/>OUR_HOTKEY+1 { Cmp Al,[<Our_HotKey+1] ; Test Shift status}
- /$75/$0D { Jne NotHot}
- /$E4/$60 { In Al,$60 ;Kb_Port ; Fetch the current scan code}
- /$88/$C4 { Mov Ah,Al ; Save Scan Code}
- /$24/$7F { And Al,$7F ; Kill the break Bit}
- /$2E { CS:}
- /$3A/$06/>OUR_HOTKEY { Cmp Al,[<Our_HotKey] ; If Our HotKey, get Hot}
- /$74/$06 { Je AmHot}
- {NotHot:}
- /$58 { Pop Ax ; Else call BIOS INT_9}
- /$2E { CS:}
- /$FF/$2E/>BIOS_INT9 { Jmp dword [>Bios_Int9]}
- {AmHot: ; We've got some action}
- /$E4/$61 { In Al,$61 ;Kb_Ctrl ; Fetch Keyboard Status}
- /$88/$C4 { Mov Ah,Al}
- /$0C/$80 { Or Al,$80 ; Thank him for the info}
- /$E6/$61 { Out $61,Al ;KB_ctrl}
- /$86/$C4 { Xchg Ah,Al ; Get back original Status}
- /$E6/$61 { Out $61,Al ;KB_ctrl ; Reset the Keyboard}
- /$FA { Cli ; Send End-of-Interrupt}
- /$B0/$20 { Mov Al,$20 ;EOI}
- /$E6/$20 { Out $20,Al}
- /$2E { CS: ; Say we're in the money}
- /$80/$0E/>STATUS/<HOTKEY_ON { Or by [<Status],<HotKey_On }
- /$58 { Pop Ax}
- /$CF { IRET}
- {;....................................................................}
- );
-