home *** CD-ROM | disk | FTP | other *** search
- IFNDEF TP4
- PAGE 60,132
- ;----------------------------------------------------------------------------
- SUBTTL TesSeRact Revision Level 1
- ;-----------------------------------------------------------------------------
- ; TesSeRact(tm) -- A Library of Routines for Creating Ram-Resident (TSR)
- ; programs for the IBM PC and compatible Personal
- ; Computers.
- ;
- ;The software, documentation and source code are:
- ;
- ; Copyright (C) 1986, 1987, 1988 Tesseract Development Team
- ; All Rights Reserved
- ;
- ; c/o Chip Rabinowitz
- ; Innovative Data Concepts
- ; 2084 Woodlawn Avenue
- ; Glenside, PA 19038
- ; 1-215-884-3373
- ;
- ;-----------------------------------------------------------------------------
- ; This product supports the TesSeRact Standard for Ram-Resident Program
- ; Communication. For information about TesSeRact, contact the TesSeRact
- ; Development Team at:
- ; Compuserve: 70731,20
- ; MCIMAIL: 315-5415
- ; This MCIMAIL Account has been provided to the TesSeRact Development
- ; Team by Borland International, Inc. The TesSeRact Development Team
- ; is in no way associated with Borland International, Inc.
- ;-----------------------------------------------------------------------------
-
- INCLUDE TESS.INC
- INCLUDE mixed.inc
-
- .MODEL small
- .CODE
-
- EXTRN TESS_USERPARMS:byte
-
- ENDIF
-
- IFNDEF ASMCOM
-
- hProc <TSSETSTACK FAR> PopStack:dword, BackStack:dword
-
- ELSE
-
- PUBLIC TSSETSTACK
- TSSETSTACK proc near
- ;
- ; in the assembler version, CS=DS=ES, and DI=offset of Popup Stack,
- ; and SI = offset of background stack.
- ;
-
- ENDIF
-
- ASSUMENODS
-
- IFNDEF ASMCOM
- les bx,PopStack ;load stack for popup
- ELSE
- push cs
- pop es
- mov bx,di
- ENDIF
- or bx,bx ;is it NULL?
- jnz not_default
-
- mov WPTR [OURSSSP],sp ;if so, use current SS:SP for
- mov WPTR [OURSSSP+2],ss ; popup stack
- jmp short get_back_stack
-
- not_default:
- and bx,0fffeh ;make sure it's even
- mov WPTR [OURSSSP],bx ;else use passed pointer
- mov WPTR [OURSSSP+2],es
-
- get_back_stack:
- IFNDEF ASMCOM
- les bx,BackStack ;load stack pointer for background
- ELSE
- mov bx,si
- ENDIF
- and bx,0fffeh ;make sure it's even
- mov WPTR [OUR28SP],bx ;store it
- mov WPTR [OUR28SP+2],es
-
- IFNDEF ASMCOM
-
- hRet
- hEndp
-
- ELSE
- ret
- TSSETSTACK endp
-
- ENDIF
-
- ENDIT
-