home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 June
/
SIMTEL_0692.cdr
/
msdos
/
turbopas
/
stay42.arc
/
STAYI8.420
< prev
next >
Wrap
Text File
|
1986-08-02
|
3KB
|
53 lines
Inline(
{; STAYI8.413}
{;-----------}
{; Routine to Await Outstanding I/O, then post Stayres Active}
$5D { Pop Bp ; Remove Turbo Prologue}
/$5D { Pop Bp}
/$9C { Pushf}
/$2E { CS:}
/$FF/$1E/>BIOS_INT8 { Call dw [>BIOS_INT8] ; Invoke Original INT 8}
/$2E { CS:}
/$F6/$06/>STATUS/<HOTKEY_ON { Test by [<Status],<HotKey_on ; Have we received the HOKEY}
/$74/$39 { Jz NoGo}
/$2E { CS:}
/$F6/$06/>STATUS/<INUSE { Test by [<Status],<Inuse ; If Inuse.. then No go}
/$75/$31 { Jnz NoGo}
/$2E { CS: ; Have the HotKey}
/$80/$3E/>WAITCOUNT/$00 { Cmp by [<WaitCount],00 ; If waiting, check time}
/$75/$22 { Jnz Waiting}
{; 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/>DOSSTAT1 { LES Si,[>DOSstat1] ; Fetch Dos status 1}
/$26 { ES:}
/$AC { Lodsb ; Fetch Status byte from dos}
/$2E { CS:}
/$C4/$36/>DOSSTAT2 { LES SI,[>DOSstat2] ; Add second status byte}
/$26 { ES:}
/$0A/$04 { Or Al,[SI]}
/$2E { CS:}
/$0A/$06/>INTR_FLAGS { Or Al,[<Intr_Flags] ; Add Interrupt active flags}
/$58 { Pop Ax}
/$5E { Pop Si}
/$07 { Pop ES}
/$74/$0E { Jz Go ; Wait for inactivity}
/$2E { CS:}
/$C6/$06/>WAITCOUNT/$10 { Mov by [<WaitCount],$10 ; Set Wait count}
{Waiting:}
/$2E { CS:}
/$FE/$0E/>WAITCOUNT { Dec by [<WaitCount] ; Decrement wait count}
/$74/$D7 { Jz ChkIO}
{NoGo:}
/$CF { IRET}
{GO: ; Enter the User's Turbo Procedure}
/$2E { CS:}
/$FF/$16/>USERPROGRAM { Call [<UserProgram]}
/$CF { IRET}
{;.......................................................................}
);