home *** CD-ROM | disk | FTP | other *** search
- page ,132
-
- comment !
- * aborted application handlers
- *
- * This program is the CONFIDENTIAL and PROPRIETARY property
- * of FairCom(R) Corporation. Any unauthorized use, reproduction or
- * transfer of this program is strictly prohibited.
- *
- * Copyright (c) 1987, 1988, 1989 FairCom Corporation
- * (Subject to limited distribution and
- * restricted disclosure only.)
- * *** ALL RIGHTS RESERVED ***
- *
- * 4006 West Broadway
- * Columbia, MO 65203
- *
- *
- * c-tree(R) Version 4.3
- * Release C
- * February 7, 1989 17:30
- *
- !
- extrn _fdisconnect:far ;in ctamsg.c or ctamsgx.c
-
- include asm.inc
-
-
- CBRK_NONE = 0
- CBRK_DFL = 1
- CBRK_IGN = 2
-
- CERR_NONE = 0
- CERR_DFL = 1
- CERR_FAIL = 2
-
-
- I24FAILBIT = 8
- I24FAILRET = 3
- I24ABORTRET = 2
-
- CSEG
- ;!!!! CODE SEGMENT DATA !!!!
- i23_mode db 0
- i24_mode db 0
- i24_passon dd ?
-
- ;
- ;void far _set_abort_traps(i23_mode, i24_mode);
-
- assume ds:DGROUP
- public _set_abort_traps
- _set_abort_traps proc far
- push bp
- mov bp,sp
- mov ax,[bp+6] ;i23_mode
- cmp ax,CBRK_NONE
- jz ini1
- mov i23_mode,al
- push ds
- push cs
- pop ds
- mov dx,OTX i23_trap
- DOS 2523h
- pop ds
- ini1:
- mov ax,[bp+8]
- cmp ax,CERR_NONE
- jz ini2
- mov i24_mode,al
- DOS 3524h
- mov WO i24_passon,bx
- mov WO i24_passon+2,es
- push ds
- push cs
- pop ds
- mov dx,OTX i24_trap
- DOS 2524h
- pop ds
- ini2:
- pop bp
- ret
- _set_abort_traps endp
-
- assume ds:nothing
-
- public i23_trap
- i23_trap proc far
- sti
- cmp i23_mode,CBRK_IGN
- jnz cct1
- iret
- cct1: call discon ;note, we are on C's stack
- stc
- ret ;(dos cleans int flags from stack)
- i23_trap endp
-
- public i24_trap
- i24_trap proc far
- sti
- cmp i24_mode,CERR_DFL
- jz ce1
- test ah,I24FAILBIT
- jnz ce1
- mov al,I24FAILRET
- iret
- ce1: pushf
- cli
- call i24_passon
- cmp al,I24ABORTRET
- jnz ce2
- call discon ;note, we are on C's stack
- ce2: iret
- i24_trap endp
-
- public discon
- discon:
- PUSHM <ax,bx,cx,dx,si,di,bp,ds,es>
- mov ax,DGROUP
- mov ds,ax
- assume ds:DGROUP
-
- call _fdisconnect
-
- POPM <es,ds,bp,di,si,dx,cx,bx,ax>
- assume ds:nothing
- ret
-
- END_MOD
- end
-
-