;****************************************************************************
; Filename: ABORT.ASM
; Author: Peter Andersson
; Version: 0.0
; Created: 1995.02.09
; Updated: -
;****************************************************************************
; Copyright Peter Andersson, 1994-1995.
; All rights reserved.
;****************************************************************************
; Function: VOID abort(VOID);
; Input: nothing
; Output: nothing
; Comment: Aborts your program with an errorlevel of 3
;****************************************************************************
Include STDDEF.INC
Codeseg
Extrn AbortStackPos:Dword,NoLanguage ExitQuick:Near
Proc abort
Mov Eax,[Esp]
Mov Esp,[AbortStackPos] ; Load the startup stack
Mov Edx,Offset AbortMsg
Mov ah,9
Int 21h
Mov Al,3 ; Exit with errorlevel 3
Jmp ExitQuick ; and quit quickly
Endp
Dataseg
AbortMsg Db "Abnormal termination",LF,'$'
End