Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the board
Thread view  Mix view  Order
bencollver

Homepage

23.01.2026, 19:35
 

dev86 BCC 0.16.21 and 1.0.1 (Announce)

Simple C compiler that produces 8086 assembler for tiny/small models.

Here are Watcom hosted 16-bit and 32-bit builds of Bruce's C compiler. The 32-bit version requires HXRT to run on DOS.

https://gopher.tildeverse.org/tilde.pink/1/~bencollver/files/dos/devel/bcc/

gopher://tilde.pink/1/~bencollver/files/dos/devel/bcc/

Rugxulo

Homepage

Usono,
24.01.2026, 07:34

@ bencollver

dev86 BCC 0.16.21 and 1.0.1

Is 0.16.21 your OpenWatcom build? And 1.0.1 the self compile?

EDIT: A few years ago I did use Sed to port PSR Invaders to as86.

bencollver

Homepage

24.01.2026, 14:23

@ Rugxulo

dev86 BCC 0.16.21 and 1.0.1

> Is 0.16.21 your OpenWatcom build? And 1.0.1 the self compile?
>
> EDIT: A few years ago I did use Sed to port PSR Invaders to as86.

0.6.21 and 1.0.1 are both OpenWatcom builds. The compiler is too large to compile itself.

Two weeks ago an intrepid hacker went through great lengths to self-host BCC. Among other tactics, they had to use an ancient version of BCC and write their own libc in ASM.

https://retrocomputing.stackexchange.com/questions...s-c-compiler-fit-into-64-kib-of-16-bit-x86-code

That's fun that you ported a game to as86.

Rugxulo

Homepage

Usono,
24.01.2026, 16:23

@ bencollver

dev86 BCC 0.16.21 and 1.0.1

> 0.6.21 and 1.0.1 are both OpenWatcom builds.

Why two versions? What's the difference?

> The compiler is too large to compile itself.

I believe the old 2002 real-mode DOS version was compiled with MS C.

> Two weeks ago an intrepid hacker went through great lengths to self-host
> BCC. Among other tactics, they had to use an ancient version of BCC and
> write their own libc in ASM.

That seems to be "pts" (Peter Szabo), aka the mininasm guy.

Looks like he's trying to rebuild / bootstrap Minix 1.5 for 8086.

> That's fun that you ported a game to as86.

I also noticed recently that as86 was already installed (dated 2017) on Ubuntu 22.04.2. I know there used to be some small amount of code relying on it. (Though you can also output 16-bit .COM with GAS, I've ported to that too.)

bencollver

Homepage

24.01.2026, 16:36

@ Rugxulo

dev86 BCC 0.16.21 and 1.0.1

> > 0.6.21 and 1.0.1 are both OpenWatcom builds.
>
> Why two versions? What's the difference?

1.0.1 has a bunch of changes, some good, and others i don't trust yet. So i am keeping both copies around for now.

For example, 1.0.1 adds "out of memory checks", which are basically:

OLD: ptr = malloc(size);
NEW: ptr = malloc(size);
NEW: if (!ptr) fatalc("Out of memory");

With this change i was unable to build libc because the C preprocessor (cpp.c) sometimes calls malloc(0), which returns NULL in Watcom C. It erroneously dies with an "Out of memory" error. In this case it is harmless and it doesn't actually dereference the NULL pointer. So i changed it to skip the fatal error when the size was 0.

From the bcc(1) man page:

The bcc.c compiler driver source is very untidy.

By the way, this morning i posted a new build with two changes:

1) Fixed a potential infinite loop in bcc

2) I had missed a couple of changes in 1.0.1/src.zip, which are now included in 1.0.1/srcb.zip

Back to the board
Thread view  Mix view  Order
23172 Postings in 2182 Threads, 404 registered users (0 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum