It's actualy pritty darn complex. The very first thing you could do is get a blank 1.44 Floppy disc, a ASCII hex table and Windowses DEBUG
1. insert floppy in to the FDD
2. start the commnand prompt
3. run debug (just type 'debug') (example: c:\>debug)
you'll see:
-
4. now typein 'l 0 0 0 1' (no quotas)
then type 'a 3e'
the 3E address is the beggining of the FD boot system.
now you should see:
????.003E:
5. start writing assembly (some people call it incorrectly ASSEMBLER) code
my exsample code:
Code:
MOV AX,0E44
INT 10
MOV AX,0E61
INT 10
MOV AX,0E74
INT 10
MOV AX,0E61
INT 10
MOV AX,0E4D
INT 10
MOV AX,0E61
INT 10
MOV AX,0E74
INT 10
MOV AX,0E72
INT 10
MOV AX,0E69
INT 10
MOV AX,0E78
INT 10
MOV AX,0E34
INT 10
MOV AX,0E37
INT 10
MOV AX,0E0D
INT 10
MOV AX,0E0A
INT 10
JMP 003E
>>>you can skip the next few lines
can you see the diference between
MOV AX,0E34
and
MOV AX,0E37
?
yes, it's 34 and 37. these are Heximal values. 34h='4' (character); 37h='7'; 44h='D'; 61h='a' etc.
this writes a new line:
Code:
MOV AX,0E0D
INT 10
MOV AX,0E0A
INT 10
0D=\n
0A=\r
int 10 is a BIOS video interrupt.
JMP 003E JuMPs to the offset address 3E, from were the program begins.
>>>back on track.>>>
after you press enter at the last row press it again. here you are gagin at the '-' state.
6. write 'w 0 0 0 1'. that will save your code to the floppy disk.
6.2. write 'q' to stop the program DEBUG
7.reboot your computer and boot from the floppy. on some systems like mine you press F8 at the mem check screen to open boot device menu. On other systems you got to press DEL to enter BIOS and change your boot device settings
8. after the floppy boots you shold see a message.
my example displays 'DataMatrix47' numerous times, every time on new line.
Press ctrl+alt+del to restart the computer.
SUMMARY: To make your own OS, furs you got to learn assembler, then, when you develop your bootloader, start writing the KERNEL (the core of every os) C is a recommended language, but you wount be able to use predefine functions, like PRINTF, SCANF, etc.
This was just an example, not even remotly close to an operating system. THE OS HAS TO TAKE CARE of 1000 of 1000 of things.
PS: if someone is interested, i can give a code file and a BAT script to write the code to a disk to see the result, without wasting 0.5-1 hours.