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 530046
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE: Uh?
by Mrokii on Tue 7th Aug 2012 08:40 UTC in reply to "Uh?"
Mrokii
Member since:
2011-01-04

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:
2010-03-08

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[3]: Uh?
by Mrokii on Tue 7th Aug 2012 15:33 in reply to "RE[2]: Uh?"
Mrokii Member since:
2011-01-04

Doesn't sound like something I'd like to dive in. Though I'd find microprocessor programming intriguing, which I did shortly in some school.

Reply Parent Score: 1

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

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[3]: Uh?
by Mrokii on Tue 7th Aug 2012 15:37 in reply to "RE[2]: Uh?"
Mrokii Member since:
2011-01-04

I have learned a bit of assembly programming many years back in a school (for some kind of primitive microprocessor) and kind of liked assembly language. And I've owned computers long enough to know a bit about the internals (C64 was my first), so there is probably no good reason to re-learn assembler programming if there's no real advantage over using regular programming languages.

Reply Parent Score: 1

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

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,
http://woboq.com/blog/utf-8-processing-using-simd.html

Reply Parent Score: 2

RE[3]: Uh?
by ilovebeer on Tue 7th Aug 2012 20:07 in reply to "RE[2]: Uh?"
ilovebeer Member since:
2011-08-08

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.

While being well-versed in asm can have advantages, saying it's a must for at least half the things you've listed is absolutely untrue.

Reply Parent Score: 3

RE[3]: Uh?
by Soulbender on Wed 8th Aug 2012 11:34 in reply to "RE[2]: Uh?"
Soulbender Member since:
2005-08-18

- drivers;

Depends on the OS and what hardware you develop the driver for.

- operating systems utilities;

I'm not sure exactly what you qualify as os utilities and why they would require assembler.

- games;

Depends on what kind of game. If it's a demanding FPS or something, yes. If not then probably no. No asm needed for using, say, PyGame, some other tookit or iPhone/Android games.

- develop applications that need to run in embedded systems

I doubt assembler is a hard requirement for this.

Reply Parent Score: 3