
This contains the official homepage of FOS. FOS, rhymes with DOS, stands for Friendly Operating System. The complete code for the is available for download. The operating system is a learning thing. It doesn't do much except show the basics. Below is an explanation of different parts of an operating system.
The Boot Sector had many alias. Its the same thing as the bootstrap code, the master boot record (MBR), and Sector 1 Code. To understand it, you need to know what happens when a computer turns on.
1. User turns computer on.
2. Electrical signal sent to CPU on permanently programmed path.
3. CPU's memory cleared, the program counter is set to F000h
4. Execution of Boot Program (ROM) at F000h in BIOS
5. CPU uses BIOS code to perform the POST (Power On Self Test).
a. Checks for errors:
1. System bus
2. I/O devices
3. System timer
4. Video system - Now you see stuff
5. Memory - reads/writes to each chip to test
6. Other devices' BIOSs (like SCSI) started, incorporated
7. Plug and Play tests (if present)
b. Results compared to official record in CMOS (memory that requires
very little electricity
to run, but slow.
c. Allows user to edit BIOS options (that little message that says
'Press
d. Finds which drives are available (like A, B, C, etc.)
e. Checks for keyboard/mouse and which keys have been pressed
6. Loads the bootstrap code - What we are concerned about
a. Loads Sector 1, Track 0, Head 0 of the boot drive (A or C) to
absolute address 0000h:7C00 to 0000h:7DFFh (512 bytes)
b. Checks 16 bit (two byte) word at 0000h:7DFEh for AA55h. AA55h is
the boot signature and is used by BIOS to ensure that the drive
contains a valid
boot sector. - If the signature is not present,
the BIOS displays a message like 'Operating System Not Found"
c. Loads DL
1. 00h if boot sector was loaded from drive A
3. 80h if boot sector was loaded from drive B
d. Jumps to 0000:7C00h, the start of the
boot sector code in memory.
7. The boot sector code (the bootstrap) takes control and loads OS.
8. Operating system displayed, user can use computer.
Soooo.... the bootstrap code needs to load the operating system. Now, it would help to have an operating system to load, but one step at a time.
The bootstrap is the only section of your code that needs to be written in assembly. If you don't know any assembly, I commented the code, so just take it for granted. Some of it is easy: mov moves data around, etc. But, this is not the place to learn assembly. A good reference (book) that I can refer you to is Art of Assembly Language Programming.
Okay, all that is left is for you to download it and have fun.
Code (fosboot.asm)
Executable (fosboot.com)
Readme (readme.txt)
All (fosboot.zip)
Last Updated November 25, 2000
Problems, Questions, Complaints? Email: [email protected]