I have been interested in making my own simple operating system lately, but one thing that has been stopping me is, how do I write something to a hard drive. I have found a few simple tutorials for printing to the screen without an operating system, but how would one simply write just one byte to a hard drive?
6 replies to this topic
#1
Posted 15 April 2011 - 01:42 PM
|
|
|
#2
Posted 16 April 2011 - 02:12 PM
In Assembly Language, that is very hardware specific.
If you are creating your own OS, you have to use the hardware BIOS.
You need to read-up on the BIOS for your type of computer.
Generally speaking, all BIOS calls are done via Interupts.
Assuming you are using an x86 type machine, read-up on the x86 BIOS.
Google: "x86 BIOS"
If you are creating your own OS, you have to use the hardware BIOS.
You need to read-up on the BIOS for your type of computer.
Generally speaking, all BIOS calls are done via Interupts.
Assuming you are using an x86 type machine, read-up on the x86 BIOS.
Google: "x86 BIOS"
#3
Posted 16 April 2011 - 02:47 PM
Note that that will only work if you stay in real mode. Once you switch to protected mode, you're going to have to write your own generic drivers.
Interrupt table
Take a look at interrupt 13H, subfunctions 0, 2, and 3.
Interrupt table
Take a look at interrupt 13H, subfunctions 0, 2, and 3.
sudo rm -rf /
#4
Posted 18 April 2011 - 03:17 PM
Thanks for your help i will definitely look into the bios interrupt, but I am interested in learning how to write my own drivers. Does anyone know a good tutorial or book on this subject?
#5
Posted 14 May 2011 - 01:21 PM
I may have the code I wrote for writing to an IDE hard drive laying around somewhere... I'll try to find it if you are interested.
Latinamne loqueris?
#6
Posted 14 May 2011 - 10:46 PM
#7
Posted 15 May 2011 - 02:35 PM
If you look there, you will probably want to look at the page "ATA PIO Mode" or "IDE".
Latinamne loqueris?
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









