#### Archived

This topic is now archived and is closed to further replies.

# Inline assembler...

This topic is 5618 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I was wondering are there any sites that actually specify in showing tutorials on assembler but instead of using assembler with assembler compilers like Masm ect But rather teach it for inline C++ assembly? I think this could be useful cuz its somewhat different the normal assembler beccause its inline lol and like u can do things like do int var=5; ect and use it in the assembler. I dunno its just I wish there was a place i could learn assembler as INLINE assembler vs learning it as normal assembler ive done the normal assembler ones but there are a few small differences that i wish a site could explain.

##### Share on other sites
I know of two such sites - however - they both use AT&T syntax (aka GAS) and not Intel syntax which is what would be used with MSVC.

Brennan''s Guide to Inline Assembly

Assembler with LCC-Win32

At the moment I''m working up a better explanation for the NT version of the self deleting executable example found at this second page. It''s amazing how many words it takes to explain how such a small amount of code does what it does. The explanation that is there now just isn''t suitable - and actually doesn''t even touch on the neatest aspects of the code at all! I should have it completed in a few hours.

Hmm, it looks like those sites use a variation on AT&T syntax, because GAS for Solaris doesn''t have some of their restrictions (eg, prefixing immediate values/constants with ''$''). On the other hand, I always use the macro processor so maybe I''m talking out my derriere... #### Share this post ##### Link to post ##### Share on other sites Do you know of any others or only ones with that type of syntax its fine if you don''t but it would be helpful if someone did . #### Share this post ##### Link to post ##### Share on other sites quote: Original post by Oluseyi Hmm, it looks like those sites use a variation on AT&T syntax, because GAS for Solaris doesn't have some of their restrictions (eg, prefixing immediate values/constants with '$'). On the other hand, I always use the macro processor so maybe I'm talking out my derriere...

Heh, that's a pleasant way of turning that phrase. Um, I don't know actually. Brennan describes is as AT&T. I've seen AT&T referred to as GAS before (GNU Assembler) so I added that bit myself. John doesn't describe the lcc asm as AT&T but I've seen it described that way in other lcc related documents. Both of those compilers are x86 specific - but I don't see how that would make a difference as far as Solaris goes, but maybe so. Different chips use different mnemonics. // edit: according to the snippets on this page: SPARC assembler/disassembler source code - it does appear that no prefix is needed for immediate values on Sparcs running NetBSD - so why not also on Sparcs running Solaris?

Here's a pretty good list of linux based assembly links UNIX assembly programming related resources.
This page led me to the Intel2Gas project which I've ported to windows. At least I managed to get it to compile, but then I had to set it down to take care of other things. I hope to return to it soon.

//

DLK - Sorry those are the two most comprehensive tuts that I've found. There are two Matt Pietrek articles in the MSDN mag archives related to assembly language - perhaps you might be able to ferret a few inline tips out of them.

[edited by - lessbread on October 2, 2002 2:06:48 PM]