Discussion:
Win32 stub
(too old to reply)
muta...@gmail.com
2021-06-11 18:04:29 UTC
Permalink
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
2021-06-12 01:22:28 UTC
Permalink
I have answered my own question:

https://sourceforge.net/p/pdos/gitcode/ci/master/tree/src/needpdos.asm

BFN. Paul.
R.Wieser
2021-06-12 08:01:42 UTC
Permalink
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

Loading...