Places to go learn assembly?

15    28 Aug 2015 15:32 by u/JohnQCitizen

I'm sort of familiar with the syntax. I've used C for a long time, but never delved into assembly. I'm mainly just looking for some basic tutorial on x86 assembly, but my google-fu is failing me.

19 comments

7

You can learn assembly , but to truly understand it you should buy a kit with a dev board with limited memory and registers forcing you to think about the limitations of the hardware when you create your code.

0

All x86 computers have the same number of registers. It'd be better to emulate hardware instead of buying it anyways.

0

Doesn't x86 assembly imply an Intel brand chip with it's specific instruction set that is slightly different from an AMD cpu?

Isn't this a good idea if you have an AMD cpu? Are there a few different instructions between the Intel and AMD cpu chips when it comes to assembly? Or do the (free) assembly compilers take care of that?

1

The instruction set is specified in the specification for each architecture so all computers in the same architecture will have the same instruction set. This is why a single binary will work for both AMD and Intel computers.

0

Ok, so AMD and Intel cpus, of the same architecture, share a common instruction set. But isn't it also true that they both have a few instructions only for Intel or only for AMD cpus?

1

Apparently you're right. However, these changes only crop up when you're writing compilers or operating systems.

0

It makes a difference in speed once in awhile, too. For instance, last time I checked (maybe 8 years ago) the LOOP instruction only took one cycle on AMD but 18 or so cycles on Intel. And Intel is generally significantly faster with floating point.

1

Or you could just, you know, write a quick program to give you the usage stats on your code.

0

Someone new to assembly wouldn't know to do that. But i guess someone with C experience would.

5

Most of the tutorials on writing applications in asm from scratch out there were written quite some time ago.
So you get a lot of legacy info depending on what system you are programming for.
Nowadays you normally don't write assembly for x86 but rather read a disassembly of a binary where the same knowledge is needed.
OpenSecurity Training is a great resource for getting into reverse engineering and learning the basics.

For additional resources /u/Rostin 's link covers that.

3

I searched for 'x86 assembly tutorial' and got dozens of results, including for example this Stackoverflow question. I'm assuming you did, too. Maybe you could be more specific about what you're looking for, since you apparently weren't happy with any of those?

2

The x86 assembly wikibook walks you through basic assembly.

1

I know there are a lot of videos on assembly in youtube. I am far from an expert, and learned just enough to get my project done, but it was pretty helpful for me.

1

I always prefer books when learning new languages. I just went on a perusal on Amazon for about three hours honing in on a C# .NET book I wanted.

If you'd like a starting place, I rarely am anything but satisfied with the O'Reilly Media books.

EDIT: Also; looking for a BASIC tutorial, eh?

1

Google doesnt know x86 from its own ass. Intel has you covered. Hint: start at volume 3.

http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html

0

Not sure if this is the place, but the developers of SpaceChem also made a puzzle game where you code in assembly: TIS-100

After you get your feet wet a bit you can get a feel for it.

0

I'm currently enrolled in an x86_64 asm class. Two days in, and its so very complicated. Awesome for you wanting to learn! But good luck!

0

There is also a game called TIS-100 it is on steam and gives a fun way of learning assembly. http://store.steampowered.com/app/370360 it is currently $6.99.