kerravon

Ligao, Free World North, 22.05.2026, 11:14 |
public domain C compiler for i386 (Developers) |
Robert Pengelly has written a C compiler for the 80386
and released the code to the public domain. It's available here:
git clone https://git.candlhat.org/scc.git
It is written in C.
It is called both xcc and scc
xcc.exe as a Windows executable (308k) can be obtained from the
PDOS/386 disk at https://pdos.org/pdos.zip
(mount the vhd on Windows)
The makefile I use is \devel\pdos\pdpclib\makefile.xcc
pdmake -f makefile.xcc
read makefile.xcc to see the prereq
I also have a makefile.xcp for a static Windows executable (doesn't
use msvcrt.dll)
All this means that you can do Win32 development using only public
domain tools. The entire toolchain is public domain with C90 source code.
I consider Win32 to be a valid "DOS" format, using the HX extender,
and I leave it at that. But other "DOS" formats can likely be supported,
but you'll presumably need to do some work to get a suitable C library.
Note that xcc is having issues at the moment running on PDOS/386 itself.
That needs to be debugged in due course. (this is hot off the press)
I haven't tried running under DOS + HX yet either.
I don't know what the limits of the compiler are. It may be fully C90
compliant. It accepted all of my C90 code in PDPCLIB.
The compiler is 43,000 lines of code. 16 C files in a single directory.
No subdirectories.
It would be good if people could help lock down this compiler while we
still have an author willing to fix bugs for free.
BFN. Paul. |
Rugxulo

Usono, 31.05.2026, 17:29
@ kerravon
|
public domain C compiler for i386 |
> Robert Pengelly has written a C compiler for the 80386
> and released the code to the public domain. It's available here:
>
> git clone https://git.candlhat.org/scc.git
>
> xcc.exe as a Windows executable (308k) can be obtained from the
> PDOS/386 disk at https://pdos.org/pdos.zip
>
> I also have a makefile.xcp for a static Windows executable (doesn't
> use msvcrt.dll)
>
> but you'll presumably need to do some work to get a suitable C library.
>
> Note that xcc is having issues at the moment running on PDOS/386 itself.
> I haven't tried running under DOS + HX yet either.
>
> It would be good if people could help lock down this compiler while we
> still have an author willing to fix bugs for free.
I'm not sure how to test it.
PDOS/386 supposedly doesn't work as host yet. HX hasn't been tested. Dunno if just using TinyC headers and libs would work (or OpenWatcom or MinGW or whatever).
If anyone finds out, please tell us.
(I have only lightly played with SubC and PicoC in DOS recently. Those are subsets, but I also have fuller C compilers like DJGPP and OpenWatcom and SmallerC that I sometimes use.) |
kerravon

Ligao, Free World North, 02.06.2026, 06:28
@ Rugxulo
|
public domain C compiler for i386 |
> I'm not sure how to test it.
>
> PDOS/386 supposedly doesn't work as host yet. HX hasn't been tested. Dunno
> if just using TinyC headers and libs would work (or OpenWatcom or MinGW or
> whatever).
>
> If anyone finds out, please tell us.
You don't have Windows or Linux?
Anyway, I have now tested under HX, and because I need a large stack, I am hitting this apparent HX bug/limitation:
https://github.com/Baron-von-Riedesel/HX/issues/65
so that's ruled out for now.
xcc could potentially be part of making HX self-hosting. jwasm could potentially be compiled with xcc. |
kerravon

Ligao, Free World North, 02.06.2026, 20:25
@ kerravon
|
public domain C compiler for i386 |
> Anyway, I have now tested under HX, and because I need a large stack, I am
> hitting this apparent HX bug/limitation:
>
> https://github.com/Baron-von-Riedesel/HX/issues/65
Japheth provided a quick update on this, which led me to
the conclusion that my executables were malformed, so I
fixed that and retested HX. The next main problem was
that sasm reports memory full so I need to investigate
that next. |
kerravon

Ligao, Free World North, 03.06.2026, 23:01
@ kerravon
|
public domain C compiler for i386 |
> fixed that and retested HX. The next main problem was
> that sasm reports memory full so I need to investigate
> that next.
That was due to me using the default memory which wasn't
enough for how sasm/pdpclib allocates memory (no heap).
I bumped it up to 512 MiB and sasm worked.
There was another problem with temp files and the 8.3
restriction in MSDOS 4, so I made a change to xcc and
I also created a makefile.xhx which has more minimal
activity and ... HX WORKS!
P.S. And that is available at pdos.org |