How to start it! (OS, 64 bit)
How to start it! (OS, 64 bit)
hi, i am new to this forum i hope your guys can help me much as possible!
i am determined to make my own operating system!
(not windows, not mac, not linux, etc.) i want to make my own operating system i hope u guys cna help me
ok,
what do i need to get started?
the programs (i no i need a extra computer for test and modeling the OS)
i want to make an amd 64 (64bit)OS
i want it to be my own!
i am determined to make one please help me
i am determined to make my own operating system!
(not windows, not mac, not linux, etc.) i want to make my own operating system i hope u guys cna help me
ok,
what do i need to get started?
the programs (i no i need a extra computer for test and modeling the OS)
i want to make an amd 64 (64bit)OS
i want it to be my own!
i am determined to make one please help me
Re: How to start it! (OS, 64 bit)
To get started, you need a computer and an idea. To finish it, you need a lot of time and motivation.Msta wrote:what do i need to get started?
In my case, I find that motivation can be created by having a goal that's reachable. Then, reach the goal and aim for the next. For starters, make a program that starts without operating system that says "hello world". That'll take you at least a week.
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
Re: How to start it! (OS, 64 bit)
Haha, Good one Candy..Candy wrote:For starters, make a program that starts without operating system that says "hello world". That'll take you at least a week.
But seriously, People should "not" use OSDev as an excuse to learn a new language.. Try coding a few programs before thinking about designing and writing your own operating system..
(Disclaimer, By "few" I mean "lots 'n lots".. Invest a few years into learning..)
- mathematician
- Member
- Posts: 437
- Joined: Fri Dec 15, 2006 5:26 pm
- Location: Church Stretton Uk
Re: How to start it! (OS, 64 bit)
If you know anything at all about the PC's architecture, poking the string "Hello World" into the video buffer is trivial. Try writing a boot sector, which loads a "kernel", which pokes the string "Hello world" into the video buffer.Candy wrote:For starters, make a program that starts without operating system that says "hello world". That'll take you at least a week.
Of course, the theory may be trivial, but the amount of hurdles the prospective osdever must overcome is surprisingly large - especially if they have not done much (any) system programming before.If you know anything at all about the PC's architecture, poking the string "Hello World" into the video buffer is trivial. Try writing a boot sector, which loads a "kernel", which pokes the string "Hello world" into the video buffer.
motivation and image
my motivation is to beat bill gates is his world one OS i know it seens impossible but at am motivated enough
i have an image 3D desktop(like linux), built in webserver(like linux),4 screens at the bottom(like linus), i want to creat my own OS not a linux or a windows or a mac.
i wish to be the best and my firends will be trained to do other things
it needs to be the most andvance OS on the planet.
and i am trust your guys to lead me through my dream!
so what programs do i need to make this OS?
for a 64 bit?
C++ programing language i think?
thank you in advance!
i have an image 3D desktop(like linux), built in webserver(like linux),4 screens at the bottom(like linus), i want to creat my own OS not a linux or a windows or a mac.
i wish to be the best and my firends will be trained to do other things
it needs to be the most andvance OS on the planet.
and i am trust your guys to lead me through my dream!
so what programs do i need to make this OS?
for a 64 bit?
C++ programing language i think?
thank you in advance!
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
This is just sad.. someone break the news to him or her already.. It's just embarrassing..Msta wrote:i have an image 3D desktop(like linux), built in webserver(like linux),4 screens at the bottom(like linus), i want to creat my own OS not a linux or a windows or a mac.
I think this is the perfect time for me to display a neat emoticon I found. {SNIP} (ROFL)Msta wrote:o ya what do u mean hello world program?
EDIT: Removed 2015: Imageshack replaced all links with spam.
Last edited by Brynet-Inc on Fri Aug 28, 2015 8:49 pm, edited 1 time in total.
- mathematician
- Member
- Posts: 437
- Joined: Fri Dec 15, 2006 5:26 pm
- Location: Church Stretton Uk
Re: motivation and image
How many million lines are there in Windows source code? You are going to wear out quite a few keyboards by the time you are done. And when you are done, in maybe forty years from now, Windows will be a long forgotten operating system belonging to yesteryear.Msta wrote:my motivation is to beat bill gates is his world one OS i know it seens impossible but at am motivated enough
Re: o ya
Hi,
For example, for C, it'd be something like:
The problem here is that the program is loaded into memory and run by an OS, and the compiler is typically designed (or configured) to create executables for the OS it's running on. For OS code there is no OS to do this, and the code needs to be designed to be started by the BIOS. This means you need to reconfigure your compiler to make it generate suitable code, but the BIOS expects to start 16-bit code and most modern compilers won't generate 16-bt code.
The next problem is that the "printf()" function just tells the compiler to send the string to "something else" (a terminal, a window, a video driver, etc). For an OS developer, "something else" doesn't exists until you write it.
Lastly, the C compiler uses standard libraries that talk to the OS (for things like memory management, timing, file I/O, etc). For an OS developer, these standard libraries aren't usually useful, and you either need to avoid using them or write your own.
If you add all this up, a "Hello World" program that takes 4 lines of simple code can easily become 100 lines of code, plus hassles with tools, linkers, etc.
The easiest way to write some "Hello World" boot code is to forget about the compiler completely, and hand code it in assembly language. For an example, I'd try something like this (for NASM):
Of course after you've assembled it you'd need to find a way to install it somewhere. Floppy disks are a common choice (no-one likes messing up their hard drive). For this (on a Unix OS) I'd try something like "cat hello.bin > /dev/fd0". For Windows you'd need to download a utility like Rawrite.
Now that you've seen the code, how much of it do you understand? I wrote this in 5 minutes (and didn't bother testing it), but how many hours of research would you have needed to write something similar and make sure it actually worked?
Unfortunately Bill Gates and thousands of programmers wrote Windows, and I'd guess Bill actually didn't write any of it himself. It took Microsoft around 5 years to write Vista, but half the code came from earlier versions of Windows and the device drivers were probably written by hardware manufacturers. This means 1000 programmers for 40 hours a week wrote about half of Vista in 5 years. Assuming each programmer worked for 50 weeks per year, this works out to 1000 * 40 * 50 * 5 hours to write half of Vista, or 20000000 hours to write all of it.
If you worked for 60 hours per week 52 weeks per year, then it'd take you about 6410 years. For a new OS there's no compatability hassles with old software (like getting applications designed for Windows XP to run under Vista), and you could probably cut a few corners and get it done in 5000 years. If your friends help you then it might take less time, but then you might waste a lot of time explaining what needs to happen and it might take longer...
Of course Microsoft has a variety of programmers with different knowledge - some know a lot about memory management, some know about file systems, schedulers, GUIs, etc. This means you'd need to become a specialist in every different area to get the same work done in the same number of hours. Also the time Microsoft took doesn't include learning any of it (almost all of the programmers had training and experience before they started working on Vista).
Also, Microsoft have facilities for testing the OS on a wide variety of hardware to make sure it all actually does work (and there's no annoying compatability problems). You'd need to do that yourself too...
Lastly, Microsoft has enough finances to do this sort of thing. If you're spending 60 hours a week every week, then you won't have time to work, won't be able to pay for internet access, electricity, food, rent, etc. At the moment you might be lucky enough to be living at home with your parents, but sometime in the next few thousand years they'll probably expect you to leave home and get a job. You won't be able to work on the OS for 60 hours every week for very long.
Linux is different, but not much. It's taken about 20 years to go from a half-baked Unix clone into what you see today, and most of it has been written by thousands of different volunteers and large companies (like IBM, Redhat, Intel, etc). A lot of the code is portable code that is recycled for several different Unix clones (Solaris, FreeBSD, OpenBSD, etc), and some of it probably even dates back to before Linux (the kernel) even existed.
Now I know I'm not being fair - there are people here who are hoping to eventually produce a commercial quality OS (including myself). The general idea is to produce enough of the kernel and framework to allow other programmers to easily write code for your OS (device drivers, applications, etc), and to make sure that the work you do is extremely impressive (and well documented) so that other programmers would actually want to write code for your OS. So far I've spent over ten years, and I'm expecting to spend another 10 years before anyone thinks it's impressive...
Cheers,
Brendan
A "hello world" program is a program that displays the words "Hello world" on the screen. It's one of the first things most people write when they learn a new programming language.Msta wrote:o ya what do u mean hello world program?
For example, for C, it'd be something like:
Code: Select all
#include "stdio.h"
void main(void) {
printf("Hello World\n");
}
The next problem is that the "printf()" function just tells the compiler to send the string to "something else" (a terminal, a window, a video driver, etc). For an OS developer, "something else" doesn't exists until you write it.
Lastly, the C compiler uses standard libraries that talk to the OS (for things like memory management, timing, file I/O, etc). For an OS developer, these standard libraries aren't usually useful, and you either need to avoid using them or write your own.
If you add all this up, a "Hello World" program that takes 4 lines of simple code can easily become 100 lines of code, plus hassles with tools, linkers, etc.
The easiest way to write some "Hello World" boot code is to forget about the compiler completely, and hand code it in assembly language. For an example, I'd try something like this (for NASM):
Code: Select all
org 0x7C00
bits 16
jmp 0x0000:START
align 2
START:
xor ax,ax
mov bx,0xB800
mov ds,ax
mov es,bx
cli
mov ss,ax
mov sp,START
sti
mov ax,0x0003
int 0x10
mov si,helloString
xor di,di
mov ah,0x0F
lodsb
.l1:
stosw
lodsb
test al,al
jne .l1
jmp $
helloString: db 'Hello World',0
times ($$-$+0x1fe) db 0x00
dw 0xAA55
Now that you've seen the code, how much of it do you understand? I wrote this in 5 minutes (and didn't bother testing it), but how many hours of research would you have needed to write something similar and make sure it actually worked?
This wouldn't be very hard if Bill Gates wrote Windows....Msta wrote:my motivation is to beat bill gates is his world one OS i know it seens impossible but at am motivated enough.
Unfortunately Bill Gates and thousands of programmers wrote Windows, and I'd guess Bill actually didn't write any of it himself. It took Microsoft around 5 years to write Vista, but half the code came from earlier versions of Windows and the device drivers were probably written by hardware manufacturers. This means 1000 programmers for 40 hours a week wrote about half of Vista in 5 years. Assuming each programmer worked for 50 weeks per year, this works out to 1000 * 40 * 50 * 5 hours to write half of Vista, or 20000000 hours to write all of it.
If you worked for 60 hours per week 52 weeks per year, then it'd take you about 6410 years. For a new OS there's no compatability hassles with old software (like getting applications designed for Windows XP to run under Vista), and you could probably cut a few corners and get it done in 5000 years. If your friends help you then it might take less time, but then you might waste a lot of time explaining what needs to happen and it might take longer...
Of course Microsoft has a variety of programmers with different knowledge - some know a lot about memory management, some know about file systems, schedulers, GUIs, etc. This means you'd need to become a specialist in every different area to get the same work done in the same number of hours. Also the time Microsoft took doesn't include learning any of it (almost all of the programmers had training and experience before they started working on Vista).
Also, Microsoft have facilities for testing the OS on a wide variety of hardware to make sure it all actually does work (and there's no annoying compatability problems). You'd need to do that yourself too...
Lastly, Microsoft has enough finances to do this sort of thing. If you're spending 60 hours a week every week, then you won't have time to work, won't be able to pay for internet access, electricity, food, rent, etc. At the moment you might be lucky enough to be living at home with your parents, but sometime in the next few thousand years they'll probably expect you to leave home and get a job. You won't be able to work on the OS for 60 hours every week for very long.
Linux is different, but not much. It's taken about 20 years to go from a half-baked Unix clone into what you see today, and most of it has been written by thousands of different volunteers and large companies (like IBM, Redhat, Intel, etc). A lot of the code is portable code that is recycled for several different Unix clones (Solaris, FreeBSD, OpenBSD, etc), and some of it probably even dates back to before Linux (the kernel) even existed.
Now I know I'm not being fair - there are people here who are hoping to eventually produce a commercial quality OS (including myself). The general idea is to produce enough of the kernel and framework to allow other programmers to easily write code for your OS (device drivers, applications, etc), and to make sure that the work you do is extremely impressive (and well documented) so that other programmers would actually want to write code for your OS. So far I've spent over ten years, and I'm expecting to spend another 10 years before anyone thinks it's impressive...
The most common combination is C with a little assembly language for the kernel and boot code. It's not the only combination of languages that could be used though - mostly it depends on what you're familiar with (although a little assembly language is required)...Msta wrote:so what programs do i need to make this OS?
for a 64 bit?
C++ programing language i think?
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
- mathematician
- Member
- Posts: 437
- Joined: Fri Dec 15, 2006 5:26 pm
- Location: Church Stretton Uk
If it is up against well established competitors the first thing a commercial quality operating system (or anything else) has got to find is a niche market. There has to be a convincing answer to the question "Why should I buy your OS in preference to Windows or Linux?" and the answer would probably have to be, "Because it was designed specifically to meet the specailised needs of somebody such as yourself, and in a way that a general purpose OS simply can't do."
thankyou so much!!
damn thankyou
i will get back to u guys on htis post if i did it
thankyou so much
i will get back to u guys on htis post if i did it
thankyou so much
You can write the code in whatever editor you want as long as it saves to just plain ASCII. After writing the code, it is then fed to the compiler, or the program that turns C++ code into a machine readable language.
As for an IDE, Dev-C++ is nice for Windows, or I also hear Notepad++ is good. (Never used it myself. Take with caution. Linux and all.)
Nota bene, that one should know how to program in his\her language of choice well if wanting to write an operating system. As said above, it's no trivial task. Write a few programs first. A game, editor, whatever. Maybe even help out with a preexisting project. (Linux, maybe?)
Hope it helps...
As for an IDE, Dev-C++ is nice for Windows, or I also hear Notepad++ is good. (Never used it myself. Take with caution. Linux and all.)
Nota bene, that one should know how to program in his\her language of choice well if wanting to write an operating system. As said above, it's no trivial task. Write a few programs first. A game, editor, whatever. Maybe even help out with a preexisting project. (Linux, maybe?)
Hope it helps...
C8H10N4O2 | #446691 | Trust the nodes.