Here is a PellesC demo built with a custom DOS stub. To create the 16-bit DOS stob, you need the 16-bit DOS linker. (http://website.masm32.com/microsoft/Lnk563.exe)
.model small
.stack
.data
string db 'This is a custom DOS stub.'
db '$' ; the DOS string terminator
.code
start:
mov ax,@data
mov ds,ax
mov dx,OFFSET string
mov ah,9
int 21h
mov ah,04Ch
int 21h
END start
\masm32\bin\ml /c CustomStub.asm
\masm32\bin\link16 /KNOWEAS CustomStub.obj
KNOWEAS is a special linker directive to mark an executable as DOS stub.
[attachment deleted by admin]