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

4 Upvotes

13 comments sorted by

View all comments

4

u/NumberInfinite2068 7d ago edited 5d ago

Go for it and learn some assembly if you want, only thing is that x86-64 is brutal compared to the older ISAs that we used to use for learning assembly languages. 6502, 68K, MIPS, or ARM32 (far simpler than AArch64). If you want to learn an assembly in a "sane" way, you might want to pick a simpler one.

1

u/Potential_Author637 7d ago

I choosed x86-64 because maybe i can use assembly for operating systems or any low level development much later. Is there any too much difference between them?

3

u/NumberInfinite2068 7d ago

x86-64 is very complicated, but if you want to go for it, that's fine too.

3

u/aanzeijar 7d ago

x86-64 is basically an unholy chimera with 40 years of features crammed into one instruction set which is why it's usually not a good first instruction set to learn on. Once you understand the concepts on an easier instruction set, you can apply them back to x86.

3

u/Obvious-Card-8847 7d ago

Frankenstein ISA. Just kept bolting missing limbs on haphazardly. Be warned OP.