Pavel Duracellov
kiwifarms.net
- Joined
- May 8, 2022
I've been fiddling with x86_64 assembly recently and it's way easier than I thought. Interfacing with C functions by the System V ABI is just as easy as being able to understand a simple diagram of how the stack frame is structured and how I can just add/substract from RBP to get a certain value. It's pretty cool, I'll have to learn more.
This is a good resource if anybody wants to know what I've read so far.
Reading the K&R C book never taught me how C functions are called, and learning assembly made it all clear. Maybe this is because the C function calling conventions and all these ABI choices were stablized after C's invention, but no modern C book explained it to me as well. I'm starting to think maybe the CIA is trying to hide low-level programming from us by making it hard to access.
I remember HolyC being able to use inline assembly using the asm {}; block and Rust seems to have an unsafe macro called asm!();, I might have to try them out, although I guess the calling conventions of TempleOS are different from the SysV ABI.
Forget the Leddit memes about assembly being hard, this is just elementary school math and logic all over again.
This is a good resource if anybody wants to know what I've read so far.
Reading the K&R C book never taught me how C functions are called, and learning assembly made it all clear. Maybe this is because the C function calling conventions and all these ABI choices were stablized after C's invention, but no modern C book explained it to me as well. I'm starting to think maybe the CIA is trying to hide low-level programming from us by making it hard to access.
I remember HolyC being able to use inline assembly using the asm {}; block and Rust seems to have an unsafe macro called asm!();, I might have to try them out, although I guess the calling conventions of TempleOS are different from the SysV ABI.
Forget the Leddit memes about assembly being hard, this is just elementary school math and logic all over again.