Author Topic: DOS Linker  (Read 1170 times)

Gunther

  • Member
  • *****
  • Posts: 3723
  • Forgive your enemies, but never forget their names
DOS Linker
« 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
Get your facts first, and then you can distort them.

TimoVJL

  • Member
  • ****
  • Posts: 723
Re: DOS Linker
« Reply #1 on: February 18, 2021, 01:40:21 PM »
Check Masm32\bin folder for another linker
May the source be with you

Vortex

  • Member
  • *****
  • Posts: 2583
Re: DOS Linker
« Reply #2 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

TouEnMasm

  • Member
  • *****
  • Posts: 1805
    • EditMasm
Re: DOS Linker
« Reply #3 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
Fa is a musical note to play with CL

caballero

  • Member
  • *****
  • Posts: 1616
  • Matrix - Noah
    • abre ojos ensamblador
Re: DOS Linker
« Reply #4 on: February 18, 2021, 07:19:14 PM »
alink
The logic of the error is hidden among the most unexpected lines of the program

nidud

  • Member
  • *****
  • Posts: 2213
    • https://github.com/nidud/asmc
Re: DOS Linker
« Reply #5 on: February 19, 2021, 01:00:56 AM »
I guess TLINK is 16-bit if you plan on using it in DOS.

Otherwise Watcom WLINK is free and so is JWLINK.
I use LINKW (fork of JWLINK) for DOS and 32/64-bit.


# MAKEFILE--
# Makefile for Doszip
#
dz.exe:
    asmc -mz -Fo dz.exe -q -Iinc src\dz.asm
    iddc -ml -r src\res\*.idd
    asmc -Iinc -D__DZ__ src\dz\*.asm
    linkw system dos name dz.dos lib lib\cl.lib file lib\c0l.obj, *.obj
    del *.obj

Gunther

  • Member
  • *****
  • Posts: 3723
  • Forgive your enemies, but never forget their names
Re: DOS Linker
« Reply #6 on: February 19, 2021, 02:14:21 AM »
Thank you all for the valuable hints.

Check Masm32\bin folder for another linker
Timo, I didn't know that. One is never stop learning.

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
Get your facts first, and then you can distort them.

Vortex

  • Member
  • *****
  • Posts: 2583
Re: DOS Linker
« Reply #7 on: February 19, 2021, 02:19:20 AM »
Hi Gunther,

Quote
There 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

Gunther

  • Member
  • *****
  • Posts: 3723
  • Forgive your enemies, but never forget their names
Re: DOS Linker
« Reply #8 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
Get your facts first, and then you can distort them.

Vortex

  • Member
  • *****
  • Posts: 2583
Re: DOS Linker
« Reply #9 on: February 20, 2021, 07:26:39 AM »
Hi Gunther,

The author 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 :

Code: [Select]
\masm32\bin\ml /c HelloWorld.asm
\dm\bin\link -ENTRY:_start -SU:WINDOWS -FIXE HelloWorld.obj,HelloWorld.exe

Gunther

  • Member
  • *****
  • Posts: 3723
  • Forgive your enemies, but never forget their names
Re: DOS Linker
« Reply #10 on: February 20, 2021, 08:00:59 AM »
Thank you Erol for the exampel.

Gunther
Get your facts first, and then you can distort them.