问题
I'm trying to make a small utility for an old i286 machine running PC-DOS and the target format a plain COM executable.
The compiler choice has been Open Watcom and, on the documentation it says it can link DOS .COM files but documentation is either ambiguous or doesn't work as the examples show, so I end up with either a .EXE file (with MZ header) or multiple linker/compiler errors.
So, How can I make a .COM executable with Open Watcom compiler?
回答1:
The system com
option is probably invalid since it is not mentioned in the OpenWatcom manual.
According to the documentation, you should be able to get COM executable using format dos com
option for wlink
(at least this is what I am successfully using).
回答2:
I'm using the wcl
front end for compiling and linking and the memory model tiny instead of small to get a COM file.
来源:https://stackoverflow.com/questions/46408334/com-executables-with-open-watcom