Noob / Newbie in OS development.

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
jimson

Noob / Newbie in OS development.

Post by jimson »

hello all,
i am jimson,
i am kinda new in OS development.
i wish to develop my own operating system according to my standard.
i need help from your guys to clear my blurly mind before i start my OS developement and i say thank you in advance for the help i would receive. "Thank You"

ok... my blur mind.

1. i understood, to develop an operating system, one should know ASM (assembler language). am i right.

2. can we program the OS fully in ASM code only. Not C and C++ or whatsoever other languages?

3. assume we will stick with ASM and my goal is to produce a 16-bit OS. Does it easily for me to change to 32-bit OS once i completed my task in developing a 16-bit OS?

4. some of the assembler i saw from the internet, A86 and NASM. Should i use A86 or NASM?

5. i read through the Assembler book, and found out there are two type of Interrupt, BIOS and DOS Interrupts. can anyone please explain to me these two. Does the DOS interrupts means the MS-DOS interrupts that only available when running our program in MS-DOS.? eg. 21h

6. i wrote an asm file and assembled it using A86. The generated file is test.com which will print a "!" character when i run it from command line. I rawrite / fdimage the file into a diskkete and i set my BIOS to boot from A: The result after the drive a floppy is booted(or not?) no "!" character was found in the screen. Can anyone please explain to me whats went wrong. and why no "!" in the screen where i do see "!" when i run the test.com file in my XP Box command line.

Code: Select all

mov   ah,02
mov   dl,"!"
int   21h
mov   ah,04ch
mov   al,00
int   21h
thats all for today, i will be back.
i wish my blurly mind can be set to clear.
i appreaciate the help from anybody and be gentle with me. i am kinda new in this area.

May God bless you, me, and all of us.
alone in the dark rough wave middle of the pacific ocean. God, i understood, i am your tiny servant.

:) see u all.
anubis

Re:Noob / Newbie in OS development.

Post by anubis »

jimson wrote: 1. i understood, to develop an operating system, one should know ASM (assembler language). am i right.
That is i think a must. Cos at the lowest level u need to know abt atleast how to program the hardware. Not that there are tools to do it, but becos u r writing u own OS u donot have all higher level tools just available for ur OS. :D
jimson wrote: 2. can we program the OS fully in ASM code only. Not C and C++ or whatsoever other languages?
Yes many OS have been truly just ASM. MS-DOS itself was in pure assembly.
jimson wrote: 3. assume we will stick with ASM and my goal is to produce a 16-bit OS. Does it easily for me to change to 32-bit OS once i completed my task in developing a 16-bit OS?
Some part of the OS namely the bootloader always remain 16-bit. Other parts like the kernel may be 16/32 bits .Though in case of x86 based pcs due to Protected mode switch in 32 bits its always somewhat hard to switch from 16 to 32 bits cos most of the code u will have to change from 16 to 32 bits except i think the bootloader.:D
jimson wrote: 4. some of the assembler i saw from the internet, A86 and NASM. Should i use A86 or NASM?
Thats a personal choice though i preffered NASM cos i needed it so that i could recompile my code both on windows and linux.
jimson wrote: 5. i read through the Assembler book, and found out there are two type of Interrupt, BIOS and DOS Interrupts. can anyone please explain to me these two. Does the DOS interrupts means the MS-DOS interrupts that only available when running our program in MS-DOS.? eg. 21h
That is exactly true DOS interrupts r only available for DOS(Btw: DOS based interrupts are spiced up version of the basic BIOS interupts).When u try using them directly in ur OS they can give crazy results cos u have assumed them to be there and they r not infact there so u will be most probably jumping to a unknown memory region. Use 10h for results u wanted from 21h.
jimson wrote: 6. i wrote an asm file and assembled it using A86. The generated file is test.com which will print a "!" character when i run it from command line. I rawrite / fdimage the file into a diskkete and i set my BIOS to boot from A: The result after the drive a floppy is booted(or not?) no "!" character was found in the screen. Can anyone please explain to me whats went wrong. and why no "!" in the screen where i do see "!" when i run the test.com file in my XP Box command line.
Basically i think there r two flaws to ur program. As u see that u r calling a DOS interupt, so it wont work. Another i suppose is r u writing the program to the sector 0 of ur floppy. If not it wont work. That is because after the POST operation done by the BIOS for peripherals integration(all that u see when u switch the comp on) the computer will try to load the file stored at sector 0 from the first bootbale drive if not it will try the second boot device and so on. So it is essential to store ur file on the sector 0.
jimson

Re:Noob / Newbie in OS development.

Post by jimson »

first, i really thank you for your reply. Thank you very much. i am byte confuse in your statement.


Another i suppose is r u writing the program to the sector 0 of ur floppy. If not it wont work


so, u mean fdimage or rawrite tools won't write our program into the sector 0 of our floppy?
i thought fdimage and rawrite will do so.

if what i thought is wrong, can you please show me (maybe simple way) to write into sector 0.

