Live data from Hacker News

Where should I start learning Assembly?

news.ycombinator.com

41–50 of 54 posts

Re: Where should I start learning Assembly?

#41

I started with the following book: http://www.z80.info/zip/zaks_book.pdf Wonderful book from which a lot of knowledge is applicable to other architectures straight away. It teaches you about planning, control structure implementation and the maths behind it all as well.

The glorious, good old Z80. Highly recommended. Also, if you get one of those Z80-powered Texas Instruments calculator, you could do pretty neat things.

That's how I got my start. After TI-BASIC, Z80 assembly was the second programming language I learned, at age 12. It turned out to be a great foundation. For one thing, it was fairly easy to understand, from a syntactic perspective. Secondly, it gave me a much better foundation for understanding the lower-level aspects of C, letting me concentrate more on understanding the more complicated abstractions, and what they actually represent.

Re: Where should I start learning Assembly?

#42

I enjoyed Jeff Duntemann's "Assembly Language Step-by-Step". I see there is a 3rd edition. Nice writing style and overall fun read.

Yes! I came in here to recommend that one as well. He does an excellent job of not only talking about the mechanics of the language, but also the system components to which the mechanics directly relate: and he does so in a way that is both easy to understand and thorough. Such a good book.

Re: Where should I start learning Assembly?

#44
post #9

Although I cannot claim to know a lot, http://microcorruption.com was a very nice "fun" way to at least start with a small, easy to grasp instruction set.

It's a great way to get into reversing and assembly of you like the "series of puzzles" format of a ctf.

Re: Where should I start learning Assembly?

#45

Reverse engineering is quite a different skill set from assembly. Unless you are reverse engineering malware, whatever you are analyzing is unlikely to have been written in assembly or to be heavily obfuscated. Then it's more about knowing how certain high-level programming constructs (think virtual function calls in C++) will be translated into assembly by a compiler, what residual information there might be left in…

You have to know assembly to be able to understand what you are looking at. Yes, you need to know more than just assembly, but you absolutely need to know assembly.

Re: Where should I start learning Assembly?

#46
post #6

Code by Charles Petzold [1] is a fantastic introduction. It isn't so much the nitty gritty "this opcode performs this operation, and these are all the tricks to making it do things, edge cases and things you should worry about" and more along the lines of "what opcodes should a CPU have, and how do those translate into electricity flowing through physical wires?" I feel like really thinking through that book made MIP…

In addition, if you like "Code", I'd recommend The Pattern on the Stone by Danny Hillis (creator of Thinking Machines' Connection Machine supercomputer).

It's much shorter than "Code" but covers basically the same ground much more quickly, but Code might be better first because it really explains it thoroughly.

Re: Where should I start learning Assembly?

#49
Well, that depends how comfortable you are thinking in terms of machine code. It takes a completely different mindset because you're now literally dealing with blocks of memory -- even more so than C.

It also depends how steep of a learning curve you want to encounter. I, personally, have not yet played with x86 assembly because the documentation for them is so unfriendly for beginners. To that end, when I want to play around in Assembly and learn techniques for that level of programming, I usually play with the DCPU (http://dcpu.com/dcpu-16/). It's fake and was designed for a (sadly) not-to-be-made game. But it is an absolute joy to program in.

Play around with that until you're comfortable and THEN tackle x86.

Re: Where should I start learning Assembly?

#50
Check out the bomb lab from CMUs systems course. Its an assignment specifically designed to teach you assembly and gdb via reverse engineering a binary "bomb". There are 6 levels, and you need to figure out the right password for each level by reading the assembly/inspecting the program via gdb.

http://csapp.cs.cmu.edu/public/labs.html

Post reply on HN