Lurker News
I've found lots of resources for x86, but considerably less for x64. Pentester Academy has a promising course on it, along with shellcoding, but I'm not sure what else is out there.

Comments (109) 44 threads

Earlier comments
moggi#
Especially if you need x64 assembly for performance optimization or during profiling a combination of godbolt (https://godbolt.org/) and Agner Fog's incredible PDFs at https://agner.org/optimize/ (especially parts 2, 3 and 4) are helpful.

The other useful step has been to write C functions and compile the code with a good compiler (good experiences with Intel, gcc and llvm) first at -O0 and later at -O2 or -O3 to understand how high level concepts can be translated to assembly.
This requires to have at least a basic understanding of registers and basic assembly concepts but at least has helped me apply the concepts to real code.

tony_codes#
I wrote a guide a while back that may help. It includes a docker container setup to enable debugging via VS code: https://tonycodes.com/assembly
vnorilo#
Your sources indicate an interest in reverse engineering, but another motivator for low level machine programming is performance.

For me, a great way of learning the latter is to pick a task with some instant gratification (audio dsp, software texmapping or shaders?) and start writing some of that in inline assembly.
I suggest looking at your C compiler output, learning about SIMD instructions and using a pipeline simulator to see why and how it performs like it does. I used VTune and AMD Codeanalyst back in the day, don't know what's the current SoA.

asveikau2 replies#
I agree with this, if you are competent at 32-bit those skills are going to translate. It is mostly the same.

Some exceptions that come to mind:
* The old floating point stuff is gone. EDIT: guess I am wrong on that, was thinking of what compilers typically generate for the architecture.
* The C abi now tends to focus on pass-by-register for the first few arguments.
* If you are working in kernel mode, some stuff is going to necessarily look different.

acqq#
> * The old floating point stuff is gone.

It actually can be used, if you write by hand, at least in Windows.

chrisseaton1 reply#
> The old floating point stuff is gone.

Do you mean x87? I’m not sure it’s true that it’s gone is it? The instructions are still documented? Do they not work?

asveikau2 replies#
I guess I stand corrected. I was under the impression that C compilers don't tend to use it anymore when compiling for amd64. (Because you can assume SSE support on amd64, unlike a binary that might run on an old Pentium.) Then I misread that situation as it not working.

It does take effort for an OS kernel to save and restore x87 state, so I could imagine somebody dropping support.

Continue this thread — 2 replies

Load more comments