	PAGE	,132  ; (CTRL-OH)   IBM PC PRINTER CONDENSED MODE
	TITLE	SKELEXE2 - SAMPLE.EXE STYLE WITH DOS 2.0+ EXIT INTERFACE
DSEG	SEGMENT PARA PUBLIC 'DATA'

;insert data here

DSEG	ENDS

CSEG	SEGMENT PARA PUBLIC 'CODE'
	ASSUME	CS:CSEG,SS:STACK	;ALREADY SET BY DOS LOADER

ENTPT	PROC	FAR			;ENTRY POINT FROM DOS
	MOV	AX,DSEG 		;SET UP ADDRESSABILITY TO
	MOV	DS,AX			; THE DATA SEGMENT
	ASSUME	DS:DSEG 		;TELL ASSEMBLER WHAT I JUST DID

;insert code here

RET_CD	EQU	0			;ERRORLEVEL RETURN CODE VALUE
RET_FN	EQU	4CH			;"RETURN TO DOS" FUNCTION CALL

	MOV	AX,RET_FN*256 + RET_CD	;RETURN TO DOS FUNCTION CALL, AND
					;VALUE TO BE PASSED TO ERRORLEVEL
	INT	21H			;RETURN TO DOS
					; (VERSION 2.00 OR LATER)
ENTPT	ENDP
CSEG	ENDS

STACK	SEGMENT PARA STACK 'STACK'
	DB	64 DUP("STACK   ")      ;256 WORD STACK AREA
STACK	ENDS
	END	ENTPT
