• Please review our updated Terms and Rules here

Open Watcom users?

mbbrutman

Associate Cat Herder
Staff member
Joined
May 3, 2003
Messages
6,420
Are there any Open Watcom users out there?

I've been a Turbo C++ 3.0 for DOS fan for years, but I'm starting to branch out to see what else is available. The OW compiler has a good reputation and the FreeDOS developers are using it quite a bit, so it can't be too bad. It looks very comprehensive.

I installed version 1.8 on my 386-40 last night. It's big .. a fairly minimal install for DOS 16 bit apps took over 50MB. If it takes a while to run too this might force me to upgrade to a higher end 486 or Pentium box for real work. But I'm hoping that it optimizes code better than Turbo C++ does, and thus is worth the effort.


Mike
 
I tried to use it, and it has very non-standard syntax for a compiler. Worth noting, can't say much more about it.
 
I use Open Watcom quite a bit, actually, for both work and hobby programming. Open Watcom was known for its spectacular optimization abilities back in the day, so I would guess it would do considerably better than Borland's compilers. I believe the earlier Watcom compiler versions were used in compiling some famous games.

I prefer using Open Watcom over most other compilers for compiling DOS and Windows software for a couple of reasons. First, its cross-compiling features are well supported and functional. When writing 16-bit DOS software, I can work from a Windows or GNU/Linux box with modern utilities and make systems, compile for 16-bit DOS targeting a lowly 8088 CPU, and not have to muck about with outdated, unsupported, obsolete Borland compilers. Second, I don't know of many other truly free (as in freedom) compilers that can target DOS still and feature modern syntax and toolsets. Third, community support is still quite good. Any questions or bugs related to the DOS or OS/2 compilers are given the same importance as the Windows or GNU/Linux targets.

As an example, somebody recently reported a bug where log10() failed for 32-bit DOS with floating point emulation enabled. This target is obviously not what you would call a common one. However, the Open Watcom contributors worked the problem, found the issue related to a bug in a floating point library that only manifested itself under highly specific conditions, and commited a fix, all within two days of the bug report.

The IDE that is provided with Open Watcom for Windows and OS/2 is quite dated but functional. However, if you're shooting for that early 1990s feel for a Windows development environment, you'll be right at home ;).
 
Ah, thank you .. that was the kind of feedback I was looking for.

I have quite a bit of time invested in Turbo C++ 3.0, so I'm not looking forward to porting my code. On the other hand, I'm disappointed at how bad the code gen is on that compiler. There is not question that Watcom will do better, but I do need to get over the learning curve.

I got hello world compiled using the command line compiler and linker. The first step is the most important. ;-0


Mike
 
Mind sharing the syntax for doing that? I was trying to use Open Watcom and had immense trouble even getting hello world compiled.. I expected the "compilername source.file -o output.file" syntax, and it didn't seem to take kindly to that. I've been using mingw as a stopgap so I could continue to learn C until I sorted that problem out. I chose Open Watcom for the same reasons above - it's the only one that actively supports DOS as a target.
 
How is the debugger in the Watcom compiler? Can you open watch windows to monitor variables or trace into functions that are called by the program? I don't have a great deal of experience in using different compilers, but crappy debuggers are a pet peeve of mine. One I was quite fond of was IBM's Visual Age C++ development system. Some others may disagree on that.

Chuck
 
wcc /? is your friend for getting the right arguments, options or flags as they are called in DOS and CP/M
Their Wiki is like all Wiki's, a total mess! But wcc hello.c works.
 
How is the debugger in the Watcom compiler? Can you open watch windows to monitor variables or trace into functions that are called by the program?

I only have experience using the Open Watcom windowed debugger. I believe there is a command line one, but I've never had a need. The windowed debugger is like their editor and IDE, ugly but functional. It provides all the functions you mentioned above (watch variables, tracing), but I'm guessing there are missing features. I find it to be useful enough. As for cross-debugging, like debugging a 16-bit DOS program on Windows, I have no idea how that would work if it does at all.
 
wcc /? is your friend for getting the right arguments, options or flags as they are called in DOS and CP/M
Their Wiki is like all Wiki's, a total mess! But wcc hello.c works.

Also, the documentation set delivered with Open Watcom is wonderful. You won't need to rely on the wiki for most things. The compiler, all the tools, and the C/C++ language are documented quite well in the included help files.
 
Any advice on DOS extenders to go with Open Watcom?

Any advice on DOS extenders to go with Open Watcom?

So what DOS Extender would you folks recommend when developing 32 bit DOS applications with Open Watcom?

I know of DOS/32A, which has the advantage of being an ABI compatible drop-in replacement for DOS/4GW, which was originally bundled with the Watcom C compiler back in the day.

And then there's the HX DOS-Extender, which is not only compatible with Open Watcom C++, but is also capable of running Windows Portable Executable binaries, even going as far as offering a subset of the Win32 API to host them, so that many (non-GUI, command line only) Win32 EXEs can be run from (pure) DOS.

Any other DOS extenders that are worth mentioning?
 
So what DOS Extender would you folks recommend when developing 32 bit DOS applications with Open Watcom?

I know of DOS/32A, which has the advantage of being an ABI compatible drop-in replacement for DOS/4GW, which was originally bundled with the Watcom C compiler back in the day.

I believe Open Watcom continues to ship with both of the above. Somebody with 32-bit DOS experience would be able to provide a better answer, though.
 
I believe Open Watcom continues to ship with both of the above. Somebody with 32-bit DOS experience would be able to provide a better answer, though.

You're right. A royalty-free version of DOS/4GW is apparently bundled with Open Watcom:

http://www.openwatcom.org/index.php/Detailed_Contents

Wow... So Open Watcom pretty much seems the way to go for DOS development, especially when developing 32 bit software...

But again, does anybody here have any experience with actually developing 32-bit DOS software using any of these (or other) DOS extenders? Is it simply a matter of "just pick one, and compile"?
 
So far so good .. after about three hours of work and debug I can reliable send and receive Ethernet packets using code compiled with Open Watcom.

This isn't a major surprise - the WATTCP apps all do this. But I am fairly happy that with a minimal amount of time I was able to port my code over and get it running. (Apparently I've learned something over the last five years.) It wasn't a recompile, but it wasn't a big effort to modify the code either.

Next up is to get netcat ported and tuned, and to see what kind of code generation I am getting. This is going to take a while, but I think it is worth doing - I'm very impressed with the documentation and the features of OW so far.
 
DOS32/A and Japheth's HX-series of extenders are the only ones actively maintained. For classical DOS32 support DOS32/A is probably the best choice, but if you need advanced features - crazy things even - check out Japheth's stuff. That man's a genius.
 
Back
Top