Introduction to Linux Intel Assembly Language
heather.cs.ucdavis.edu
Introduction to Linux Intel Assembly Language
1–9 of 9 posts
Re: Introduction to Linux Intel Assembly Language
#2Re: Introduction to Linux Intel Assembly Language
#3I thought, for a moment, that there was a dialect of assembly language in some way related to the kernel.
(They both suck, by the way. Just in different ways.)
Re: Introduction to Linux Intel Assembly Language
#4It's like using an Intel compiler that's bundled with a ntel syntax assembler and then coding your assembly in using gas. This is just more work.
Why not just use an assembler that uses Intel syntax? Because you like extra percent signs, a different order of operands, etc.? These are small differences.
What do you achieve by using an Intel syntax assembler? A few small sytanctical differences? Some small differences in macro facilities? Assembly language does not have heaps of abstraction. That's the whole point of using it. A machine instruction has only one form. It's a number.
So why do we need multiple assembly language syntaxes?
Maybe some people just like extra work. Let's write a new language just for fun. Let's change some syntax just for fun. Let's fix something that's not broken, just for fun, ignoring all the things have remained broken and unfixed year after year.
Re: Introduction to Linux Intel Assembly Language
#5I've never understood why people fight against AT&T/gas syntax when they're using gcc and therefore gas to do C compiling. It just creates extra work to have to switch back and forth between two assembly syntaxes. It's like using an Intel compiler that's bundled with a ntel syntax assembler and then coding your assembly in using gas. This is just more work. Why not just use an assembler that uses Intel syntax? Becaus…
There are here for historical reasons, I suppose. Nobody wants to have two assembly syntaxes, but now that we have them, everyone wants his syntax of choice to be the only one.
I learned assembly 10 years ago with the Intel syntax (actually, I wasn't even aware that there was another syntax until recently), and I really dislike the AT&T syntax. So what do I do now? Learn another syntax, or just fight against it?
So, there's no way to get rid of one syntax in favor of the other... The perfect solution would be to have a tool to translate automatically from one to the other.
Should be possible, what do you think?
Re: Introduction to Linux Intel Assembly Language
#6I've never understood why people fight against AT&T/gas syntax when they're using gcc and therefore gas to do C compiling. It just creates extra work to have to switch back and forth between two assembly syntaxes. It's like using an Intel compiler that's bundled with a ntel syntax assembler and then coding your assembly in using gas. This is just more work. Why not just use an assembler that uses Intel syntax? Becaus…
Re: Introduction to Linux Intel Assembly Language
#7I've never understood why people fight against AT&T/gas syntax when they're using gcc and therefore gas to do C compiling. It just creates extra work to have to switch back and forth between two assembly syntaxes. It's like using an Intel compiler that's bundled with a ntel syntax assembler and then coding your assembly in using gas. This is just more work. Why not just use an assembler that uses Intel syntax? Becaus…
Re: Introduction to Linux Intel Assembly Language
#8I thought, for a moment, that there was a dialect of assembly language in some way related to the kernel.
There sort of is. The kernel is one of the few places where gas is assumed and AT&T syntax prevails. Tutorials for "x86 assembly" in general almost always use the incompatible Intel syntax. (They both suck, by the way. Just in different ways.)
Re: Introduction to Linux Intel Assembly Language
#9I've never understood why people fight against AT&T/gas syntax when they're using gcc and therefore gas to do C compiling. It just creates extra work to have to switch back and forth between two assembly syntaxes. It's like using an Intel compiler that's bundled with a ntel syntax assembler and then coding your assembly in using gas. This is just more work. Why not just use an assembler that uses Intel syntax? Becaus…
> So why do we need multiple assembly language syntaxes? There are here for historical reasons, I suppose. Nobody wants to have two assembly syntaxes, but now that we have them, everyone wants his syntax of choice to be the only one. I learned assembly 10 years ago with the Intel syntax (actually, I wasn't even aware that there was another syntax until recently), and I really dislike the AT&T syntax. So what do I do…
With macros, it would be completely impractical to do in the general case, considering the disparity between the macro systems of different assemblers (gas with the C preprocessor, nasm, etc. with their own macro systems).