Re:A Friendly Introduction to Assembly for High-Level Progra...
by scotty79 on Wednesday September 18, 2024 @12:53PM
(#41582334)
It's not that bad if you don't expect too much of yourself. I could patch some software machine code just by drawing on my 6502 teenage experience from more than 20 years ago. x86 or IL ASM doesn't matter all that much. Core concepts are the same. Registers, stack, relative jumps conditioned on the contents of flag register.
One thing that tripped me up a bit is that on x86 standard practice is using "taking address" lea operation combined with weird addressing mode to do simple arithmetics. I had to ask ChatGPT wtf is that.
In the process I learned that 686 assembly is a very different beast and they don't play nicely with each other (or at all).
Re:A Friendly Introduction to Assembly for High-Level Progra...
by zellyn on Wednesday September 18, 2024 @01:05PM
(#41582516)
Ah, interesting. I think, looking back, that "lea" is usually where I start getting confused!
I apparently also need to internalize harder that I should just ask llms about everything :-)
Re:A Friendly Introduction to Assembly for High-Level Progra...
by zahlman on Wednesday September 18, 2024 @12:58PM
(#41582402)
>I still feel completely intimidated and out of my depth with modern assembly. I have no idea where to start.
I'm not surprised. But keep in mind that "create something that works on a modern CPU and beats the compiler's output" is not the only possible goal of learning assembly programming. I would say it's not even the usual goal, and hasn't been for a long time.
I still feel completely intimidated and out of my depth with modern assembly. I have no idea where to start. There are just so many instructions, conventions, registers with strange names and conventions that include each other, etc. Add to that that many of the examples you see are trying to beat the compiler, so doing clever/wide stuff. A comprehensive, modern tutorial that starts simple but goes more or less the whole way would be welcome.