OSDev.org
https://forum.osdev.org/

Added old post to personal section for poss. update and add
https://forum.osdev.org/viewtopic.php?f=8&t=32597
Page 1 of 1

Author:  Schol-R-LEA [ Sat Nov 25, 2017 4:13 pm ]
Post subject:  Added old post to personal section for poss. update and add

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.

Author:  StudlyCaps [ Sun Nov 26, 2017 8:52 pm ]
Post subject:  Re: Added old post to personal section for poss. update and

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.

Author:  Solar [ Wed Nov 29, 2017 6:52 am ]
Post subject:  Re: Added old post to personal section for poss. update and

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>

Author:  Schol-R-LEA [ Wed Nov 29, 2017 8:42 am ]
Post subject:  Re: Added old post to personal section for poss. update and

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.

Author:  Schol-R-LEA [ Sat Dec 02, 2017 12:00 am ]
Post subject:  Re: Added old post to personal section for poss. update and

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.

Author:  StudlyCaps [ Sat Dec 02, 2017 3:14 am ]
Post subject:  Re: Added old post to personal section for poss. update and

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

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/