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
- IFDEF ALLPUBLIC
- INCLUDE tsint1c.pub
- ENDIF
-
- .MODEL small
-
- EXTRN TSRTIMERPROC:FAR
-
- .CODE
-
- EXTRN TESS_GLOBALS:byte
- EXTRN TESS_USERPARMS:byte
-
- PUBLIC newint1C
-
- ENDIF
-
- ;---------------------------------------------------------------------;
- ; I N T E R R U P T 1 C - t i m e r - ;
- ;---------------------------------------------------------------------;
- newint1C proc far
-
- ASSUMENODS
-
- push ds
-
- push cs
- pop ds
-
- ASSUMEDS
-
- pushf
-
- test WPTR [STATUS],TSRENABLED ;is TSR enabled?
- jz do_old1c ;no -- do original
-
- test BPTR [SOFTINTFLAGS],ININT1C ;See if recursion has taken place
- jz start_new_int1C ;If not continue with new int 1C
-
- do_old1c:
- POPFF
- pop ds
-
- ASSUMENODS
-
- jmp DPTR [OLDINT1C] ;Jump to original int 1C
-
- start_new_int1C:
- ASSUMEDS
-
- or BPTR [SOFTINTFLAGS],ININT1C ;Set the int 1C active flag
- POPFF
-
- pushf ;simulate interrupt ...
- call DPTR [OLDINT1C] ;do the original
-
- sti
-
- push ax
-
- mov ax,WPTR [STATUS] ;is a Timer Procedure set?
- test ax,TIMERSET
- jz exit_1C ;nope
-
- push bx
- push cx ;save registers
- push dx
- push es
-
- mov ax,WPTR [OURDSEG] ;set up data segments
-
- push ax
- push ax
- pop ds
- pop es
-
- ASSUMENODS
-
- sti ;make sure ints are enabled ;v .66
-
- IFDEF TP4
- IFNDEF ASMCOM
- call DPTR PTIMERPROC ;for TP4 must use procptr
- ELSE
- call TSRTIMERPROC ;non-TP version
- ENDIF
- ELSE
- call TSRTIMERPROC ;non-TP version
- ENDIF
-
- end_1C:
- pop es
- pop dx
- pop cx
- pop bx
-
- exit_1C:
- and BPTR [SOFTINTFLAGS],NOT ININT1C
- pop ax
- pop ds
- iret
-
- newint1C endp
-
- ENDIT
-