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 tsint24.pub
- ENDIF
-
- .MODEL small
-
- .CODE
-
- EXTRN TESS_GLOBALS:byte
- EXTRN TESS_USERPARMS:byte
-
- PUBLIC newint24, _TESS_ERROR24
-
- ENDIF
-
- ;---------------------------------------------------------------------;
- ; I N T E R R U P T 2 4 - Critical Error - ;
- ;---------------------------------------------------------------------;
- _TESS_ERROR24 dw 0
-
- newint24 proc far
- ASSUMENODS
-
- pushf
- test WPTR [STATUS],EXTRAINT24
- jz our24 ;call user's INT 24 instead!
-
- POPFF
- jmp DPTR [USERINT24]
-
- our24:
- cmp BPTR [DOSVERSION],3
- jae use_dos3
-
- POPFF ;for DOS 2.x only!
-
- add sp,6 ;discard DOS stack info
- mov _TESS_ERROR24,di ;save the error
-
- les di,DPTR [DOSCRITERR] ;reset crit error flag
- xor al,al
- stosb ;back to zero
-
- sti
-
- pop ax
- pop bx
- pop cx
- pop dx
- pop si
- pop di
- pop bp
- pop ds
- pop es
-
- push ax
- push dx
- mov ax,3300h ;get ^C status is called
- int 21h ; to clear out DOS and fixup
- ;future INT 21h calls
-
- pop dx
- pop ax
- ;now we have the caller's
- ;CS,IP and Flags on the stack
- mov ax,_TESS_ERROR24 ;save error value
- add ax,19 ;conform to DOS 3.+ error codes
-
- push bp
- mov bp,sp
-
- or WPTR [bp+6],01h ;set carry flag (01h) ...
- ; on stack
- pop bp
- iret
-
- use_dos3:
- POPFF
- mov al,3
- iret
- newint24 endp
-
- ENDIT
-