On Saturday, January 1, 2022 at 10:22:55 PM UTC+11, Rod Pemberton wrote:
> Well, it depends on your OS design.
>
> Your OS recreates DOS and DOS uses the BIOS.
>
> My OS doesn't use the BIOS. My OS programs
> the hardware directly. There is no layer below
> that of the OS proper.
Your OS will read data from the disk in block mode, right?
Do you think that code should be put inside the C library,
e.g. PDPCLIB, and then the OS opens drives with
fopen("0x80", "r+b");
etc?
That becomes your defacto BIOS layer, or maybe we need
another name for it. Regardless, it deals with flat files, it
doesn't introduce a file system.
Then your OS can use the above file and impose a file
system on top of it. That's the OS proper.
Then even your OS can do fopen("config.sys", "r"); That
will go through quite different logic, that accesses your
OS routines that deal with the file system it introduced,
rather than the block reads of the physical hard disk.
Maybe you don't consider this to be layering though. And
maybe you think it is wrong to put that logic into the C
library? What I'm looking for, but don't expect, is
mathematical proof one way or the other. Or is this
considered to be art?
BFN. Paul.