Added old post to personal section for poss. update and add
Posted: Sat Nov 25, 2017 4:13 pm
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.
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.