home *** CD-ROM | disk | FTP | other *** search
- Inline(
- {; STAYI28.400}
- {;------------}
- {; Routine to Invoke User Code When HotKey or DOS idle}
- $5D { Pop Bp ; Remove Turbo Prologue}
- /$5D { Pop Bp}
- /$9C { Pushf}
- /$2E { CS:}
- /$FF/$1E/>DOS_INT28 { Call dw [>DOS_INT28] ; Invoke Original INT 28}
- /$2E { CS:}
- /$F6/$06/>STATUS/<HOTKEY_ON { Test by [<Status],<HotKey_on ; Have we received the HOKEY}
- /$74/$25 { Jz NoGo}
- /$2E { CS:}
- /$F6/$06/>STATUS/<INUSE { Test by [<Status],<Inuse ; If Inuse.. then No go}
- /$75/$1D { Jnz NoGo}
- {; If Not already waiting I/O, not already in use, and HotKey received}
- {; see if DOS is now interruptable}
- {ChkIO:}
- /$06 { Push ES ; Save registers}
- /$56 { Push Si}
- /$50 { Push Ax}
- /$2E { CS:}
- /$C4/$36/>DOSSTAT2 { LES SI,[>DOSstat2] ; Fetch DOS Critical status byte}
- /$26 { ES:}
- /$AC { LodSb}
- /$2E { CS:}
- /$0A/$06/>INTR_FLAGS { Or Al,[<Intr_Flags] ; Add Interrupt active flags}
- /$58 { Pop Ax}
- /$5E { Pop Si}
- /$07 { Pop ES}
- /$75/$09 { Jnz NoGo ; Wait for inactivity}
- /$2E { CS: ; Have the HotKey}
- /$80/$3E/>WAITCOUNT/$00 { Cmp by [<WaitCount],00 ; If timer waiting, go}
- /$E9/$01/$00 { Jmp Go}
- {NoGo:}
- /$CF { IRET}
- {GO: ; Enter the User's Turbo Procedure}
- /$2E { CS:}
- /$C6/$06/>WAITCOUNT/$00 { Mov by [<WaitCount],00 ; Kill INT8 wait count}
- /$2E { CS:}
- /$FF/$16/>USERPROGRAM { Call [<UserProgram]}
- /$CF { IRET}
- {;.......................................................................}
- );
-