bios source code pdf assembly
No need to reinvent the BIOS, use it. It provides basic functions like "write a sector to disk". It's a *long* time since I've done anything that low-level on a PC (think 8086 CPU overclocked by soldering in a faster oscillator).
Remember, the BIOS consists of the BIOS's of expansion cards as well, for instance the graphics card. You'll need (for ease) to stick with a really simple graphics card, no fancy 3D unless you want to make life difficult.
The operating system (think DOS) is just a program that talks to the BIOS and runs user programs.
The PC will boot whatever program you put on a disk, if you follow the BIOS's expected boot format. Could be MS-DOS, could be your own program instead.
You'll need to check up on the basic functions that the BIOS (including the video BIOS) provides and the booting procedure. I can't recall the exact details, but it'll be on the web.
Also, examine the code (source or disassembled) for MS-DOS (3.3 is nice and easy if you can find it). You can 'borrow' some of the routines. If you prefer, look at some Linux code, or even CP/M. The basic boot process and talking to the BIOS is the same, it has to be. Check out the "Master Boot Record" (MBR) of any bootable disk - that's where the BIOS looks for what to load.
Try here for some open-source DOS versions, some with source code available:
**broken link removed**
Also, a good source for all the assembly stuff, if you don't already know it:
http://webster.cs.ucr.edu/ (check out chapter 13)
Check here for the basic boot procedure:
**broken link removed**
**broken link removed**
It's not really that difficult if you just need basic stuff, it gets a bit more difficult if you need higher-level functionality (networking, large HD support, fancy graphics). I once wrote a (very) simple OS/control program for someone's hardware project at university in 3 days. Ahh, they were the days!
You could even, once you've learnt how to use the BIOS, write your own Low-level libraries for use in Turbo C and then code your main stuff in C.
If you fancy completely rewriting everything (including replacing the BIOS) I would start with a simpler hardware system that a 486, like an 8086.
FoxyRick.