this post was submitted on 12 Feb 2026
64 points (100.0% liked)

Learn Programming

2087 readers
25 users here now

Posting Etiquette

  1. Ask the main part of your question in the title. This should be concise but informative.

  2. Provide everything up front. Don't make people fish for more details in the comments. Provide background information and examples.

  3. Be present for follow up questions. Don't ask for help and run away. Stick around to answer questions and provide more details.

  4. Ask about the problem you're trying to solve. Don't focus too much on debugging your exact solution, as you may be going down the wrong path. Include as much information as you can about what you ultimately are trying to achieve. See more on this here: https://xyproblem.info/

Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 2 years ago
MODERATORS
 

I don't need something practical. I just need something fun to keep me motivated.

you are viewing a single comment's thread
view the rest of the comments
[–] ageedizzle@piefed.ca 1 points 1 day ago (2 children)

Whats a good way to start learning assembly?

[–] orclev@lemmy.world 2 points 1 day ago (1 children)

So, there's not a great answer to that. The big problem is that x86 assembly is painful because the x86 instruction set is a weedy overgrown mess due to being built on top of literal decades of cruft. Even a CPU made today starts off by booting up pretending to be an 8086 processor, a 16 bit CPU from 1978. To get to a "modern" operating mode you need to walk through a series of configuration steps to get the CPU into the correct mode, but all those modes and configs add a lot of noise when trying to understand x86 assembly. For that reason it's probably a good idea to start by not learning x86, but instead the far more minimal and sane ARM assembly.

The problem of course is that there's like a 99% chance that the system you're going to be working on when learning assembly is an x86 system not an ARM one. So now you need two more things, you need an assembly cross-compiler to use your x86 system to build an ARM executable, and you need an ARM emulator to run it. Personally I'd install LLVM (specifically clang) and start by writing a small C wrapper with some inline assembly in it. For running it I'd use QEMU and a Linux ARM image (maybe one of the raspberry pi distros).

Finally allow me to introduce you to one of the absolute coolest tools out there godbolt compiler explorer. Godbolt allows you to take a snippet of code written in one of dozens of supported languages and see the assembly instructions that various compilers would produce from that code. This is a great way to learn more about not just assembly, but any of the supported languages and is also an invaluable tool for doing fine grained optimizations.

[–] ageedizzle@piefed.ca 1 points 17 hours ago

Even a CPU made today starts off by booting up pretending to be an 8086 processor, a 16 bit CPU from 1978.

That's fascinating.

The godbolt compiler looks like it would be very useful for learning programming. Reminds me of this website even though it's not quite the same because it's a game.

Thanks!

[–] ulterno@programming.dev 3 points 1 day ago* (last edited 1 day ago)

IDK really, perhaps you can use a book.
I mainly did it in the 8085 practicals during B.Tech and they had a handy learning kit with a HEX keyboard so we could Assemble it manually on paper, write the program directly to a given RAM address and then run it from there. For ARM, we just used Keil µVision.
Now I just download an x64 instruction manual or just look up the instructions on the web, on the occasional requirement of reading disassembly.

I don't recommend starting with x86_64 reference. While it can be used just fine, it has lots of instructions and and you instead want a very small subset of them.


Also, there will be a great difference between using an OS and not doing so, as going with one, then includes a lot of potential boilerplate.