Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

A Good C Compiler Wanted!

156 views
Skip to first unread message

Harry Potter

unread,
May 7, 2012, 9:03:17 AM5/7/12
to
I am looking for a freeware C compiler for 16-bit DOS that can compile for 8086-Pentium processors. It has to be small, include an IDE, graphics drivers, memory extensions (i.e. EMS/XMS/virtual RAM) and a GUI/TUI and compile efficient code. I want it to work on DOSBox so I can use it on WinXP computers. Where can I find one?
--
Joseph Rose, a.k.a. Harry Potter
Working magic in the computer community.

Henk Siewert

unread,
May 7, 2012, 9:16:39 AM5/7/12
to
Hi Harry,

Why ask us?
Use your magic stick!

Greetings,
Henk Siewert

"Harry Potter" <rose.j...@yahoo.com> schreef in bericht
news:23936268.2895.1336395797110.JavaMail.geo-discussion-forums@vbx14...

Auric__

unread,
May 7, 2012, 1:23:18 PM5/7/12
to
Harry Potter wrote:

> I am looking for a freeware C compiler for 16-bit DOS that can compile
> for 8086-Pentium processors. It has to be small, include an IDE,
> graphics drivers, memory extensions (i.e. EMS/XMS/virtual RAM) and a
> GUI/TUI and compile efficient code. I want it to work on DOSBox so I
> can use it on WinXP computers. Where can I find one?

DJGPP, DOS port of GCC:
http://www.delorie.com/djgpp/
If you've never used DJGPP before, use the zip picker:
http://www.delorie.com/djgpp/zip-picker.html
For the question "Which operating system will you be using?" be sure to tell
it you're using DOS or you'll get Windows-specific files. Also, that page
says you don't need gdb if you have RHIDE, but IMO gdb is worth grabbing
either way.

A few old Borland compilers, including Turbo C and Turbo C++, are freely
available, and might work for you:
http://edn.embarcadero.com/museum/antiquesoftware
Turbo C++ 3.0 can be found here (watch the wordwrap):
http://www.bestfreewaredownload.com/freeware/t-free-turbo-c--freeware-
flggsdpz.html

Alternately, cc386 (not as good as either of the above, no DOS IDE, but
works):
http://ladsoft.tripod.com/cc386.htm

...or perhaps Pacific C (but I don't know if it has everything you need):
http://www.programmersheaven.com/download/30088/download.aspx
(no longer available from original author)

--
Let the lawyers out of their cages.

Sjouke Burry

unread,
May 7, 2012, 3:24:55 PM5/7/12
to
Harry Potter <rose.j...@yahoo.com> wrote in
news:23936268.2895.1336395797110.JavaMail.geo-discussion-forums@vbx14:
I have been using the WATCOM compiler for ages, and right now
you can get it for free.(google)
16 bit and 32 bit, c, c++ and fortran, all in one.

Rugxulo

unread,
May 7, 2012, 7:03:12 PM5/7/12
to
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.

> A few old Borland compilers, including Turbo C and Turbo C++, are freely
> available, and might work for you:
>  http://edn.embarcadero.com/museum/antiquesoftware

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).

> Turbo C++ 3.0 can be found here (watch the wordwrap):
>  http://www.bestfreewaredownload.com/freeware/t-free-turbo-c--freeware-
> flggsdpz.html

I'm "fairly" certain that's not legal. I wouldn't waste my time with
it.

