VOGONS

Common searches


First post, by riplin

User metadata
Rank Newbie
Rank
Newbie

Hi folks,

Is anyone aware of any project(s) of getting Clang / LLVM to generate DOS 32-bit executables?

Reply 1 of 5, by mr.cat

User metadata
Rank Member
Rank
Member

Hi,

Yeah one would assume something like that exists, I mean there's llvm-mos so why not llvm-dos?

I think I have mentioned this project before:
https://github.com/jayschwa/dos.zig

It's not much, but it's something. It generates a COFF image which can then be run in DOS with some help from CWSDPMI.
(Yes I've tried the demo, seems to work fine in DOSBox).
Zig is/was originally based on llvm and it can compile C/C++ code, to the extent that it can be used as a make replacement.

There's also another option: If you can generate a win9x binary, some of those can be run in DOS via HX.
This is somewhat limited too, so it really depends on what it is you want to achieve.

Reply 2 of 5, by riplin

User metadata
Rank Newbie
Rank
Newbie

Hey, thanks for the link.

Basically I was hoping to find a clang/llvm replacement for Watcom. As much as I love Watcom, it’s missing a lot of modern comforts (auto, constexpr, lambdas, stuff like that).

I’m actually a little bit surprised that there isn’t a fork out there that adds DOS 32bit support to clang/llvm. 😀

Reply 4 of 5, by megatron-uk

User metadata
Rank Oldbie
Rank
Oldbie

Prebuilt djgpp toolchains for Linux, Windows and Mac:

https://github.com/andrewwutw/build-djgpp/releases

It's up to GCC 12.2 at the moment, so pretty recent. Not sure what more features clang/llvm will give you than that for Dos?

My collection database and technical wiki:
https://www.target-earth.net