Hi,
On May 7, 12:23 pm, "Auric__" <not.my.r...@email.address> wrote:
> Harry Potter wrote:
> > I am looking for a freeware C compiler for 16-bit DOS that can compile
> > for 8086-Pentium processors.
16-bit target only? Or just real DOS (a la FreeDOS or MS-DOS)? I guess
you mean just DOS (MZ) target since you say 8086 to Pentium. Though
keep in mind that the Pentium was in 1993, and a lot has changed since
then. GCC / DJGPP probably has the best optimizations for semi-modern
machines. Not sure if you have real-world 8086 or Pentium computers
you're targeting or not. Not that it really matters, just saying, if
all you're targeting it 386, use 386.
> It has to be small, include an IDE,
"freeware, C, DOS, 8086 to Pentium, small, IDE":
* Turbo C 2.01: yes (but only goes to 186)
* Turbo C++ 1.01: formerly (but only goes to 286, no longer free)
* Pacific C: yes (but only goes to 486 using 16-bit target only,
mirrored on FreeDOS)
* CC386: yes (but no 16-bit targets, only 386+, Infopad isn't really
an IDE)
Not as "small" but more modern:
* OpenWatcom: yes (but no DOS IDE except their vi clone, search for
PVIDE)
* DJGPP: mostly (but no 16-bit targets, only 386+, grab RHIDE)
These latter two you've used before, so I'm not sure why you're asking
again. I know they aren't exactly slim, but you can custom install
piecemeal what parts (only) you want. See FreeDOS' iBiblio section,
esp. re: OpenWatcom (or ask for specifics once you make up your mind,
heh):
http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/devel/c/
> > graphics drivers, memory extensions (i.e. EMS/XMS/virtual RAM) and a
> > GUI/TUI and compile efficient code.
Graphics drivers? Well, does the BIOS not count? VESA? Dunno, I guess
you mean libraries. Some various ones exist, e.g. Allegro (for DJGPP
or OpenWatcom), which is also a GUI. Detlef's VESA lib for Pacific C
is still available on iBiblio.
TUI? Dunno, probably D-Flat (used by TC compiles of FD EDIT), which
was also ported to 32-bit for CC386 (Infopad). TxWin is another (C-
based) TUI that works with OpenWatcom. For DJGPP, (C++) TVision or
hacking your own via PDcurses will probably have to do.
Memory extensions could mean anything, and that's a big can of worms.
For 8086, you're only going to (barely, optionally) have EMS. XMS
needs 286, and DPMI (while it can run in 286) usually needs 386 these
days. For 386 code, your best bets are DJGPP and OpenWatcom, though
CC386 is nice and small and pretty good too.
> > I want it to work on DOSBox so I can use it on WinXP computers.
Unless your XP is the 2005 64-bit release, which I doubt, its NTVDM
should (almost always) be good enough. So you don't need
"DOSBox" (emulator), esp. since that won't work nearly as well and is
tons slower. However, I did notice some bugs (on MS' side??) with
OpenWatcom's DOS-hosted compiler, but if that bites you (doubt it),
just use the Win32-hosted cross compiler to target DOS (should be
slightly faster anyways, and HX can run its Win32 output too).
DJGPP runs fine atop WinXP but not for graphics. Ah, now I see, if you
want to do graphics stuff, you will need something like DOSBox or
(preferably if you have VT-X) VirtualBox. Anyways, XP is just not up
for DOS graphics, IMHO. (Though it's still better than Vista or 7.) Do
not try compiling stuff inside DOSBox, it's too slow for that kind of
use. Similarly for VirtualBox without VT-X enabled (which your machine
may not support, sadly).
> Where can I find one?
I know you've used some of these before, so I'm not sure what you are
looking for exactly.
You have to first sign up to give them your personal info, and IIRC,
you can't get TC++ (DOS) unless you are a purchaser of their recent C+
+ whatever for Windows. Odd and annoying but unavoidable. Anyways,
that version's C++ is very very old (AT&T 2.0), pre-standard 1998, so
it's less useful anyways. OpenWatcom has better C++ support, esp. for
16-bit targets. Oh wait, you didn't say "C++", only C, so this is
probably irrelevant (though TC++ has a very few very minor advantages
vs. older TC 2.01 for C stuff).
I'm "fairly" certain that's not legal. I wouldn't waste my time with
it.
Latest 7.51 can be gotten from FreeDOS' iBiblio mirror. Yes, it has an
IDE.