muta...@gmail.com
2021-03-06 19:40:34 UTC
Work on porting PDOS to the Amiga and Atari
has exposed a new design for all computers,
or at least future computers, unless someone
can spot a flaw in it (maybe it has already been
invented anyway).
All computers will have a BIOS, even if that is
something like IO.SYS on PDOS/3X0 (basically
a BIOS created after-the-fact, and on hard disk).
When the BIOS loads the real operating system, or
even the first part of the operating system, like
a boot sector, and passes control to it, it will
pass an address in a register or on the stack.
This address will point to an array of BIOS
function pointers.
The OS will never do an interrupt, it will instead
call these BIOS functions. Whether the called
functions do an interrupt is beyond scope.
Whenever the OS loads and transfers control to
an application, it will provide in either a register or
the stack, a pointer to a similar array of function
pointers, but this time it will be OS functions rather
than BIOS functions.
Whether the OS functions do an interrupt
or not is beyond scope.
With this in place, I will be able to run PDOS as an
application under Windows, and PDOS applications,
and maybe even Windows applications, will be able
to run at full speed under PDOS with no virtualization
or emulation required. The BIOS that PDOS uses will
be implemented as normal calls to Windows, with a
single block of memory obtained from Windows, and
an ordinary disk file used as the "hard disk" (basically
the same as Bochs there).
And of course I can run on AmigaOS the same way.
Assuming I'm not missing something fundamental, the
next step would be to agree on a clean API for both
OS calls and BIOS calls, that would cover all 32-bit
environments known to man. Except perhaps CKD
disks. Clean for C90 programs. Plus C90 programs
that drive an ANSI terminal when they write to stdout.
With that basic paradigm in place, I would then be
able to adjust to actual computers in existence.
BFN. Paul.
has exposed a new design for all computers,
or at least future computers, unless someone
can spot a flaw in it (maybe it has already been
invented anyway).
All computers will have a BIOS, even if that is
something like IO.SYS on PDOS/3X0 (basically
a BIOS created after-the-fact, and on hard disk).
When the BIOS loads the real operating system, or
even the first part of the operating system, like
a boot sector, and passes control to it, it will
pass an address in a register or on the stack.
This address will point to an array of BIOS
function pointers.
The OS will never do an interrupt, it will instead
call these BIOS functions. Whether the called
functions do an interrupt is beyond scope.
Whenever the OS loads and transfers control to
an application, it will provide in either a register or
the stack, a pointer to a similar array of function
pointers, but this time it will be OS functions rather
than BIOS functions.
Whether the OS functions do an interrupt
or not is beyond scope.
With this in place, I will be able to run PDOS as an
application under Windows, and PDOS applications,
and maybe even Windows applications, will be able
to run at full speed under PDOS with no virtualization
or emulation required. The BIOS that PDOS uses will
be implemented as normal calls to Windows, with a
single block of memory obtained from Windows, and
an ordinary disk file used as the "hard disk" (basically
the same as Bochs there).
And of course I can run on AmigaOS the same way.
Assuming I'm not missing something fundamental, the
next step would be to agree on a clean API for both
OS calls and BIOS calls, that would cover all 32-bit
environments known to man. Except perhaps CKD
disks. Clean for C90 programs. Plus C90 programs
that drive an ANSI terminal when they write to stdout.
With that basic paradigm in place, I would then be
able to adjust to actual computers in existence.
BFN. Paul.