Win32 stub

19 views
Skip to first unread message

muta...@gmail.com

unread,
Jun 11, 2021, 2:04:30 PMJun 11
to
I've tested this code as a standalone executable
built with tasm+tlink, and it all looks fine, but does
anyone know if there is anything technically wrong
with it, as I'm not familiar with the requirements of
a stub.

Thanks. Paul.



; needpdos.asm - stub for Win32 executables
;
; This program written by Paul Edwards
; Released to the public domain

.model tiny

_DATA segment word public 'DATA'
msg db "Please install HX or upgrade to PDOS/386 or Wine etc etc$"
_DATA ends
_BSS segment word public 'BSS'
_BSS ends
_STACK segment word stack 'STACK'
db 1000h dup(?)
_STACK ends

DGROUP group _DATA,_BSS
assume cs:_TEXT,ds:DGROUP

_TEXT segment word public 'CODE'

top:

___intstart proc

mov dx,DGROUP
mov ds,dx

mov ah,09h
mov dx,offset msg
int 21h

mov al,0
mov ah,4ch
int 21h ; terminate

ret

___intstart endp


_TEXT ends

end top

muta...@gmail.com

unread,
Jun 11, 2021, 9:22:29 PMJun 11
to

R.Wieser

unread,
Jun 12, 2021, 4:02:01 AMJun 12
to
Paul,

> does anyone know if there is anything technically wrong
> with it, as I'm not familiar with the requirements of a stub.

Borlands tlink32 uses "bin\winstub.exe" as the default stub. A quick peek
into that file (using debug.exe)doesn't show anything special. A boring
old minimal DOS executable is more like it. :-)

Regards,
Rudy Wieser


Reply all
Reply to author
Forward
0 new messages