This source produces default COFF stub program in format MZ (16bit DOS executable). Its only job is to tell the user, that the program was launched in DOS but it requires Windows subsystem.
Produced executable file
coffstub.exe is stored in subdirectory
and incorporated into
. It will be linked to each PE-COFF program created by EuroAssembler
unless it explicitly specifies a different executable MZ program by
PROGRAM STUBFILE= option.
coffstub PROGRAM FORMAT=MZ,MODEL=SMALL,WIDTH=16,ENTRY=Main,OUTFILE="..\objlib\coffstub.exe", \ SECTIONALIGN=0,FILEALIGN=0,SIZEOFSTACKCOMMIT=512,SIZEOFHEAPCOMMIT=1M [CODE] SEGMENT PURPOSE=CODE+DATA+LITERALS Main:PUSH CS POP DS MOV DX,=B"This program was launched in DOS but it requires Windows.$" MOV AH,9 INT 21h ; DOS function "Write string$ at DS:DX". MOV AX,4C08h INT 21h ; DOS function "Terminate program with errorlevel in AL". [STACK] SEGMENT PURPOSE=STACK D 256*WORD ENDPROGRAM coffstub