COM executables with Open Watcom

会有一股神秘感。 提交于 2020-08-07 09:43:35

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!