dos_compilers/Manx Aztec C86 v52a/LIB/86SUP/_EXIT.ASM

28 lines
422 B
NASM
Raw Permalink Normal View History

2024-07-02 17:25:54 +02:00
; :ts=8
include lmacros.h
codeseg segment word public 'code'
public _exitcs
_exitad dw 0 ;DOS return address
_exitcs dw 0
procdef _exit
pop ax
pop ax ;fetch return code
ifdef FARPROC
pop ax
endif
;exits:
mov ah,4cH ;issue DOS terminate call
int 21H
jmp dword ptr _exitad ;if that fails, try this
_exit_ endp
procdef _exitinit
mov _exitcs,ds
pret
pend _exitinit
codeseg ends