Page 1 of 1

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

Posted: Sat Nov 25, 2017 4:13 pm
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.

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

Posted: Sun Nov 26, 2017 8:52 pm
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.

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

Posted: Wed Nov 29, 2017 6:52 am
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>

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

Posted: Wed Nov 29, 2017 8:42 am
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.

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

Posted: Sat Dec 02, 2017 12:00 am
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.

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

Posted: Sat Dec 02, 2017 3:14 am
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