muta...@gmail.com
2021-04-02 13:19:56 UTC
I think I should provide a C90 library (using the osfunc()
generic OS interface) and PDOS-generic (using the osfunc()
generic BIOS interface) for every CPU listed in GCC 3.2.3.
PDOS-generic is most likely to be an ELF module for
each of those platforms, built using binutils.
Then provide a bios.c that runs under some existing
C compiler/runtime and just uses a 1 GiB or 2 GiB
flat file containing a FAT-16 file system.
Noting that bios.c can be replaced by pretty much
anything as an independent exercise.
Using that approach, and switching from GCC to
Smaller C, I could have bios.c as a fairly normal
MSDOS application (MSDOS doesn't know the
difference, anyway), and PDOS-generic is also
Smaller C, and has to exist within 640k (all that
bios.c can get from MSDOS) and from there it
starts loading ELF modules, that all outwardly
appear to be 8086 modules (internally they can
be Smaller C, that is undetectable).
Because I can write everything in Smaller C, I no
longer have difficulty finding a C compiler that
supports 8086. Other people can take their
chances whether Watcom C allows them to write
commercial programs or not, or try to get GCC
IA16 to do so.
Obviously I would run under Freedos instead of
MSDOS. It's a bit rude having two operating
systems running, but Freedos can probably be
loaded high. Since applications will be required
to use the osfunc() interface instead of INT 21H,
they will not have to double-up with a large C
runtime library, although there will be one C
runtime library for bios.c (which could be a
normal PDPCLIB, using INT 21H) and one provided
by PDOS-generic (which does all the FAT-16
handling itself). This would be the situation for all
the GCC targets too, at least initially.
BFN. Paul.
generic OS interface) and PDOS-generic (using the osfunc()
generic BIOS interface) for every CPU listed in GCC 3.2.3.
PDOS-generic is most likely to be an ELF module for
each of those platforms, built using binutils.
Then provide a bios.c that runs under some existing
C compiler/runtime and just uses a 1 GiB or 2 GiB
flat file containing a FAT-16 file system.
Noting that bios.c can be replaced by pretty much
anything as an independent exercise.
Using that approach, and switching from GCC to
Smaller C, I could have bios.c as a fairly normal
MSDOS application (MSDOS doesn't know the
difference, anyway), and PDOS-generic is also
Smaller C, and has to exist within 640k (all that
bios.c can get from MSDOS) and from there it
starts loading ELF modules, that all outwardly
appear to be 8086 modules (internally they can
be Smaller C, that is undetectable).
Because I can write everything in Smaller C, I no
longer have difficulty finding a C compiler that
supports 8086. Other people can take their
chances whether Watcom C allows them to write
commercial programs or not, or try to get GCC
IA16 to do so.
Obviously I would run under Freedos instead of
MSDOS. It's a bit rude having two operating
systems running, but Freedos can probably be
loaded high. Since applications will be required
to use the osfunc() interface instead of INT 21H,
they will not have to double-up with a large C
runtime library, although there will be one C
runtime library for bios.c (which could be a
normal PDPCLIB, using INT 21H) and one provided
by PDOS-generic (which does all the FAT-16
handling itself). This would be the situation for all
the GCC targets too, at least initially.
BFN. Paul.