OSDev.org

The Place to Start for Operating System Developers
It is currently Mon Sep 16, 2019 10:36 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: Some suggested additions to the "wish list" page
PostPosted: Sat Mar 27, 2010 6:33 pm 
Offline

Joined: Sat Mar 27, 2010 2:15 am
Posts: 24
Hi all -

As a newcomer here, I have a few suggestions that I believe would be very useful in helping myself (and many others) to "fill in the gaps" in our knowledge of assembly-language programming.
This could possibly be put on either the wish-list page or the FAQ.

Below, I've tried to organise the questions in a hopefully sensible way. Any changes are welcome!
Here goes -

* Assembly language - an overview - the big picture. This would consist of at least the following three categories - Registers, "the stack" (explanation needed as to what that is), and commands.
Now, I'll take each one in turn.....

** Registers. Their names, what each one can be used for, any restrictions on their use.

** "The" stack / "a" stack. What is "A" stack? What is "THE" stack? ( The term "the stack" is used **often** in programming discussions, but **what exactly** does it mean? May be obvious to long-timers, but answers to these would be very useful to newcomers.)
** Why would I / should I use a stack?

** Commands (mnemonics) - the basics, and a few examples.

Although some of this may be available elsewhere, it would be really useful to have at least the above information all here in one place. It would give a good solid base for newcomers to assembly.
Bye for now -
- mooseman


Top
 Profile  
 
 Post subject: Re: Some suggested additions to the "wish list" page
PostPosted: Sat Mar 27, 2010 6:55 pm 
Offline
Member
Member

Joined: Sat Sep 29, 2007 5:43 pm
Posts: 127
Location: Amsterdam, The Netherlands
mooseman wrote:
* Assembly language - an overview - the big picture. This would consist of at least the following three categories - Registers, "the stack" (explanation needed as to what that is), and commands.

Each architecture has its own assembly language (e.g. PPC assembly is used for the PPC architecture, x86(-64) assembly is used for the x86(-64) architecture, etc.)

mooseman wrote:
** Registers. Their names, what each one can be used for, any restrictions on their use.

Their function and names differ from architecture to architecture. (e.g. r0-r15 are the registers on the ARM, but there are 32 in total; Intel has: ax, bx, cx, dx, sp, bp, ip, di, si, cs, ds, es, fs, gs, ss, cr0, cr2, cr3, etc.).

mooseman wrote:
** "The" stack / "a" stack. What is "A" stack? What is "THE" stack? ( The term "the stack" is used **often** in programming discussions, but **what exactly** does it mean? May be obvious to long-timers, but answers to these would be very useful to newcomers.)
** Why would I / should I use a stack?

http://wiki.osdev.org/Stack

mooseman wrote:
** Commands (mnemonics) - the basics, and a few examples.

The instructions differ from architecture to architecture as well (e.g. ARM has no div, PPC has lis (load immediate and shift), Intel has lgdt (load GDT)).

mooseman wrote:
Although some of this may be available elsewhere, it would be really useful to have at least the above information all here in one place. It would give a good solid base for newcomers to assembly.

There are various good resources for x86 assembly already, such as:
http://en.wikibooks.org/wiki/X86_Assembly
http://en.wikibooks.org/wiki/X86_Disassembly

If you want to know how to program in assembly for another architecture you should get the manuals for that architecture. I don't feel like anybody would ever write articles about all the assembly languages out there.


Regards,
Stephan J.R. van Schaik.


Top
 Profile  
 
 Post subject: Re: Some suggested additions to the "wish list" page
PostPosted: Sat Mar 27, 2010 9:07 pm 
Offline

Joined: Sat Mar 27, 2010 2:15 am
Posts: 24
Hi Stephan - thanks for all that -

Very good and helpful comments! My apologies too - I didn't see the page about the stack. I've just been there and it's very useful!

Thanks again - bye for now -
- mooseman


Top
 Profile  
 
 Post subject: Re: Some suggested additions to the "wish list" page
PostPosted: Sun Mar 28, 2010 10:16 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9284
Location: On the balcony, watching the Swedish Chef
I have one problem with the idea behind these suggestions:

mooseman wrote:
** "The" stack / "a" stack. What is "A" stack? What is "THE" stack? ( The term "the stack" is used **often** in programming discussions, but **what exactly** does it mean? May be obvious to long-timers, but answers to these would be very useful to newcomers.)
** Why would I / should I use a stack?


IMO the required knowledge/programming experience rule covers just this - If you do not know what a stack is you can not be a good programmer in any way. The stack is the one of the most basic data structures around. While I'm not planning to remove that article, there are some pages I wrote which I occasionally regret doing so for the sole reason it makes it easier for totally incompetent n00bs to start bugging me - just like the USB page (second largest on the wiki) is a likely cause for the recent spike of "HELP USB CONTROLER WROKS NOT" threads.

Are we about helping people developing an OS, or are we about teaching newbies what xor eax,eax does?

_________________
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]


