PC BIOS functions in protected mode
Dennis Marer
dmarer@td2cad.intel.com
Thu, 3 Dec 92 10:58:50 PDT
'
Fare,
Howdy! Thanx for the quick response - it's good to know that other
people out there have the same interest as me. In fact, the next post after
mine is from someone who is developing almost the exact same idea as me for
their master's work.
You had mentioned linux a couple of times in your reply - it's
something that sounds interesting, and I'd like to get more info about it.
Anyone you know of I could get in touch with? It sounds like a worthwhile
adventure to volunteer my efforts towards also. Natch, I still have plans
to develop my own system to learn more about OS's, but I also think that if
someone has already started, I'd like to pitch in any help I can!
> Well, there are many books which have been written about the different chips
> on the PC motherboards and standard disk controller cards. You can't usually
> write any line of code after having read them, but if you ALSO disassemble your
> ROM and look how it does it, you shouldn't have too much problem (use sourcer or
> such).
Hmmm...is this (sourcer?) a program available for doing those sorts of
things? If so I'd be interested in that also...I sure don't fancy the trick
of writing my own if there's something out there already.
> |> 3. What system independent things do I need to watch out for?....
> Well, I thought you at intel shouldn't need to post a question about intel
> processors and chips. You should have all documentation and ingeneers at hand !
> But don't worry; all essential features are supported by the 386 (just don't use
> CPU cache control instructions; see any good book about the 486); you shouldn't
> have any problem (but speed) with a 386.
Ooops, I should have made myself more clear. I've read the docs on the
486 and 386 and know they support each other very well. On a platform by
platform basis (I.E., from a Gateway 2000 386SX @16Mhz to a Zeos 486DX2 @33Mhz)
are there any differences I need to be aware of? Are the hardware support
chips (standard 8253/8259 chips, PCI, local bus, whatever) compatible in such
a way that after the system has been initialzed, no special functionality is
needed? It seems BIOS does a fine job of initializing the system, but once
initialized, do I need to care what platform I'm running on? I'm pretty sure
the answer is no, but just checking.
> I think the problems you will have won't be with the BIOS but with other add-on
> devices (sound card, etc) which need device drivers to run under DOS. You'll
> have to writee your own drivers !!!
Yep, I figured that, and that's actually the exciting part of this
project. You see, its intended to be an object-oriented OS, with heavy
emphasis on object sharing and dynamic object linking. In addition, each
device driver is designed as its own object which is installed for applications
to use. A list of all devices will exist somewhere, and if an application
needs, for example, a display device, it will search this list for all devices
which are descendants of the 'display' base class. The 'display' base class
provides the virtual methods for writing to the display, and each descendant
(each video card supported) has an identical interface. More specific objects
(for example, a display which supports real-time video) can be searched for,
allowing the application to specify as specific or as general a device as
it needs. This same mechanism for using devices also controls multiple
application device contention (the device is remove from the list if it can
only support a limited number of simultaneous users) and supports multiple
devices of similar types (multiple display devices?) with ease. It's a real
interesting concept, making writing device drivers accessible by the regular
programmer, not something limited to a wizard or guru. Sound interesting?
> At the time, I don't know at all what kind of OS you're trying to design, but
> I am very interested in anything new: it shouldn't look like DOS (of course not)
> and not even Unix: you'll never be able to compete with Unix in its own grounds.
> So don't try a C (or C-like language) based OS. Moreover, to use any language
> (if you're not going to be Unix or DOS compatible), you'll have to redesign at
> least part of the compiler (interpreter); that's what I'm currently undertaking
> myself.
Initially it will be based on an object oriented assembler to do some
of the OS's kernel and device drivers. This is the ONLY way to produce an
efficient (in space and speed) operating system, in my opinion. I think this
is the reason why I'm so disgusted with OS/2 and Windows NT is because of the
sheer size of the operating system. Initial Windows NT reports say 60MB of
hard drive space (with a 30MB permanent swap file) must be dedicated to the
operating system itself. My GOAL for this project (and I don't know if it's
feasible or not) is to develop the kernel and basic hardware support (disk
access, com port access, etc) to fit on a single floppy, uncompressed. (1.44M)
I have a 100MB hard drive, and I can't afford to have an OS consume half of it!
Eventually, it'll need a high-level language. I'm thinking of
something closely related to C++, but it will be a while before I get to that
point. The stuff that needs to be done in assembly (low level hardware access
and the kernel of the OS) will come first, and the rest will be done in some
common high level language (such as C++) for portability. It's ALL going to
be object oriented though.
> An OS is very difficult to design: there's not only basic i/o to redefine, but
> also all the standards for data transfer, which is the most important. Unix has
> to fight at every moment against the only (poor) 100% supported internal
> standard: ASCII caracters number 32 -> 126 !!
That's something I haven't given much thought to, but will need to
resolve before I begin coding. Maybe this is turning into just a feasibility
study...anyway, I'll have fun doing it!
> You know, if you want to write an OS and don't have time to finish something
> interesting alone, you can help write existing OS like linux.
Regardless of whether mine takes off or not, I'd like to help! Please
direct me towards someone who can get me involved. As you can tell, I've got
a lot of free time on my hands...
Thanx again for your input! Keep me posted on linux, and 'sourcer' (if
that's actually a program and not a term I'm unfamiliar with), and I'll keep
you posted on what's going on with my project. Keep in touch!
Dennis Marer
dmarer@td2cad.intel.com