home *** CD-ROM | disk | FTP | other *** search
/ Groovy Bytes: Behind the Moon / groovybytes.iso / GROOVY / SND_TOOL / FUNK108A.ZIP / DOS32V30.ZIP / PAL / VARIOUS / ABORT.ASM < prev    next >
Encoding:
Assembly Source File  |  1995-05-20  |  1.0 KB  |  38 lines

  1. ;****************************************************************************
  2. ; Filename: ABORT.ASM
  3. ;   Author: Peter Andersson
  4. ;  Version: 0.0
  5. ;  Created: 1995.02.09
  6. ;  Updated: -
  7. ;****************************************************************************
  8. ; Copyright Peter Andersson, 1994-1995.
  9. ; All rights reserved.
  10. ;****************************************************************************
  11. ; Function: VOID abort(VOID);
  12. ;    Input: nothing
  13. ;   Output: nothing
  14. ;  Comment: Aborts your program with an errorlevel of 3
  15. ;****************************************************************************
  16.  
  17.     Include    STDDEF.INC
  18.  
  19.     Codeseg
  20.  
  21. Extrn AbortStackPos:Dword,NoLanguage ExitQuick:Near
  22.  
  23. Proc    abort
  24.         Mov    Eax,[Esp]
  25.         Mov    Esp,[AbortStackPos]        ; Load the startup stack
  26.                 Mov     Edx,Offset AbortMsg
  27.                 Mov     ah,9
  28.                 Int     21h
  29.         Mov    Al,3                ; Exit with errorlevel 3
  30.         Jmp    ExitQuick            ; and quit quickly
  31. Endp
  32.  
  33.     Dataseg
  34.  
  35. AbortMsg    Db    "Abnormal termination",LF,0
  36.  
  37.     End
  38.