.COM programs start out with a 0 word pushed onto the stack and CS = DS = ES = SS = PSP
at PSP:0000, you will find CD 20, which is INT 20h
so, a NEAR RET gets you a terminate :P
MZ .EXE's start out a little differently
the code segment is not the same as the PSP segment, like .COM's
as i recall, DS and ES are pointing to the PSP, though
so, you can do this...
xor ax,ax
push ds
push ax
;
;
;
retf
the 8086/8088 didn't support pushing constants, so you couldn't use PUSH 0
most of the general registers are set to 0, i think
you might get away with PUSH DX or something
AX may not be 0 if there is 1 or 2 valid parsed path(s) on the command line
push ds
push dx
;
;
;
retf
i think that's the minimal MZ EXE - 3 bytes of code, 512 for the header
you're not supposed to use INT 20h from an EXE, unless you set cs to psp - something like that