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.
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.
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.
Never tried that BTW. THe last time I compiled a 16 bit program was probably in 1995.
Yes, you can. I used openwatcom in my "SolVBE" project (VBE for windows command prompt, basically)
ok. thanks
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
All work fine with both 10.6/11 and Open Watcom installations
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.
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?
using Allegro's last dos version is usually the easiest.
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.
I use dosbox/openwatcom like hollow, works fine as long as your machine is fast enough :)