Ask HN: What's the best resource for learning modern x64 assembly?
492 pointsI'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 commentsThe 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.
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.
https://software.intel.com/en-us/articles/introduction-to-x6...
I mean, you have different modes, and in 64-bit mode EAX becomes RAX for example.
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.
It actually can be used, if you write by hand, at least in Windows.
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?
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
All comments shown.
Couldn't load more comments. Check your connection and try again.