Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Request Help With 16 Bit DLL

14 views
Skip to first unread message

Wildman

unread,
Sep 21, 2012, 6:22:19 PM9/21/12
to
Does anyone have a template for a win16 dll written
with masm6? Of course, one written in any assembly
language would be helpful.

Information on this subject on the web is scarce and
masm6's docs barely covers it and the info given is
for the advanced programmer, which I am not. I am
just an amateur that enjoys programming as a hobby.

Any guidance would be appreciated.

nathan...@gmail.com

unread,
Sep 21, 2012, 7:02:20 PM9/21/12
to
Someone on Hutch's board might remember how to do that. Ask around over there: http://masm32.com/board/index.php?board=18.0

Also, you will need to obtain a 16-bit linker. You can find one in the Digital Mars package: http://www.digitalmars.com/

Nathan.

Wildman

unread,
Sep 21, 2012, 7:24:43 PM9/21/12
to
On Fri, 21 Sep 2012 16:02:20 -0700, nathancbaker wrote:

> On Friday, September 21, 2012 6:22:20 PM UTC-4, Wildman wrote:
>> Does anyone have a template for a win16 dll written
>>
>> with masm6? Of course, one written in any assembly
>>
>> language would be helpful.
>>
>>
>>
>> Information on this subject on the web is scarce and
>>
>> masm6's docs barely covers it and the info given is
>>
>> for the advanced programmer, which I am not. I am
>>
>> just an amateur that enjoys programming as a hobby.
>>
>>
>>
>> Any guidance would be appreciated.
>
> Someone on Hutch's board might remember how to do that. Ask around over
> there: http://masm32.com/board/index.php?board=18.0

Thanks, I will give that a try.

>
> Also, you will need to obtain a 16-bit linker. You can find one in the
> Digital Mars package: http://www.digitalmars.com/

The linker with masm6 is 16 bit.

>
> Nathan.

I appreciate your response.

Wildman

unread,
Sep 22, 2012, 8:38:32 PM9/22/12
to
On Fri, 21 Sep 2012 16:02:20 -0700, nathancbaker wrote:

> <snip>

I tried registering but I never received the authorization
email. Had them resend it but still nothing. I did check
my spam folder as they suggested but not there either.

Tonight I tried again to have the authorization email resent
but not it will not let me. Tell me my email is already
in use by a registered user but if I try to login, it says
that the account has not been activated.

Oh well, I guess it was not meant to be. :-(

japheth

unread,
Sep 23, 2012, 2:13:40 PM9/23/12
to
Here' a sample in Masm syntax:

[code]
;--- a Win16 dll sample

.286
.model small
.386

.data

wVar dw 0

.code

LibMain proc far pascal

mov ax,1
ret
LibMain endp

;--- Windows Exit Procedure.

WEP proc far pascal wCode:word

mov ax,1
ret
WEP endp

;--- first exported function: stores value
;--- in wVar.

Export1 proc far pascal uses ds value:word

mov ax,dgroup
mov ds,ax
mov ax,value
mov wVar,ax
ret
Export1 endp

;--- second exported function: returns value
;--- in wVar.

Export2 proc far pascal uses ds

mov ax,dgroup
mov ds,ax
mov ax,wVar
ret
Export2 endp

END LibMain

[/code]

the module-definition file:
[code]
LIBRARY

DESCRIPTION 'sample 16bit dll'

EXETYPE WINDOWS

PROTMODE

CODE DISCARDABLE
DATA DISCARDABLE SHARED

EXPORTS
WEP @1 RESIDENTNAME
Export1 @2
Export2 @3
[/code]

Use the MS 16-bit OMF linker to get the binary:

link test.obj, test.dll,,,test.def

Wildman

unread,
Sep 23, 2012, 3:35:09 PM9/23/12
to
On Sun, 23 Sep 2012 11:13:40 -0700, japheth wrote:

> Here' a sample in Masm syntax:
>
> <snip>

Thank you very much!
0 new messages