and i wish to verify my understanding.
from your explanation about 2 types of interrupts,
i wish to confirm, does it mean if i using the BIOS interrupts ONLY, assemble it, and write it into the sector 0 of floopy disk, boot the floopy and i will see the "!" character.


thank you in advance.

May God bless you.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:Noob / Newbie in OS development.

Post by Solar »

Slightly off-topic question... why is everybody using "u" instead of "you" and "r" instead of "are"? It makes reading difficult...

My suggestion on assembler... I really never understood the obsession of people with NASM. Just about every example you see on the web assumes NASM. People are using ld as a linker and gcc as compiler, but when it comes to assemblers they just forget about 'as' (the GNU assembler) and go for NASM...

As for your missing "!"... you might want to check out the thread ".:QuickLinkz:. <-- read this before you post!"...
Every good solution is obvious once you've found it.
jimson

Re:Noob / Newbie in OS development.

Post by jimson »

even the bot also understood u == you and r == are... you aren't bot? :)

i ask for assembler suggestion because i wish to know what assembler that could let me busy for long run and i don't have to change the assembler although the future needs increase. I suppose nobody here will recommend me to try MASM.. am i right?

my comment about the .:QuickLinkz:.
there are about (+-) 20 links inside that particular thread, pressing the links will resulted thousand of links and Solar, could you please specify to me which link exactly i should read through.

i am kinda new in these area. i am still in the learning process. Just wish peeps here will guide me. and thank you in advance.
suhmaamiar

Re:Noob / Newbie in OS development.

Post by suhmaamiar »

for question 6, please check your mail :)
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:Noob / Newbie in OS development.

Post by Solar »

jimson wrote: even the bot also understood u == you and r == are... you aren't bot? :)
No, I am German, and English is foreign language for me (as for about 90% of the world's population). It requires concentration to read foreign language, and it requires more concentration to read slang. You write a text but once, but dozens others have to read it. Is it really that hard to write correctly?
i ask for assembler suggestion because i wish to know what assembler that could let me busy for long run and i don't have to change the assembler although the future needs increase.
See? I had to read that sentence three times to make sense of it. That's hardly motivating me to answer it.

From experience I can say that it is nearly impossible to write a solid and expandable system if it is the first program you write in a particular language, no matter how many other languages you already know.

I would strongly suggest you write a "prototype" first, trying out things, not caring too much for stability or expandability (just get it to run), and build experience.

You will be able to answer most of your questions yourself, then.
my comment about the .:QuickLinkz:.
there are about (+-) 20 links inside that particular thread, pressing the links will resulted thousand of links...
A good thing that there is so much information readily available, isn't it? ;-)
...and Solar, could you please specify to me which link exactly i should read through.
You're basically asking to search for your information, i.e. doing your work.

One glance at the #1 posting in that thread shows me a section "Don't know where to start?", with a link "#2: print" and "#4: VRAM". Have you checked those?
i am kinda new in these area. i am still in the learning process. Just wish peeps here will guide me. and thank you in advance.
It's not like I have written a dozen kernels myself.

We are guiding you. The links in the thread above will probably answer not only your current question, but many more yet to come. Such tutorials and link lists have been put together so that people don't have to answer the same questions over and over again, but can instead spend their time on answering new questions.

When you come up with a question, consider the posibility of your problem not being addressed in a FAQ or tutorial. Do a Google search. Try a different approach. Read http://www.catb.org/~esr/faqs/smart-questions.html. Then ask others how to do it.

Sorry if I don't come across like being very helpful. I just hope that you will realize that those tutorials, FAQs and link lists are the best help one can give to a newbie. :-[
Every good solution is obvious once you've found it.
Tim

Re:Noob / Newbie in OS development.

Post by Tim »

jimson wrote: even the bot also understood u == you and r == are... you aren't bot? :)
Solar is right. I'm English, and even I have trouble reading your posts. Over hunreds of years people have become accustomed to reading sentences with correct spelling, grammar and capitalisation. You make it harder for people to help you, and you make yourself look stupid.

OK, rant over. :)
i ask for assembler suggestion because i wish to know what assembler that could let me busy for long run and i don't have to change the assembler although the future needs increase.
OK, this sentence doesn't make any sense. "could let me busy"? You're missing a verb there somewhere.
I suppose nobody here will recommend me to try MASM.. am i right?
I'll recommend MASM. It's freely available, very well supported (both my Microsoft and others), and has been around for years. NASM is open source, but it's far less mature than MASM.
jimson

Re:Noob / Newbie in OS development.

Post by jimson »

hi, first, thank you for all replies. all are helpful towards my understanding.

Tim, i admit, i am a stupid. i am a stupid who wish to learn something because that is the only way to move from stupid to not stupid. :)

i apologise for my poor way of grammar, unstructured sentence and perhaps some slang i borrow from the internet. Anyway, your guys are not the ONLY persons who comment my language style, they called me "Yoda" ..here... ;)

http://www.phpbuilder.com/board/showthread.php?s=&threadid=10244727&highlight=yoda

well, i am a FAQ reader and writer therefore i understood the feeling of answering simple question that usually the answer is already inside the FAQ or RTFM, STFG or STFW.

