The MASM Forum

Miscellaneous => 16 bit DOS Programming => Topic started by: Gunther on February 18, 2021, 12:23:21 PM

Title: DOS Linker
Post by: Gunther on February 18, 2021, 12:23:21 PM
Does anyone know of a free, powerful DOS linker? I only have the old TLINK from Borland, which I got when I bought a license of TASM 4.0. But TLINK has quirks.

Gunther
Title: Re: DOS Linker
Post by: TimoVJL on February 18, 2021, 01:40:21 PM
Check Masm32\bin folder for another linker
Title: Re: DOS Linker
Post by: Vortex on February 18, 2021, 04:21:14 PM
Hi Gunther,

Timo is right, it's the old 16-bit MS linker, \masm32\bin\link16.exe

Another alternative is Digital Mars' optlink :

https://www.digitalmars.com/ctg/optlink.html

https://www.digitalmars.com/download/freecompiler.html
Title: Re: DOS Linker
Post by: TouEnMasm on February 18, 2021, 07:09:32 PM
I am not a user of DOS programs but it seems that JWASM solve the problem compiling in format MZ.
Then he use the normal and actual linker.https://baron-von-riedesel.github.io/JWasm/Html/Manual.html#OUTPUTFORMATPE (https://baron-von-riedesel.github.io/JWasm/Html/Manual.html#OUTPUTFORMATPE)
Title: Re: DOS Linker
Post by: avcaballero on February 18, 2021, 07:19:14 PM
alink
Title: Re: DOS Linker
Post by: nidud on February 19, 2021, 01:00:56 AM
deleted
Title: Re: DOS Linker
Post by: Gunther on February 19, 2021, 02:14:21 AM
Thank you all for the valuable hints.

Quote from: TimoVJL on February 18, 2021, 01:40:21 PM
Check Masm32\bin folder for another linker
Timo, I didn't know that. One is never stop learning.

Quote from: Vortex on February 18, 2021, 04:21:14 PM
Another alternative is Digital Mars' optlink :

https://www.digitalmars.com/ctg/optlink.html

https://www.digitalmars.com/download/freecompiler.html
Erol, is it free?

Gunther
Title: Re: DOS Linker
Post by: Vortex on February 19, 2021, 02:19:20 AM
Hi Gunther,

QuoteThere are several free downloads available for the Digital Mars C/C++ compiler. Please, read the following license agreement. If you agree click this

https://www.digitalmars.com/download/dmcpp.html
Title: Re: DOS Linker
Post by: Gunther on February 19, 2021, 05:19:36 AM
Erol,

fine. That clears my question. Do you have experience with it? People used to say miraculous things about Digital Mars.

Gunther
Title: Re: DOS Linker
Post by: Vortex on February 20, 2021, 07:26:39 AM
Hi Gunther,

The author (https://en.wikipedia.org/wiki/Walter_Bright) of the DM toolset is a very talented coder.

In the past, I used the Digital Mars C\C++ compiler but it lacks the MS COFF support. It produces only OMF modules. The DM linker can process only the same type of object files - OMF format.

Here is quick example linking a Masm object file with the DM linker :

\masm32\bin\ml /c HelloWorld.asm
\dm\bin\link -ENTRY:_start -SU:WINDOWS -FIXE HelloWorld.obj,HelloWorld.exe
Title: Re: DOS Linker
Post by: Gunther on February 20, 2021, 08:00:59 AM
Thank you Erol for the exampel.

Gunther