Linked by Thom Holwerda on Mon 6th Aug 2012 21:50 UTC, submitted by iseyler
General Development I asked for more of this, and I got it. "There has been much interest in assembly lately (whether the real 6502, or the fictional DCPU-16; I even created my own virtual 8-bit CPU called i808 in 2007), but none of this attention focuses on the architecture that is most popular in today's computers. If you are reading this on a desktop, laptop, or server then your computer is most likely using x86-64 (or x86). x86-64 is the 64-bit superset of the 32-bit x86 architecture and any modern CPU from AMD or Intel supports it. This document will focus on the most used parts of x86-64."
Thread beginning with comment 530026
To read all comments associated with this story, please click here.
by WereCatf on Tue 7th Aug 2012 06:54 UTC
Member since:

"This document will focus on the most used parts of x86-64", really? All the opcodes in that "document" are standard ones that've been around since 8088, the only x86-64 - specific thing about it is the registers the author is using. As such the title is terribly misleading, it's more like a very low-key introduction to x86 assembly.

I was disappointed, actually, I was expecting the article to demonstrate some real x86-64 - specific things. Note that I am not berating the article itself as it was clear and concise, it's just that it shouldn't be called x86-64 assembly when it really isn't that.

Reply Score: 7

RE: Uh?
by Mrokii on Tue 7th Aug 2012 08:40 in reply to "Uh?"
Mrokii Member since:

I would agree. This seems to be nothing but a (far too rough) overview.

Having said that, are there good real world examples for x64-64-assembly programming? As in: something one can use as a starting point for writing apps?

And the next question: Apart from learning more about the internals of the CPU, is there a good reason to learn assembly language at all these days if one just wants to develop regular apps/utilities? In my case for Linux/Ubuntu/Gnome...

Reply Parent Score: 1

RE[2]: Uh?
by Neolander on Tue 7th Aug 2012 09:04 in reply to "RE: Uh?"
Neolander Member since:

For regular apps and utilities, probably not. Nowadays, I'd say that Assembly snippets only makes sense for low-level code (like OS kernels and drivers), down and dirty security exploits, and software where one really wants to get the most performance out of hardware at all costs (like video codecs).

As an everyday programming language, it just makes it too hard for developers to organize themselves well.

Edited 2012-08-07 09:06 UTC

Reply Parent Score: 3

RE[2]: Uh?
by jessesmith on Tue 7th Aug 2012 13:38 in reply to "RE: Uh?"
jessesmith Member since:

I think learning a little Assembly is a good idea. Not because you're likely to use it, but because it gets you thinking about how the machine works, what it is good at and what takes a long time. Once you've coded a few things in Assembly you get a better appreciation for what your (higher level) code is doing. I certainly found learning Assembly got me into a better mindset for writing in other languages, especially C/C++.

Quite often developers, especially high level language developers, will just throw complex or repetitive code at a problem without thinking about how it works, why it will be slow or how it might be improved. Learning Assembly and how it works can help you develop better approaches to your coding elsewhere.

Reply Parent Score: 3

RE[2]: Uh?
by moondevil on Tue 7th Aug 2012 15:55 in reply to "RE: Uh?"
moondevil Member since:

Apart from learning more about the internals of the CPU, is there a good reason to learn assembly language at all these days if one just wants to develop regular apps/utilities? In my case for Linux/Ubuntu/Gnome...

If you even plan to develop:

- drivers;
- operating systems utilities;
- games;
- compilers (either ahead-of-time or JIT based);
- audio or video codecs;
- develop applications that need to run in embedded systems
- numeric code for statistics like FFT
- optimization of code compreension

Than knowing Assembly is really a must.

If you spend you time developing code in languages with native code generation (C, C++, FreePascal, D, Go), or using V8, compatible JVM or CLR then Assembly is important to understand how the high-level algorithms influences the generated Assembly.

Because you can ask to see the generated Assembly and then compare it with the algorithm.

Knowing Assembly makes it also easy to know how to manipulate JVM bytecode or MSIL, and with it perform low level meta-programming. This is how Aspects work, for example.

Another example is how Qt 5 will make use of SIMD instructions to do perform encoding conversions,

Reply Parent Score: 2

RE: Uh?
by paolo on Tue 7th Aug 2012 13:07 in reply to "Uh?"
paolo Member since:

"the most used parts of x86-64"

opcodes...that've been around since 8088

These two statements are not necessarily mutually exclusive I fear ;)

Edited 2012-08-07 13:07 UTC

Reply Parent Score: 2