Added old post to personal section for poss. update and add

All about the OSDev Wiki. Discussions about the organization and general structure of articles and how to use the wiki. Request changes here if you don't know how to use the wiki.
Post Reply
User avatar
Schol-R-LEA
Member
Member
Posts: 1925
Joined: Fri Oct 27, 2006 9:42 am
Location: Athens, GA, USA

Added old post to personal section for poss. update and add

Post by Schol-R-LEA »

A Brief Tutorial On Data Structures In Assembly Language is an old piece I wrote while studying MIPS assembly language (for a course I was taking). I wrote it to help out another student who was having trouble with the material, but I then posted a somewhat cleaned-up version to DevShed.

While it is a bit out of the general topic of OS dev, there are enough people coming to this site who, regardless of experience with other languages, have little or no experience with assembly language for the system they are targeting. While I am hesitant to add this to the main site, I think that posting it in my user space, and expanding it to cover x86 and ARM assembly (possibly using tabbed display panels to have several examples on a single page, as per my earlier question), might be worthwhile. I would like any advice anyone might have for improving this.

I am already thinking of adding a discussion on the built-in support for structures or records available in most real-world assemblers, and how that can differ from either that used in high-level languages, and the ad-hoc approach I described in the original essay (which was pretty much necessary when using SPIM, as the built-in assembler didn't have structs). I mean to keep that ad-hoc method as a way of explaining just what is going on under the hood, as it were (including presenting it in not only MIPS, but ARM and x86 as well, with separate examples in both Intel and AT&T syntax - the MIPS and ARM versions will be written for the GAS dialects of each), but then segue into describing how different assemblers do the same thing in their structure-related directives.
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
StudlyCaps
Member
Member
Posts: 232
Joined: Mon Jul 25, 2016 6:54 pm
Location: Adelaide, Australia

Re: Added old post to personal section for poss. update and

Post by StudlyCaps »

From my point of view, thanks for posting this! I had a read and while it wasn't totally new to me, it did actually help me understand some of the practical side of using stucts in assembly, which I've not really done (I boot straight into a C environment and stay there!)
I think assembly examples in x86 would be useful, though obviously it's up to you if you want to spend the time.
While not strictly OS dev, I think it's a worthwhile thing to have avaliable on here.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Added old post to personal section for poss. update and

Post by Solar »

I definitely think it's valuable enough to at least link from the Assembly page. With some massaging, it wouldn't fall behind anything on the main page either.

=D>
Every good solution is obvious once you've found it.
User avatar
Schol-R-LEA
Member
Member
Posts: 1925
Joined: Fri Oct 27, 2006 9:42 am
Location: Athens, GA, USA

Re: Added old post to personal section for poss. update and

Post by Schol-R-LEA »

OK, it sounds like this will be well worth adding to the main wiki, then. I will try to get it updated with parallel examples in x86 and ARM assembly, and extend it with some examples of struct/record directives for various assemblers.

Thank you both for your input. Its good to hear that I am on the right path with this.
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
User avatar
Schol-R-LEA
Member
Member
Posts: 1925
Joined: Fri Oct 27, 2006 9:42 am
Location: Athens, GA, USA

Re: Added old post to personal section for poss. update and

Post by Schol-R-LEA »

As a quick update, I have made some updates showing how I intend to show the same basic code for different architectures and assemblers. I only got through a few of them, but it should be enough to show how I mean to arrange them. Please take a look at it and tell me what they think of it.
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
StudlyCaps
Member
Member
Posts: 232
Joined: Mon Jul 25, 2016 6:54 pm
Location: Adelaide, Australia

Re: Added old post to personal section for poss. update and

Post by StudlyCaps »

Schol-R-LEA wrote:As a quick update, I have made some updates showing how I intend to show the same basic code for different architectures and assemblers. I only got through a few of them, but it should be enough to show how I mean to arrange them. Please take a look at it and tell me what they think of it.
Looks good to me, I like that you're including both GAS and NASM syntax
Post Reply