Getting a OS going quickly.
Getting a OS going quickly.
Whats the fastest way for me to get an OS going? I have vmware ruining on Red Hat Linux. So how would I get an OS going? I want to write everything on my own, boot loader, file-system, memory manger etc. So what do I do? How do I get the code ready? I have NASM and KDev. Because my OS will not have a file system how will I get the object code onto the floppy? How do I generate the code for platform Independence? I have read a few books on OS programing so I think I can make the code, its just getting the object code formated and ready to run.
And ware can I learn about protected mode OS programing? I know how to write programs in protected mode with ASM and with C but how can I make a OS that uses protected mode?
Thank you for your time,
Arrummzen
And ware can I learn about protected mode OS programing? I know how to write programs in protected mode with ASM and with C but how can I make a OS that uses protected mode?
Thank you for your time,
Arrummzen
Re:Getting a OS going quickly.
Well, since your running linux, I made a perfect example for code. Download FritzOS Pk0.7.1 and run install.sh ( from the command line, in the linuxinst dir ) with a blank floppy in your fd0.
It's at http://sourceforge.net/projects/fritzos.
Since you want to make it on your own, just use my code for example after testing it.
It's at http://sourceforge.net/projects/fritzos.
Since you want to make it on your own, just use my code for example after testing it.
Re:Getting a OS going quickly.
Hi,
Let me just anwser breifly - Get BOOKS!!!
There are a million and one ways to do ALL the things you just requested above.
First, choose the hardware you want to work with.
then study docs, books and anything you can get you hands on about the hardware
then get FAMILIAR with the ASSEMBLER and HIGH LEVEL COMPILER of your CHOICE.
by now, i'm sure you can see that there is NO QUICK WAY TO DO AN OS!!! TAKES DEDICATION AND HEADACHES, and thats just the BEGINNING!! ;D
The concepts for protected mode are the same. In the case of writing a Pmode OS you have to do all the memory management + hardware management on YOUR OWN :'( . Have you read the INTEL Docs? (I'm assuming that your are programming for the i386 family)
Let me just anwser breifly - Get BOOKS!!!
There are a million and one ways to do ALL the things you just requested above.
First, choose the hardware you want to work with.
then study docs, books and anything you can get you hands on about the hardware
then get FAMILIAR with the ASSEMBLER and HIGH LEVEL COMPILER of your CHOICE.
by now, i'm sure you can see that there is NO QUICK WAY TO DO AN OS!!! TAKES DEDICATION AND HEADACHES, and thats just the BEGINNING!! ;D
The concepts for protected mode are the same. In the case of writing a Pmode OS you have to do all the memory management + hardware management on YOUR OWN :'( . Have you read the INTEL Docs? (I'm assuming that your are programming for the i386 family)
Re:Getting a OS going quickly.
Well, some people have got a head start using other sources, like FritzOS. I wish I had FritzOS when I started...
And, I have almost never had to use books for OS dev, only because I am allergic to mine :-\ :'(...but I suggest you get books, along with other online source code.
And, I have almost never had to use books for OS dev, only because I am allergic to mine :-\ :'(...but I suggest you get books, along with other online source code.
Re:Getting a OS going quickly.
Also, if you use someone elses bootsector, you won't need to know ASM. I hear GRUB is good, but I just made my own bootsector...and it pays for the effort. It pays because now I can program it how I want.
Re:Getting a OS going quickly.
Not that i want to START AN OS WAR HERE but
I find the idea of using another person's BOOTCODE REDICULOUS and a way of PROMOTING LAZY PROGRAMMING!!!! >:(
Think about it for a moment - If you can't write a program to switch to Pmode (after reading necessary docs of course) then you are going to find it difficult to cope with Pmode OS programming!
This is simply becaude by trying your hands on the small Pmode set up code you LEARN A LOT and it HELPS GET YOUR MIND(BRAIN) USE TO THINKING LOGICALLY IN PMODE CONCEPTS. It also cleans you of the assumption or ways of programming in REAL mode.
this is what i think. SO it helps to LEARN how to switch to Pmode and LOAD sectors from the floppy or whereever on your own.
It took me about 2 months to get mine done but now i am moving much faster through my development simply because i have learnt from the experience - there is no SUBSTITUTE FOR EXPERIENCE!!
I find the idea of using another person's BOOTCODE REDICULOUS and a way of PROMOTING LAZY PROGRAMMING!!!! >:(
Think about it for a moment - If you can't write a program to switch to Pmode (after reading necessary docs of course) then you are going to find it difficult to cope with Pmode OS programming!
This is simply becaude by trying your hands on the small Pmode set up code you LEARN A LOT and it HELPS GET YOUR MIND(BRAIN) USE TO THINKING LOGICALLY IN PMODE CONCEPTS. It also cleans you of the assumption or ways of programming in REAL mode.
this is what i think. SO it helps to LEARN how to switch to Pmode and LOAD sectors from the floppy or whereever on your own.
It took me about 2 months to get mine done but now i am moving much faster through my development simply because i have learnt from the experience - there is no SUBSTITUTE FOR EXPERIENCE!!
Re:Getting a OS going quickly.
Yep. Code Slasher is right. I made my own bootsector and programming in assembly is much easier now than before I started my OS.
Re:Getting a OS going quickly.
I would like to say that boot loaders and Operating systems or two totally different subjects.
It's not promoting lazy programming to say use another boot loader, like GRUB. Why reinvent the wheel? I use grub at the moment, because I'm more interested in OS programming. However, I agree there is a lot to be learnt from writing a boot loader.
To get an OS up and running, follow some of the many excellent tutorials on-line. This is how I started.
some links:
http://my.execpc.com/~geezer/osd/index.htm
http://osdev.neopages.net/index.php
http://www.0xfi.com/oslib/
It's not promoting lazy programming to say use another boot loader, like GRUB. Why reinvent the wheel? I use grub at the moment, because I'm more interested in OS programming. However, I agree there is a lot to be learnt from writing a boot loader.
To get an OS up and running, follow some of the many excellent tutorials on-line. This is how I started.
some links:
http://my.execpc.com/~geezer/osd/index.htm
http://osdev.neopages.net/index.php
http://www.0xfi.com/oslib/
Re:Getting a OS going quickly.
I bet this is confuzing the author of this thread
Just to keep it simple for him, test some OS source that installs in Linux and learn from that. FritzOS installes in linux. And there are others on SourceForge in the Operating System Kernels catagory.
Just to keep it simple for him, test some OS source that installs in Linux and learn from that. FritzOS installes in linux. And there are others on SourceForge in the Operating System Kernels catagory.
Re:Getting a OS going quickly.
i had a quick look at fritzos, erm.. you shouldnt put code like you do in header files, they should all be compiled separatly.
i also didnt bother to compile + test it. but if you had a disk image, i'd fire it up under vmware and have a look.
i also didnt bother to compile + test it. but if you had a disk image, i'd fire it up under vmware and have a look.
-- Stu --
Re:Getting a OS going quickly.
Ok. Thank you. I think I will be reading some tutorials for a while...
Thank you for your time,
Arrummzen
Thank you for your time,
Arrummzen
Re:Getting a OS going quickly.
DF, I IM'ed you about the FritzOS image file. There is one pre-made. I IMed the instructions to get it...
Re:Getting a OS going quickly.
I basically mutilated the Fritz boot sector and turned to into a program that should write some text on to the screen (I have to start some ware).
I am reading a tutorial on how to make a boot sector and I compiled mine correctly using NASM however now I want to put it onto a floppy and boot it in VMware. How do I copy it on Linux? The tutorial says to use dd but I don't know how, will someone explain it to me?
Will you tell me if this is right?
I am reading a tutorial on how to make a boot sector and I compiled mine correctly using NASM however now I want to put it onto a floppy and boot it in VMware. How do I copy it on Linux? The tutorial says to use dd but I don't know how, will someone explain it to me?
Will you tell me if this is right?
Re:Getting a OS going quickly.
ORG 7c00h
jmp Start ; Goto Start
Start:
mov ax, 3 ; Set text-mode 3.
int 10h ; Text-mode 3 set. The screen is cleared.
; Update the segment registers
xor ax, ax
mov ds, ax
mov ah , 05h
mov al , 01h ; set display page 1
int 10h
mov ah , 09h
mov al , 05h
mov bh , 01h
mov bl , 01h
mov cx , 05h
int 10h ; should write something to the screen
times 512 -($-$$) db 0
dw 0xAA55
Thank you for your time,
Arrummzen
jmp Start ; Goto Start
Start:
mov ax, 3 ; Set text-mode 3.
int 10h ; Text-mode 3 set. The screen is cleared.
; Update the segment registers
xor ax, ax
mov ds, ax
mov ah , 05h
mov al , 01h ; set display page 1
int 10h
mov ah , 09h
mov al , 05h
mov bh , 01h
mov bl , 01h
mov cx , 05h
int 10h ; should write something to the screen
times 512 -($-$$) db 0
dw 0xAA55
Thank you for your time,
Arrummzen
Re:Getting a OS going quickly.
Well, actually comp.sh in the linuxinst directory..it makes a image for VMware/BOCHS called fritzos.img.
Run comp.sh and it i'll compile your code, then run it in VMWare.
Run comp.sh and it i'll compile your code, then run it in VMWare.