i started this thread particularly because i don't know where i am now. Of course the FAQ had information about VGA, MOUSE, KEYBOARD and so on but it will be not logic for me to read and understand those information now simply because i am still a beginner stage. (kindergarden stage)

maybe a question like this -> "i don't know what should i know in order to proceed" <- will help you all to guide me.

of course, i understand, the best thing is to know all, but it will be impossible for me to understand so much information in short time. Or does it necessary for me to understand so vast information in order to put a character "!" in the screen. I scare it will complicate my logic mind and make the learning process more complex in the future.

to Suhmaamiar :
i just checked my mail, nothing new there. :(

i appreciate the help from all and thank you.
may God bless you all, me and all of us.
Tim

Re:Noob / Newbie in OS development.

Post by Tim »

jimson: I'm not calling you stupid. You could be the cleverest person in the world, but by writing like you were doing, nobody would know. People would just dismiss you: "if he can't take the time to form proper sentences, how can he hope to write an OS?!"

Anyway... a good starting point is the FAQ at this site: http://www.mega-tokyo.com/os/os-faq.html. Once you've got an idea of the concepts involved, the tutorials at http://osdev.neopages.net/ should fill in a few of the details.
jimson

Re:Noob / Newbie in OS development.

Post by jimson »

thanks to all.

to Suhmaamiar :
yup, received your IM.. thanks
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:Noob / Newbie in OS development.

Post by Solar »

jimson wrote: i started this thread particularly because i don't know where i am now. Of course the FAQ had information about VGA, MOUSE, KEYBOARD and so on but it will be not logic for me to read and understand those information now simply because i am still a beginner stage. (kindergarden stage)
In that case, perhaps you would be better off starting with a tutorial on assembly... try a google search for "The Art of Assembly". That should bring you up to speed in most areas.

(Anyway, if you are at "kindergarten stage", don't you think you should try something less complex than an operating system?)
Every good solution is obvious once you've found it.
jimson

Re:Noob / Newbie in OS development.

Post by jimson »

hi,
i am not a programming / computer science student.
almost all the knowledge i acquired today is self learn or browsing internet.

i still remember the first day i got my first computer "acer aspire (desktop)". i can't sleep that night. anyway acer is a lousy computer.

2 days after i run the computer, i had to reinstall the VGA driver back. (it took me several days to figure out how to do that, i don't have the access to internet that time)

1 year latter,

in the year of 1998, (if i remembered corectly) i bought a modem and signed up an account with local sucks ISP. and in that end of particular year, i picked up HTML (markup language).

i was sent to a univerisity in the year of 1999.
i change a lot in that 4 years bachelor programme....
(if you wish to know, try visit the threads in phpbuilder)

....ah.... i don't really have much history to tell...
(Anyway, if you are at "kindergarten stage", don't you think you should try something less complex than an operating system?)
solar, that is a smart question... ;)
i think already
still don't know how to provide you with a smart answer.

May God bless you, me and all of us.
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:Noob / Newbie in OS development.

Post by distantvoices »

Nay... I wouldna blame jimson for his sloppy use of language for I am doomed to screwing up sentences in a often queer way. That mostly comes when one sleeps less and drinks too much coffee. Nevertheless, this "u" and this "r" are merely phonetic abbreviations of real short words not needing any shortening.

Sometimes I fall in american slang because I 've spent some time in america and the western slang did kinda impact on me. Furthermore I am training my english continuously by reading english books of any flavour - recently I've got Harry Potter V in my claws and I have to admit I've devoured it. My gf had to deprive me of it literally - and I am spoiled by that slang, stephen King f. ex. uses. Oh Gosh!

Now to jimson not being a programming/computer science student: Nor am I. I have of course attended an evening study here in vienna in the magnificient spengerburg (that's the place where I've studied), but I earn my living (don't know whether that's right said this way) by programming. At home I do os-brewing without hop and malt - kinda chilling hobby this is ;) and no, there is no alcohol. You learn most of programming art by self study due to the existence of tricks no teacher can/will tell you.

Here, you are expected to do research prior to asking in most cases, because browsing the internet or even some sites indicated in the quick linkz section reveals secrets of uttermost importance. what i want to say is just this: scientific manner of working includes: forming a problem - research for facts about the problem in question - understand the information acquired - deduce a solution from the information - test the solution and document it. If you despite the fiercest research haven't managed to understand either the problem or the info collected, you can without problem ask other people for help, telling them what you have done to solve your matter. It shows them that you are not any silly walkaboutandask but one to whom respect is due.

this were just my screwed-up-sentences about that matter. And no, I am no nice guy. And yes, maybe a sentence-cleanup could ease reading my stuff - but I am on coffee and less sleep than neccessary now. *bigbigyawn* - no no please don't frown at me for yawning.

yours sincerely and with many bows and thanks for your indeed magnificient audience
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
Tim

Re:Noob / Newbie in OS development.

Post by Tim »

beyond infinity wrote:recently I've got Harry Potter V in my claws and I have to admit I've devoured it.
I've just got to the part where the person dies...
Post Reply