Ask HN: How to begin learning assembler for university course?
I think the idea of a course is that you will be taught.  Why worry about it?  Do you not trust your uni to provide the necessary course materials and exercises?<p>Did someone tell you assembly is hard?  I will tell you that assembly is easy, very easy.  It&#x27;s easy because instructions are simple and stupid.  They do one little thing, and maybe set a few flags.  And while modern ISAs have grown a ton of cruft, you get pretty far with a small set of core instructions (loads &amp; stores, register-register and immediate-register moves, arithmetic, testing flags, branching).  Given that it&#x27;s a computer architecture course, they&#x27;ll probably want you to learn something about ABI and calling conventions too.  Not a big deal, it just illustrates the (somewhat arbitrary) convention of what to pass in registers vs what to pass on stack, who saves registers (which registers?) and so on.  Simple stuff that you just need to have a convention for if you want to make it easy to interface with prebuilt binaries.<p>With very basic knowledge, you could disassemble a program and just look up instructions as you go to figure out what it does.  That is how I &quot;learned&quot; assembly.  I put learned in quotes because for me learning is on-demand and is never fully done.  I learn more as I need, including last week when I did some ARM assembly programming.<p>I think assembly has an undeserved reputation for being difficult, because building large programs in assembly is a lot of work.  Also because fear of the unknown: few people learn assembly, and even fewer use it enough to be proficient with it, so in their mind it&#x27;s the devil they don&#x27;t know.  I doubt the course has you building large applications, it&#x27;ll be some rather basic things.  And that&#x27;s how a lot of assembly usage is in real life: you just have to do some basic bits in early stage bootloaders, OS kernels, crt, etc. in assembly.  But only enough to get the code in a higher level language going.  (The other significant use is in optimization, especially SIMD, but I doubt a computer architecture course would focus on that too much).<p>Have no fear and just dive in.  That&#x27;s how you approach the topic.<p>Knowing C and checking the compiler output is very helpful.  You can do it interactively on godbolt.org, it&#x27;ll even hilight lines and the corresponding machine instructions.