OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 7:21 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Added old post to personal section for poss. update and add
PostPosted: Sat Nov 25, 2017 4:13 pm 
Offline
Member
Member
User avatar

Joined: Fri Oct 27, 2006 9:42 am
Posts: 1925
Location: Athens, GA, USA
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.


Top
 Profile  
 
 Post subject: Re: Added old post to personal section for poss. update and
PostPosted: Sun Nov 26, 2017 8:52 pm 
Offline
Member
Member

Joined: Mon Jul 25, 2016 6:54 pm
Posts: 223
Location: Adelaide, Australia
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.


Top
 Profile  
 
 Post subject: Re: Added old post to personal section for poss. update and
PostPosted: Wed Nov 29, 2017 6:52 am 
Offline
Member
Member
User avatar

Joined: Thu Nov 16, 2006 12:01 pm
Posts: 7612
Location: Germany
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.


Top
 Profile  
 
 Post subject: Re: Added old post to personal section for poss. update and
PostPosted: Wed Nov 29, 2017 8:42 am 
Offline
Member
Member
User avatar

Joined: Fri Oct 27, 2006 9:42 am
Posts: 1925
Location: Athens, GA, USA
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.


Top
 Profile  
 
 Post subject: Re: Added old post to personal section for poss. update and
PostPosted: Sat Dec 02, 2017 12:00 am 
Offline
Member
Member
User avatar

Joined: Fri Oct 27, 2006 9:42 am
Posts: 1925
Location: Athens, GA, USA
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.


Top
 Profile  
 
 Post subject: Re: Added old post to personal section for poss. update and
PostPosted: Sat Dec 02, 2017 3:14 am 
Offline
Member
Member

Joined: Mon Jul 25, 2016 6:54 pm
Posts: 223
Location: Adelaide, Australia
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group