Issue
For my assembly language class, we're writing DOS programs using DPMI. Unfortunately, I don't have access to a 32-bit windows machine all the time. I do have a Debian virtual machine installed on just about every computer I do use.
I've got both DOSBox and DOSEMU installed. Is there any way that I can assemble and compile the programs in Linux rather than DOS? I'm using nasm, so I don't seem to have any problems getting it assembledin DOS format. However, I'm having trouble running it through the compiler with my C code and getting a DOS executable (using either gcc or MinGW).
Is there some way to do this or am I pretty much going to have to install all the tools under DOS?
Solution
I'm not even sure if you can compile DOS applications using GCC. A long time ago there was a gcc compiler-variant called DJGPP (or something like that). I never got it working though.
The chances that you can cross-compile a GCC for DOS these days are almost zero.
I suggest you give the old Watcom Compiler a try. It's a native DOS compiler and it's DPMI implementation also works like a charm under DosBox. Interfacing with NASM compiled object files is not a problem either (I did that a couple of years)
Today the compiler has been made open source and called OpenWatcom.
http://www.openwatcom.org/index.php/Main_Page
Answered By - Nils Pipenbrinck