Some suggested additions to the "wish list" page

Questions, comments, and suggestions about this site should go here.
Post Reply
mooseman
Posts: 24
Joined: Sat Mar 27, 2010 2:15 am

Some suggested additions to the "wish list" page

Post by mooseman »

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
StephanvanSchaik
Member
Member
Posts: 127
Joined: Sat Sep 29, 2007 5:43 pm
Location: Amsterdam, The Netherlands

Re: Some suggested additions to the "wish list" page

Post by StephanvanSchaik »

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.
mooseman
Posts: 24
Joined: Sat Mar 27, 2010 2:15 am

Re: Some suggested additions to the "wish list" page

Post by mooseman »

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
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Some suggested additions to the "wish list" page

Post by Combuster »

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 ]
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Some suggested additions to the "wish list" page

Post by Combuster »

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 ]
StephanvanSchaik
Member
Member
Posts: 127
Joined: Sat Sep 29, 2007 5:43 pm
Location: Amsterdam, The Netherlands

Re: Some suggested additions to the "wish list" page

Post by StephanvanSchaik »

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.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Some suggested additions to the "wish list" page

Post by Solar »

+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.
User avatar
qw
Member
Member
Posts: 792
Joined: Mon Jan 26, 2009 2:48 am

Re: Some suggested additions to the "wish list" page

Post by qw »

+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.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Some suggested additions to the "wish list" page

Post by Solar »

Every good solution is obvious once you've found it.
User avatar
qw
Member
Member
Posts: 792
Joined: Mon Jan 26, 2009 2:48 am

Re: Some suggested additions to the "wish list" page

Post by qw »

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
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Some suggested additions to the "wish list" page

Post by Solar »

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.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Some suggested additions to the "wish list" page

Post by Combuster »

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 ]
User avatar
~
Member
Member
Posts: 1226
Joined: Tue Mar 06, 2007 11:17 am
Libera.chat IRC: ArcheFire

Re: Some suggested additions to the "wish list" page

Post by ~ »

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.
YouTube:
http://youtube.com/@AltComp126

My x86 emulator/kernel project and software tools/documentation:
http://master.dl.sourceforge.net/projec ... 7z?viasf=1
User avatar
AndrewAPrice
Member
Member
Posts: 2298
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Re: Some suggested additions to the "wish list" page

Post by AndrewAPrice »

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.
Post Reply