muta...@gmail.com
2021-02-27 23:48:57 UTC
I don't like using the "far" keyword. It's not standard C.
I don't mind running a utility that resolves all the
offsets so that an image can be loaded into a
specific area of memory.
I don't mind my boot sector loading 58 sectors, the
maximum possible.
Currently PDOS/386 consists of a boot sector, a
16-bit tiny-memory model IO.SYS and a 32-bit
a.out MSDOS.SYS.
It occurs to me that I might be able to replace
IO.SYS with a huge memory model program
that has been pre-processed to load at a fixed
address.
MSDOS.SYS is more than 64k in size, but that's
fine if it is being handled by the huge memory
model IO.SYS - that's what huge is for.
Because IO.SYS is executed in real mode, and
makes the switch to protected mode (and also
does the return), I'm assuming there is no trickery
to enable it to be a 32-bit program instead of a
16-bit program. Even if it was 32-bit, it wouldn't
help, as real mode will constrain it to only using
16-bit offsets. Note that I'm only interested in
80386, not "unreal mode".
For PDOS/86, I think that can also be huge
memory model for the kernel, MSDOS.SYS.
I have looked here:
https://github.com/tkchia/gcc-ia16
and huge memory model is not yet supported as
far as I can tell.
Maybe that is actually an opportunity. I would like
size_t to be 32-bits in huge memory model, which
is something that existing MSDOS C compilers do
not do.
This would allow nice clean 32-bit programs to be
written, even on an 8086. While the OS would still
support executing the other memory models, which
is where any performance bottleneck is likely to be
anyway.
Any thoughts?
Thanks. Paul.
I don't mind running a utility that resolves all the
offsets so that an image can be loaded into a
specific area of memory.
I don't mind my boot sector loading 58 sectors, the
maximum possible.
Currently PDOS/386 consists of a boot sector, a
16-bit tiny-memory model IO.SYS and a 32-bit
a.out MSDOS.SYS.
It occurs to me that I might be able to replace
IO.SYS with a huge memory model program
that has been pre-processed to load at a fixed
address.
MSDOS.SYS is more than 64k in size, but that's
fine if it is being handled by the huge memory
model IO.SYS - that's what huge is for.
Because IO.SYS is executed in real mode, and
makes the switch to protected mode (and also
does the return), I'm assuming there is no trickery
to enable it to be a 32-bit program instead of a
16-bit program. Even if it was 32-bit, it wouldn't
help, as real mode will constrain it to only using
16-bit offsets. Note that I'm only interested in
80386, not "unreal mode".
For PDOS/86, I think that can also be huge
memory model for the kernel, MSDOS.SYS.
I have looked here:
https://github.com/tkchia/gcc-ia16
and huge memory model is not yet supported as
far as I can tell.
Maybe that is actually an opportunity. I would like
size_t to be 32-bits in huge memory model, which
is something that existing MSDOS C compilers do
not do.
This would allow nice clean 32-bit programs to be
written, even on an 8086. While the OS would still
support executing the other memory models, which
is where any performance bottleneck is likely to be
anyway.
Any thoughts?
Thanks. Paul.