> ...or perhaps Pacific C (but I don't know if it has everything you need):
>  http://www.programmersheaven.com/download/30088/download.aspx
> (no longer available from original author)

Latest 7.51 can be gotten from FreeDOS' iBiblio mirror. Yes, it has an
IDE.

Fritz Wuehler

unread,
May 7, 2012, 9:11:20 PM5/7/12
to
openwatcom? digitalmars.com?

if not, bit torrent is your friend

Auric__

unread,
May 7, 2012, 9:25:51 PM5/7/12
to
Rugxulo wrote:

> On May 7, 12:23 pm, "Auric__" <not.my.r...@email.address> wrote:
[snip]
>> Turbo C++ 3.0 can be found here (watch the wordwrap):
>>  http://www.bestfreewaredownload.com/freeware/t-free-turbo-c--freeware-
>> flggsdpz.html
>
> I'm "fairly" certain that's not legal. I wouldn't waste my time with
> it.

Really? Damn. I was trying to only post legal solutions. (That site doesn't
*seem* to be the "old = abandoned = free" type...)

--
/me does some more nothing.

Harry Potter

unread,
May 8, 2012, 9:11:50 AM5/8/12
to
On Monday, May 7, 2012 1:23:18 PM UTC-4, Auric__ wrote:
> DJGPP, DOS port of GCC:
> http://www.delorie.com/djgpp/
I tried DJGPP before. I really want it again. However, it is quite large and I don't currently have high-sd inene access, and I want something small and fo real-mode DOS.

> A few old Borland compilers, including Turbo C and Turbo C++, are freely
> available, and might work for you:
> http://edn.embarcadero.com/museum/antiquesoftware

I have them. They're good enough for now, but I want to upgrade to 386+.

> Turbo C++ 3.0 can be found here (watch the wordwrap):
> http://www.bestfreewaredownload.com/freeware/t-free-turbo-c--freeware-
> flggsdpz.html
>

Didn't find the DOS vesion. :(
> Alternately, cc386 (not as good as either of the above, no DOS IDE, but
> works):
> http://ladsoft.tripod.com/cc386.htm
>
I just looked there. I don't mind the lack of an IDE or useful debugging support, but I want a 16-bit C compiler.

> ...or perhaps Pacific C (but I don't know if it has everything you need):
> http://www.programmersheaven.com/download/30088/download.aspx
> (no longer available from original author)
>
I have that, too, but I have had problems with optimizations. It's still useful, though.

BTW, I'm looking for TSR and device driver support. I was working on file compression, but it didn't work out. Maybe in the futureI'm also looking for a compiler that doesn't have to be installed, for I need to transport it to systems on which I'm no allowed to install anything. Not only that, but I have a DOS-based laptop with which I want to play/work/make useful.
--
Joseph Rose, a.k.a. Harry Potter
Woking magic in the computer community

Rugxulo

unread,
May 8, 2012, 12:46:29 PM5/8/12
to
Hi,

On May 8, 8:11 am, Harry Potter <rose.josep...@yahoo.com> wrote:
> On Monday, May 7, 2012 1:23:18 PM UTC-4, Auric__ wrote:
>
> > A few old Borland compilers, including Turbo C and Turbo C++, are freely
> > available, and might work for you:
>
> I have them.  They're good enough for now, but I want to upgrade to 386+.

Well, the only freeware (AFAIK) real mode 16-bit target C compiler
with optional 386+ instructions is OpenWatcom. It has a good debugger.

> BTW, I'm looking for TSR and device driver support.

Not sure how much support for that you will find in C compilers.
Probably easier (believe it or not) to just do it in assembly. Use
FASM, it has a very nice DOS IDE.

http://flatassembler.net/download.php

> I was working
> on file compression, but it didn't work out.  Maybe in the future I'm
> also looking for a compiler that doesn't have to be installed, for I
> need to transport it to systems on which I'm no allowed to install
> anything.  Not only that, but I have a DOS-based laptop with which
> I want to play/work/make useful.

A while back I made floppy-sized .7z files for OpenWatcom (16-bit DOS
target only). You still need 386+ to host the compiler itself, but
it's small and needs no install.

http://sites.google.com/site/rugxulo/ow13-286.7z?attredirects=0

http://sites.google.com/site/rugxulo/ow17a286.7z?attredirects=0

This was of limited use and just for completeness, so I never updated
it further. Though I did package up the "full" (45 MB) DOS-only suite
for OW 1.9 in .7z form (7 MB packed). It also doesn't need to be
installed, but of course it includes all 386 stuff, extenders, help
files, libraries, C and C++, etc. So it might be overkill for you. But
the point is it's the "full" DOS part of OpenWatcom.

http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/devel/c/openwatcom/1.9/open-watcom-c-dos-1.9.7z

Harry Potter

unread,
May 9, 2012, 9:00:34 AM5/9/12
to
On Tuesday, May 8, 2012 12:46:29 PM UTC-4, Rugxulo wrote:
> Hi,
>
> Well, the only freeware (AFAIK) real mode 16-bit target C compiler
> with optional 386+ instructions is OpenWatcom. It has a good debugger.
>

I have that, but I didn't know it could be used without full installation.

> Not sure how much support for that you will find in C compilers.
> Probably easier (believe it or not) to just do it in assembly. Use
> FASM, it has a very nice DOS IDE.
>
> http://flatassembler.net/download.php
>
Thank you. I will look at it at my aliest convenience.

> A while back I made floppy-sized .7z files for OpenWatcom (16-bit DOS
> target only). You still need 386+ to host the compiler itself, but
> it's small and needs no install.
>
> http://sites.google.com/site/rugxulo/ow13-286.7z?attredirects=0
>
> http://sites.google.com/site/rugxulo/ow17a286.7z?attredirects=0
>

Those should be useful. Again, thanks.

0 new messages