doslib-20161126-100319-commit-6089c747b7ab40f99459e731d1bec60f465d7dad
OMF parsing and dumping. In library form, for use in other future code projects. Reading OMF, so far. Writing OMF comes soon. In this way, I can begin hacking OMF and writing my own tools to work alongside Open Watcom in this project that link together into a final program.
Experimental OMF patching tool to work around Watcom C segdef fixups for making flat .COM executables, and with that, a new "dos86t" target that compiles to .COM instead of executable. Code compiled to .COM at this time is NOT yet fully stable because there are still cases (near-to-far pointer conversion for example) where segment fixups are generated, and Watcom's linker ignores them for .COM targets, leading to code that crashes at runtime because the segment portion is invalid. The OMF patcher attempts to apply segment fixups by replacing the x86 opcodes loading a segment reference with one loading from CS instead. This tool is experimental at this time, which is why the compile stages do not yet use it.