C/C++ Compiler for 16 Bit DOS

Compaq ?
December 6, 2009 at 17:00:18
Specs: Windows 98, ?
Is there a C++ compiler (a free one) that is available for a 16-bit MS-DOS computer? It also needs to be one thats under 1.44 Mb so that it can be put on a floppy disk.

See More: C/C++ Compiler for 16 Bit DOS

Report •


#1
December 7, 2009 at 02:15:32
The compiler from Borland Turbo c++ 1.01 is under 500K but you'll need to figure out which includes you need. The linker is 54K.


=====================================
Helping others achieve escape felicity

M2


Report •

#2
December 7, 2009 at 13:31:51
Thanks. But I think I've heard somewhere that Turbo C++ isn't genuine C++, but like a generic or prototype with some different commands. Is this true? The includes I need are:
conio
stdio
iostream
string
sstream
direct
fstream
stdlib

Are those included in Turbo C++?


Report •

#3
December 7, 2009 at 19:25:35
Turbo C++  Version 1.01 Copyright (c) 1990 Borland International
Syntax is: TCC [ options ] file[s]     * = default; -x- = turn switch x off
  -1      80186/286 Instructions    -2      80286 Protected Mode Inst.
  -Ax     Disable extensions        -B      Compile via assembly
  -C      Allow nested comments     -Dxxx   Define macro
  -Exxx   Alternate Assembler name  -G      Generate for speed
  -Ixxx   Include files directory   -K      Default char is unsigned
  -Lxxx   Libraries directory       -M      Generate link map
  -N      Check stack overflow      -O      Optimize jumps
  -P      Force C++ compile         -Qxxx   Memory usage control
  -S      Produce assembly output   -Txxx   Set assembler option
  -Uxxx   Undefine macro            -Vx     Virtual table control
  -X      Suppress autodep. output  -Yx     Overlay control
  -Z      Optimize register usage   -a      Generate word alignment
  -b    * Treat enums as integers   -c      Compile only
  -d      Merge duplicate strings   -exxx   Executable file name
  -fxx    Floating point options    -gN     Stop after N warnings
  -iN     Max. identifier length    -jN     Stop after N errors
  -k      Standard stack frame      -lx     Set linker option
  -mx     Set Memory Model          -nxxx   Output file directory
  -oxxx   Object file name          -p      Pascal calls
  -r    * Register variables        -u    * Underscores on externs
  -v      Source level debugging    -wxxx   Warning control
  -y      Produce line number info  -zxxx   Set segment names


=====================================
Helping others achieve escape felicity

M2


Report •

Related Solutions

#4
December 7, 2009 at 21:41:39
I know it's not really what your after, but it's possible to cross compile dos executables (multiple types - including 16bit) in windows using open watcom.


Batch Variable how to


Report •

#5
December 7, 2009 at 22:59:16
Hi Judago,

Yeah, Watcom might be a tasty choice. Not so sure about getting it on a floppy.


=====================================
Helping others achieve escape felicity

M2


Report •

#6
December 8, 2009 at 00:49:44
Hi M2,

Yeah I doubt it would fit on a floppy, but it's hard to tell, although I believe the windows installer still contains a dos compatible compiler and linker, open watcom doesn't seem to have a dos version. I have no idea how licensing goes for the old commercial versions.

I was thinking that perhaps it was simply to make a utility for a boot disk or something where cross compiling could be an option. Sometimes it's nice to have a modern ide, even if it lacks a little polish. It's also often indispensable to have a usable internet connection while programming.


Batch Variable how to


Report •

#7
December 8, 2009 at 02:14:09
"Is there a C++ compiler (a free one) that is available for a 16-bit MS-DOS computer?"

Dunno if the means a 286 or a pre w9x.


=====================================
Helping others achieve escape felicity

M2


Report •

#8
December 8, 2009 at 03:08:41
By the way, the headers conio and direct are not "genuine C++".

Report •

#9
December 9, 2009 at 06:12:41
Hi Mechanix2Go,

It needs to be able to run on Win 3.1x or just plain MS-DOS

"By the way, the headers conio and direct are not "genuine C++"."

I figured as much, because conio.h is deprecated and direct.h isn't always included in some of the compilers I've used.


Report •


Ask Question