Top
 Profile  
 
 Post subject: Re: Some suggested additions to the "wish list" page
PostPosted: Sun Mar 28, 2010 4:20 pm 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9284
Location: On the balcony, watching the Swedish Chef
osdnlo wrote:
Then why don't you go back and take them down? And, I find it very rude what you said about the USB threads. How dare you insult the members of this community who are currently writing a USB driver and also seeking help from other supposed developers here at this forum! No one has asked a stupid USB question at all, at least not since I have been here. And, none of them asked questions like how you mentioned, with misspelled words, all caps, and no one is as dumb as you just tried to make them look. And, I bet this is probably one of the reasons why you aren't a moderator anymore.

You know, if you don't like to help anyone, then why are you here? Why do you post replies? You go around with your dumbass bart simpson decal as if your so uber elite that no one should dare ask a question around you. You need to learn some common courtesy. Not everyone here speaks perfect english, so you cannot fault people on that. And, if your going to be insulting, at least be correct about doing so. You're just rude for no reason. At least when I am rude, I have a reason. You're just plain rude.

And, for all the guys who wrote this forum asking for help in regards to USB, I say this for us all: STFU COMBUSTER!!


So if you want to troll, fine

<rant>
OS development is about the hardest task ever. You need extremely good programming skills, you need extremely good problem solving skills, you need design skills and you need research skills. If you don't have them live is going to be really nasty since you'll depend forever on someone else's abilities to get somewhere.

So yes, if you have what it takes to develop an OS that isn't copy pasted from forum posts, you'll need to be able to investigate and develop on your own, and the same skills will allow you to find the answer to your question. So yes, a good OS developer doesn't need to ask questions. I haven't seen you doing it, and I haven't seen most mods asking questions over past year.

So instead I try to get people realize that they can best rely on their own skills. Or in the worst case, make them realize they will never have those skills.

As for USB, prior to that article, there were zero questions about it. Now there are several threads, each with a similar problem. They follow the instructions (or rather they bugged up some), and they come here and think everybody's an USB expert willing to solve their problem. Its like give a man a fish, and it will have food for a day. Teach a man to fish, and he can supply himself for a lifetime. What you are doing in the USB thread is the former, what I try to do is the latter. And unfortunately too many people are short-sighted enough not to see the value in that.
</rant>

EDIT: and so you must delete your post eh?

_________________
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]


Top
 Profile  
 
 Post subject: Re: Some suggested additions to the "wish list" page
PostPosted: Sun Mar 28, 2010 11:59 pm 
Offline
Member
Member

Joined: Sat Sep 29, 2007 5:43 pm
Posts: 127
Location: Amsterdam, The Netherlands
I am actually agreeing with Combuster here. The things you wanted to be added to the wiki have nothing to do with OS development but with learning how to program in Assembly, which is actually a requisite, in my opinion. All the answers I gave you were because I did research months ago (e.g. I read ARM, PPC, x86(-64) specifications, read the Wikibooks about x86, SPARC, MIPS Assembly, read several tutorials, etc.) as I needed to know assembly inside out as I'm writing my whole boot loader, kernel, drivers, etc. in assembly. Another requisite is thus to do research on your own and not just some, but a lot.


Regards,
Stephan J.R. van Schaik.


Top
 Profile  
 
 Post subject: Re: Some suggested additions to the "wish list" page
PostPosted: Mon Mar 29, 2010 12:10 am 
Offline
Member
Member
User avatar

Joined: Thu Nov 16, 2006 12:01 pm
Posts: 7412
Location: Germany
+1.

The OSDev FAQ (who still remembers the beginnings?) has been significantly expanded over the years, but in no way is it meant to be a beginner's tutorial. When presenting information for the OS developer, you have to assume that you are dealing with a competent software engineer, or you'd never see the end of it.

Taking the example of the stack, you have to know what a stack is and how it is used. The only thing we're feeling obliged to do is to explain how a stack works and how to implement it on the OS side.

Same with Assembler. Learning assembler is not the object of this site. There are many other sites about the subject. What they don't cover is the OS-specific part of it: GDT and IDT, bootloader stuff, how to switch to protected mode, the likes.

Taking what I've just written, you will realize that the OS Dev Wiki already goes way beyond the call of duty...

_________________
Every good solution is obvious once you've found it.


Top
 Profile  
 
 Post subject: Re: Some suggested additions to the "wish list" page
PostPosted: Mon Mar 29, 2010 1:39 am 
Offline
Member
Member
User avatar

Joined: Mon Jan 26, 2009 2:48 am
Posts: 792
+0.5 only, sorry.

Combuster, though you are right that knowledge like "what is a stack" is a prerequisite, the correct reply should be not "go learn programming before you come back here" but "here's a link to a good tutorial".

We could argue whether this kind of information should be in the wiki. Maybe we should establish what skills exactly are prerequisites, and what aren't.


Top
 Profile  
 
 Post subject: Re: Some suggested additions to the "wish list" page
