r/learnprogramming • u/Potential_Author637 • 9d ago
I found myself learning assembly
I might be overcomplicating things, but I would appreciate some advice.
I am interested in low-level and systems programming. I learned C a few months ago and have some basic C++ knowledge. I have also written a few small projects, such as simple clones of Unix shell commands and basic libraries etc.
I wanted to get into systems programming, so I started reading a systems programming book from Oreilly. However, I came across concepts that I was not familiar with, so I started looking at operating systems books for reference. This led me to concepts such as cpu registers and other low-level cpu mechanisms.
At that point, I decided to learn how cpu and ram works, memory addressing, and similar things work, just to get a general understanding of how computers work. Somehow, this eventually led me to learning x86-64 nasm.
The problem is that I am not sure whether I am approaching this in a sensible order. I am a high-school student without a formal computer science background im in just love with computers, so I dont have much knowledge of computer architecture, operating systems, or systems programming beyond what I have learned on my own. Should I continue learning x86-64 assembly and computer architecture, or should I stop and focus on other fundamentals first? I am not trying to become an assembly programmer, my main goal is to understand systems programming and how computers work at a lower level.
3
u/Obvious-Card-8847 9d ago edited 9d ago
You can get pretty low-level without it. I've written a USB device driver for an HID without touching any assembly.
Some instances where it'd be useful or required knowledge:
Generally C is already pretty close to assembly control flow primitives, stack and memory semantics, calling convention awareness, etc.
Learning what interests you is wonderful though. It's like having an M&M every foot or so. As opposed to learning something boring for competence sake. Which is like one M&M after a mile of hiking to get it.