pouët.net

Go to bottom

Compile and link a C program for DOS in Windows

category: code [glöplog]
 
Can I use Watcom C and target it for 16-bit DOS-executable?

I would like to write some example code in a Windows text-editor and compile & link to a DOS executable file, before I run the program in DosBox.

The executable should be a DOS-program, but the compilation and linking process should happen in Windows. I used to compile and link inside Dosbox, but I do not want that anymore. I prefer using Watcom C or Turbo C. I can use any of those two.
added on the 2019-01-17 07:00:20 by rudi rudi
O think Open Watcom can run under Windows and output 16-bit DOS executables.
Never tried that BTW. THe last time I compiled a 16 bit program was probably in 1995.
added on the 2019-01-17 07:16:14 by friol friol
Yes, you can. I used openwatcom in my "SolVBE" project (VBE for windows command prompt, basically)
added on the 2019-01-17 08:41:54 by sol_hsa sol_hsa
ok. thanks
added on the 2019-01-18 05:45:50 by rudi rudi
My current (retro) Watcom code-flow is rather bound to DOSBOX installation (setup_1), virtual machine with windows 98 and console access to dos to run it as if it was pure dos and PCem with pure DOS 6.22 installed on it and various configs to test potential real hardware.

All work fine with both 10.6/11 and Open Watcom installations
added on the 2019-02-17 22:08:08 by hollowone hollowone
I've been using Open Watcom in Linux and Windows, with the Watcom make contraption, so that a "run" target runs the built demo. It's much faster this way than having the Watcom DOS compiler running in Dosbox.
added on the 2019-02-17 22:57:26 by yzi yzi
Not sure if I'm following. I understand that you have Open Watcom installed on Windows and build DOS apps on Windows. "run" target runs the built demo means that you compile them both to be windows apps and dos apps so you can test them without switching the OS/runtime environment?
added on the 2019-02-18 14:45:17 by hollowone hollowone
using Allegro's last dos version is usually the easiest.
added on the 2019-02-18 16:03:51 by visy visy
hollowone: the "run" target naturally launches the emulator, and it has a file named "demo.exe" as its dependency. demo.exe is a DOS executable, but for make it is just a file on disk. In Linux it works exactly the same.
added on the 2019-02-18 22:11:01 by yzi yzi
I use dosbox/openwatcom like hollow, works fine as long as your machine is fast enough :)
added on the 2019-02-21 15:43:39 by superplek superplek

login

Go to top