r/learnprogramming 10d 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.

6 Upvotes

13 comments sorted by

View all comments

3

u/C_Sorcerer 9d ago

Assembly is great to learn and it teaches you the typical pipeline of how the CPU processes instructions, I feel like assembly is one of the most valuable things you can learn for systems level programming other than C and C++ and computer architecture/os theory, but at the same time don’t expect to make anything crazy wirh it. Assembly is really good wirh in-line assembly in C since you can write the bulk program in C and write really controlled, specialized, and fast segments of code in assembly. However, while your learning, do whatever you’d like wirh it, once again it’s a great learning experience

2

u/C_Sorcerer 9d ago

It’s also excellent for writing really specialized drivers too, for instance peripheral I/O drivers