visual-c++compilationbootloader16-bitobject-files

16-bit obj files VC++


How do I compile my VC++ project to a 16-bit flat object file for use in my bootloader I am working on?

To my understanding, an object file is technically already "flat" and the linker turns it into the destination executable format. What I want it to be able to obtain that object file and pass that and my assembly code (in obj format) through the linker to create a flat bootloader.

The guide is not very specific on where the files are located and just says that you use cl.exe, link.exe, and ml.exe (MASM).

The guide uses MASM, but I know how to output object files with NASM. My main problem is the VC++ thing.


Solution

  • The last 16-bit compiler from Microsoft was VC++ 1.52c. It's ancient, and probably not available any more. Even if it was, chances are pretty good that it wouldn't compile any recent code. Just to name a few of its most obvious shortcomings, it had no support for templates, exception handling, or namespaces at all.

    I believe most people working on things like that any more use Open Watcom (which isn't exactly up to date either, but still better than VC++ 1.52c).