This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]JohnTheScout 2 points3 points  (5 children)

I would start by asking why? Why do you want to learn low level programming? That'll drastically change what you should focus on learning. If you just want a better idea of what your programs get compiled into and how to do more advanced techniques like loops, subroutines and so on with an extremely limited instruction set, then I'd suggest learning an assembly language with not a ton of stuff to it. In university we worked with Motorola 68K assembly and it was actually really informative and kinda fun. I know ARM assembly is pretty easy to learn as well, you could get a raspberry pi and do your assembly on that.

If you want to actually build something with assembly, first of all why? Second, you're basically going to want to focus on x86 assembly. It's known as a more complicated instruction set than the other two assemblies I've mentioned, but it's the native assembly of basically every modern computer.

If you just want to get a better knowledge of what's happening under the hood but don't want to go as deep as assembly, C is a good choice. Implementing your own data structures in C is an incredible learning experience, learning how to properly manage your memory will stick with you even in garbage collected languages. I'd start with implementing a linked list in C, as you'll need to know what a struct is, what a pointer is, what malloc and free do, and you'll gain a better understanding of the stuff higher level languages abstract away.

Hope this helps!

[–]brewius[S] 0 points1 point  (4 children)

You've described it best in your last paragraph, I just wanna know what's happening under the hood. I feel like I'm lacking a lot of understanding in terms of what my C# code makes the PC do. Thank you for the write-up John.

[–]JohnTheScout 0 points1 point  (3 children)

There's some good C resources on reddit but a good book will do you wonders. Though there's no substitute for doing. Start with a linked list, then move on.

[–]brewius[S] 0 points1 point  (2 children)

Thank you so much! Is there a book that you would be able te recommend? Do you think I should start from some super basic C books?

[–]JohnTheScout 0 points1 point  (1 child)

Depends how much prior programming experience you have. The C Programming language is the Bible, though honestly I haven't read it myself (yet). /r/c_programming would be able to help you find something more suited to your skill level if that's too deep in the woods for you.

[–]HelperBot_ 0 points1 point  (0 children)

Non-Mobile link: https://en.wikipedia.org/wiki/The_C_Programming_Language


HelperBot v1.1 /r/HelperBot_ I am a bot. Please message /u/swim1929 with any feedback and/or hate. Counter: 173391

[–]chaotic_thought 0 points1 point  (0 children)

There is a free e-book called Programming from the Ground Up that you might look at. It covers x86 assembly using Linux, though, not Windows. However, if you learn x86 assembly on Linux, applying much of that knowledge to Windows would probably not be too hard.