home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / STAYRESP.ZIP / STAYRSTR.410 < prev    next >
Encoding:
Text File  |  1986-05-04  |  2.7 KB  |  41 lines

  1. Inline(
  2.                               {;****************************************************************************;}
  3.                               {;                  S  T  A  Y  R  S  T  R  .  I  N  C                        ;}
  4.                               {;                                                                            ;}
  5.                               {;           This is the StayRstr.Inc file included above                     ;}
  6.                               {;****************************************************************************;}
  7.                               {;Version 4.00}
  8.                               {               ; Inline Code to restore the stack and regs moved}
  9.                               {               ; to the Turbo Resident Stack which allows}
  10.                               {               ; Turbo Terminate & Stay Resident programs.}
  11.                               {      ; Copr. 1985, 1986}
  12.                               {      ; Author: Lane Ferris}
  13.                               {      ;       - The Hunter's Helper -}
  14.                               {      ; Distributed to the Public Domain for use without profit.}
  15.                               {      ; Original Version 5.15.85}
  16.                               {;----------------------------------------------------------------------;}
  17.                               {;        Restore the Dos (or interrupted pgm) Regs and Stack           ;}
  18.                               {;----------------------------------------------------------------------;}
  19.   $FA                         {    CLI}
  20.   /$07                        {    Pop  Es}
  21.   /$5F                        {    Pop  Di}
  22.   /$5E                        {    Pop  Si}
  23.   /$5A                        {    Pop  Dx}
  24.   /$59                        {    Pop  Cx}
  25.   /$5B                        {    Pop  Bx}
  26.   /$58                        {    Pop  Ax}
  27.   /$2E                        {    CS:}
  28.   /$80/$26/>STATUS/<FOXS-INUSE-HOTKEY_ON{    And by [<Status],<Foxs-Inuse-HotKey_on   ; Clear INUSE flag}
  29.   /$2E                        {    CS:                                        ; .. and HotKey}
  30.   /$8E/$1E/>DOSDSEG           {    Mov  DS,[<DosDSeg]}
  31.   /$2E                        {    CS:}
  32.   /$8E/$16/>DOSSSEG           {    Mov  SS,[<DosSSeg]}
  33.   /$2E                        {    CS:}
  34.   /$8B/$26/>DOSSPTR           {    Mov  SP,[<DosSPtr]}
  35.   /$5D                        {    Pop  Bp            ; Remove Bp,Sp from Procedure entry}
  36.   /$5D                        {    Pop  Bp}
  37.   /$FB                        {    STI                ; enable interrupts}
  38.   /$C3                        {    RET}
  39.                               {;.......................................................................}
  40. );
  41.