Page 2 of 3
Re: I am new and need help please.
Posted: Mon Jan 19, 2009 8:47 pm
by Troy Martin
How will I know, that I know assembly like the back of my hand?
I'm the resident high-rank real mode assembly geek here, I'll quiz you
Seriously, you'll feel confident enough to take on a small project when you're ready.
Re: I am new and need help please.
Posted: Mon Jan 19, 2009 9:32 pm
by Love4Boobies
casualasm wrote:I have always wanted to construct my own operative system for personal reasons.
Operating! Operating system!
My suggestion is that you learn a higher-level language. Why? Assembly is great but a project written in it is hard to maintain. It's much more understandable by anyone to spot bugs (or anything else) in C/C++ or whatever other high-level language you might prefer. Besides, coding will be faster. As for the assembly part, I suggest reading the
Intel manuals - the official documentation that describes exactly how Intel 64 and IA-32 CPUs work, what you can do with them and their instruction set (i.e. assembly opcodes).
Good luck and enjoy OSDeving!
Re: I am new and need help please.
Posted: Tue Jan 20, 2009 8:10 am
by casualasm
Love4Boobies wrote:casualasm wrote:I have always wanted to construct my own operative system for personal reasons.
My suggestion is that you learn a higher-level language. Why? Assembly is great but a project written in it is hard to maintain. It's much more understandable by anyone to spot bugs (or anything else) in C/C++ or whatever other high-level language you might prefer. Besides, coding will be faster. As for the assembly part, I suggest reading the
Intel manuals - the official documentation that describes exactly how Intel 64 and IA-32 CPUs work, what you can do with them and their instruction set (i.e. assembly opcodes).
Just to get things straight; Intel 64 is the architectural name for when you buy a 64-bit CPU in the electronic store, right? And IA-32 is the common 32-bit CPU... Or am I wrong?
So if I plan on making my OS in only IA-32, I won't have to learn Intel 64, right?
Re: I am new and need help please.
Posted: Tue Jan 20, 2009 9:39 am
by Troy Martin
Yep.
Re: I am new and need help please.
Posted: Tue Jan 20, 2009 9:51 am
by JohnnyTheDon
It will still work on Intel 64 processors. Intel 64 processors act exactly like IA-32 processors until you do the Long Mode Enable Dance.
Re: I am new and need help please.
Posted: Tue Jan 20, 2009 3:18 pm
by GeniusCobyWalker
Re: I am new and need help please.
Posted: Tue Jan 20, 2009 3:29 pm
by Love4Boobies
Not wanting to be rude or anything but please stop spamming around with your half-baked copy & paste kernel, alright? Just a bunch of stuff you got from the Internet that you didn't even put together right. It has nothing to do with what we are discussing and you are confusing the OP.
Re: I am new and need help please.
Posted: Tue Jan 20, 2009 3:50 pm
by JamesM
casualasm wrote:Love4Boobies wrote:casualasm wrote:I have always wanted to construct my own operative system for personal reasons.
My suggestion is that you learn a higher-level language. Why? Assembly is great but a project written in it is hard to maintain. It's much more understandable by anyone to spot bugs (or anything else) in C/C++ or whatever other high-level language you might prefer. Besides, coding will be faster. As for the assembly part, I suggest reading the
Intel manuals - the official documentation that describes exactly how Intel 64 and IA-32 CPUs work, what you can do with them and their instruction set (i.e. assembly opcodes).
Just to get things straight; Intel 64 is the architectural name for when you buy a 64-bit CPU in the electronic store, right? And IA-32 is the common 32-bit CPU... Or am I wrong?
So if I plan on making my OS in only IA-32, I won't have to learn Intel 64, right?
Make sure you don't confuse "Intel 64" and "IA-64". IA-64 is "Itanic" (Itanium), and is a different beastie all together!
Re: I am new and need help please.
Posted: Tue Jan 20, 2009 5:03 pm
by Troy Martin
Itanium is kind of, well, unsupported and different, therefore it's hard to find compilers for it. I suggest not messing with the Itanium architecture.
Re: I am new and need help please.
Posted: Tue Jan 20, 2009 5:36 pm
by Love4Boobies
GCC supports the Itanium. But ever since the AMD64 specification (which Intel followed for their Intel 64 architecture) they dropped support for it on the desktop market - it's only available for high-end workstations and servers AFAIK. AMD came up with AMD64 because the Itanium had only limited backward compatibility with the existing IA-32 architecture, and we know how important that is in the real world (unfortunately). Intel had no choice; it's all business, right?
The Itanium is in some ways superior to the AMD64 and Intel 64. One of its philosophies is that more work should be done by the compiler, not the hardware, so there are mechanisms through which the CPU hints the compiler, something that is unthinkable for the x86_64. Also, its instruction set is a monster
It's worth taking the time to go through the manuals after you get a good understanding of how normal PCs work
Re: I am new and need help please.
Posted: Tue Jan 20, 2009 8:43 pm
by Dex
LordMage wrote:If you want to do ASM only I would study DexOS, I think it is open-source and ASM, there is also MenuetOS, it's cool and fits on a floppy. you could look at thier code to see how certain things are done.
Yes, you got it right LordMage, it's open-source and full ASM.
Re: I am new and need help please.
Posted: Sat Jan 31, 2009 9:31 am
by casualasm
Ok, so i've looked at the DexOS sourcecode. Mainly the kernel.
Only thing is, I get confused on what exactly to read inside OS. Like, should I start studying the coding for the kernel?
And another question: The kernel is executed at the beginning of the code, right? So,
format MZ
use16
Are the first instructions to be executed upon kernel execution, right?
But what exactly is the very first thing that is executed when I start from stratch. I mean, is that the bootloader code?
Creating my own OS is starting to scare me alittle, because I don't have any particular knowledge about hardware. Like where the BIOS starts or what architecture to go for. And when I do find an architecture, I need to read through the entire manual to know what interrupts it has and how data is processed in it.
Re: I am new and need help please.
Posted: Sat Jan 31, 2009 9:42 am
by Love4Boobies
Hmm... Telling from your post, you don't know assembly. First, learn assembly. Then, take a look on the OSDev wiki. Check out the tutorials there, esp. the Bare Bones and the ones related to boot loaders. I'm too lazy to provide links, but you will find them easily. Those are a good point to start.
Re: I am new and need help please.
Posted: Sat Jan 31, 2009 9:47 am
by Firestryke31
With the architecture, I'd suggest real mode x86, and eventually work your way up to protected mode x86. For hardware knowledge I'd suggest a quick glance through the
wiki. If you don't understand something, read something else and come back to it later. If you do real mode x86 you have the BIOS interrupts, so I'd suggest doing a Google search for "Ralph Brown's Interrupt List," which is awesome because it gives you every BIOS interrupt practically ever, and tells you what you need to do to set it up, and what the interrupt does when you call it. It's layout is a little confusing, but once you figure it out it sticks to it pretty well.
Re: I am new and need help please.
Posted: Sat Jan 31, 2009 11:57 am
by Dex
casualasm wrote:Ok, so i've looked at the DexOS sourcecode. Mainly the kernel.
Only thing is, I get confused on what exactly to read inside OS. Like, should I start studying the coding for the kernel?
And another question: The kernel is executed at the beginning of the code, right? So,
format MZ
use16
Are the first instructions to be executed upon kernel execution, right?
But what exactly is the very first thing that is executed when I start from stratch. I mean, is that the bootloader code?
Creating my own OS is starting to scare me alittle, because I don't have any particular knowledge about hardware. Like where the BIOS starts or what architecture to go for. And when I do find an architecture, I need to read through the entire manual to know what interrupts it has and how data is processed in it.
Here's some pointers, first the
format MZ
use16
are not instructions as such, they tell fasm, that we are using 16bit code and we want it output as a MZ exe.
Next the bootloader part is not in the kernel, the bootloader is placed on to the first sector and loads a mz exe off the disk called "kenel32.exe", it will load any mz exe called this name.
(You will find the bootloader in the boot folder and the file "boot16.bin" and "boot16.asm"
This makes it easy to update the kernel just by deleting the old "kernel32" and add the new one just like any other file.
As as been pointed out your best start with realmode and forget about kernels and such to start with.
Just start by using a exe bootloader ( like bootprog )and coding bootable programs, this will teach you how to code without any API to help you.
Before i even came close to coding my kernel, i had coded many bootable games, a bootable cdplayer, bootable demos.
See the 512byte compo for ideas.