PostPosted: Mon Mar 29, 2010 1:45 am 
Offline
Member
Member
User avatar

Joined: Thu Nov 16, 2006 12:01 pm
Posts: 7412
Location: Germany
Getting Started / Required Knowledge??

_________________
Every good solution is obvious once you've found it.


Top
 Profile  
 
 Post subject: Re: Some suggested additions to the "wish list" page
PostPosted: Mon Mar 29, 2010 2:02 am 
Offline
Member
Member
User avatar

Joined: Mon Jan 26, 2009 2:48 am
Posts: 792
Solar wrote:
Got me there! I meant however, a set of criteria of what should be in the wiki and what shouldn't, and to point newcomers to. I mean something more practical than "How to ask smart questions", how useful that may be. For a newbie it may not be directly clear why knowing assembly language is a preriquisite and knowing privilige levels isn't.

Roel


Top
 Profile  
 
 Post subject: Re: Some suggested additions to the "wish list" page
PostPosted: Mon Mar 29, 2010 2:40 am 
Offline
Member
Member
User avatar

Joined: Thu Nov 16, 2006 12:01 pm
Posts: 7412
Location: Germany
I attempted a first weak writeup at Beginner Mistakes / What this is NOT. Feel free to modify / extend / move / remove.

_________________
Every good solution is obvious once you've found it.


Top
 Profile  
 
 Post subject: Re: Some suggested additions to the "wish list" page
PostPosted: Mon Mar 29, 2010 3:40 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9284
Location: On the balcony, watching the Swedish Chef
Nice one =D>

_________________
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]


Top
 Profile  
 
 Post subject: Re: Some suggested additions to the "wish list" page
PostPosted: Tue Mar 30, 2010 12:36 am 
Offline
Member
Member
User avatar

Joined: Tue Mar 06, 2007 11:17 am
Posts: 1146
It's true that the contents of the wiki and most of the forum posts cannot be understood by someone who knows nothing more than browsing Internet and installing media players, antivirus, etc.

But also, I think that a true seasoned OS developer would rarely come here, I doubt that such an individual would ever ask a question (if they already work and earn a living in developing something like Windows core components, or any UNIX variant in a serious way).

They could come here to answer some things here and there, but I don't see how a professional OS engineer could have a real need to be in a website that talks about things below of what they already do daily.

In other words, it looks like we all are here on our own to a certain point (in the sense that we won't very probably ever see an industry's OS developer sharing willingly key industry knowledge and efficient methods of approaching problems, even when those are "generic" things not subject to a non-disclosure contract), and that's not possible to change.
-----------------------------------------------------------------

In any case, personal research is always required, looking for any topic. Generally a wealth of basic functional knowledge can be found outside osdev.org (seemingly most of it), and it actually is far more productive to consult and understand those external resources, instead of trying to get it by asking more than what is reasonable for a period of time in this forum.

As much as developing USB drivers in this current time, I guess how were things when there didn't exist any ATA/ATAPI or VGA sample code and/or tutorials. Something had first to research, find, understand and share. That's the result of dedicated, diligent personal research, as well as an attitude of freeing the knowledge, and just like those "old" things are now widely known, I am confident in that, with time and in the same way, samples and good information for things like SATA, USB, multicore processors and other new things will be found for anyone willing to read and do all it takes to achieve that progress.

Without that research made by each one of us, even the wiki and the posts in this forum will stabilize to a point where they won't cover much more or anything new or worthwhile, additional to what is already covered.

_________________
http://190.53.3.113/api (My OS compatible with DOS)

(udocproject@yahoo.com)
-----------------------------
IP for hosts file (all domains):
190.53.3.113 api.exe


Top
 Profile  
 
 Post subject: Re: Some suggested additions to the "wish list" page
PostPosted: Sun Apr 04, 2010 7:39 pm 
Offline
Member
Member
User avatar

Joined: Mon Jun 05, 2006 11:00 pm
Posts: 2000
Location: USA (and Australia)
Assembly language and basic C is assumed knowledge on this website, so what would be better would be a link to an Assembly tutorial from the OSDev Wiki. OSDev != Assembly language even if a lot of members are using assembly to develop their OS. Much the same way the Wiki isn't going to be filled C tutorials because C is also a popular OSDev language.

mooseman wrote:
** "The" stack / "a" stack. What is "A" stack? What is "THE" stack? ( The term "the stack" is used **often** in programming discussions, but **what exactly** does it mean? May be obvious to long-timers, but answers to these would be very useful to newcomers.)
** Why would I / should I use a stack?


Computer Science 101..

Try writing a program in assembly without a stack. Have a subroutine in another part of your code that you call many times. Your subroutine uses registers (for local variables) that your main code also uses, so you must temporarily store them in memory. Soon you'll think it's a waste for every subroutine to have statically allocated space to put the registers to save in, what about if you called the function recursively, the old saved values would be overwritten? How can you solve this problem? You will be enlightened.

_________________
My OS is Perception. (1 2)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group