This distribution is based on an unofficial release
of subc. It was produced by copying targets\cg\cg386.c
to cg.c, ditto .h. Also this was copied:
targets\windows-386\sys-windows-386.h sys.h
This is to target Windows by default. Symbolic links
were dropped.

To build a subc for eventual use with PDOS,
do the following ...

If you already have sccwin.exe, you can do:
cd src
pdmake -f makefile.std

If you only have gccwin.exe, you can do:
pdmake -f makefile.w32

(the executable produced is dependent on msvcrt.dll)

There are other makefiles for other combinations.

There is an example batch file as well:
doit
(you need to rename scc.exe to sccwin.exe to use it)

If you want to do Windows calls, you can try:
doitw

Note that the preprocessor is provided by pdcc
which comes with PDOS, as does pdmake.

Also note that you can switch from 80386 to 8086 by
copying targets/cg/cg8086.c to cg.c (and same with .h)
and rerunning pdmake. No need to bother with
targets\dos-8086\sys-dos-8086.h because I don't use
the compiler directly like that, I always run from
a makefile. Then in "s86" you run
pdmake -f makefile.w32 and have s86.exe (assembler),
sld.exe (linker) and sar.exe (archiver).

MSDOS is now supported with the aid of PDPCLIB.
pdmake -f makefile.wcd
in both "src" and s86 will produce 4 MSDOS executables.
You can build the library under MSDOS by making an
"include" directory under "src\lib" and also copying
the MSDOS cg.h into the "src\lib" directory and
running docomp.bat (which was derived from makefile.sub)
 
The following changes need to be made to the generated
assembler to be acceptable to MASM (hopefully subc can
be updated to produce compatible assembler):

C:\devel\subc\src>diff -w world.s world.asm
2a3
>         extrn   _printf: proc
7,8c8
< L2:
< 	db	'h'
---
> L2	db	'h'

Note that what I really want is huge memory model, which
should also solve the problem with s86 currently being too
big (more than 64k of code) to self-compile under MSDOS.


Also note that you can switch from 80386 to x64 by
copying targets\cg\cgx86-64-darwin.c to cg.c and
targets\cg\cgx86-64.h to cg.h
and rerunning pdmake.

Ditto switch to 32-bit ARM by
copying targets\cg\cgarmv6.c to cg.c and
targets\cg\cgarmv6.h to cg.h
and rerunning pdmake.

Also note that you can build this version of SubC with an
older version of SubC that supports struct but doesn't use
them, by running bootstr.bat


Also note that I have incorporated most of the changes from
Alexandre Bencz (which were made against the "book" version)
into this version (with necessary additions/changes for this
more modern version). So S/390 HLASM is now an available target.
His changes, like mine, remain public domain, so this product
remains purely public domain.
