Good Way to Learn Assembly Language

2 points by spent_insanity ↗ HN
I am sure I am beating a dead horse but I see so many recommendations but sometimes it is hard to sift through them and get good info. I would like to learn assembly language and want to know where a good site or tutorial would be to start learning. I would like to learn assembly for linux and eventually windows as I want to start doing some programming with pi, etc... I started to learn C# and stopped at global variables, etc... but I think it would make me better to understand the under the hood mechanics of everything. I have not done any work in linux per se so I am not sure what assembly comes with it and eventually I would like to learn x86 and x64 and would eventually like to be able to reverse engineer products for my own education. Any help would be greatly appreciated as it seems there aren't many resources that I can find.

4 comments

[ 3.3 ms ] story [ 22.4 ms ] thread
This is really good way. And most of all quite comfortable
Write a simple chess program. The rules are easy but require some thought. Displaying a board is easy but requires some thought. Writing an alpha-beta search is easy but requires some thought.

By the time you have a simple working chess program that couldn't beat a child you have learned everything you need to know about a programming language. You have to write an algorithm, handle input, handle fancy output, etc.

This is the first program I write whenever I start on a new programming language. I know WHAT I want to do, I just don't know HOW to do it in the new language.

Where should I start with assembly though? What programs should I be using? where do I find them? which ones are good and which ones are bad? I originally thought assembly language was just 1 or 2 different languages and as I research I am seeing otherwise. I just started reading a book I found called the beginners guide 4 reverse engineering if that helps to show where I am at so far.
I went the other way. I started programming in assembly for the 8080, Z80, and MSDOS.

When I hit later multi-user operating systems Like UNIX, Linux and Windows I discovered that I wasn't able to access the bare-metal like I was used-to previously.

That's when I started using slightly higher-level languages like C, etc.

My suggestion: Pick a fairly simple 8-bit CPU like the 8080/Z80 to start with. Find a CP/M emulator. CP/M has several different assemblers ranging from the simple ASM to a macro-assembler MAC to a relocatable macro-assembler M80.

You will find lots of small programs on the CP/M archive sites to pull apart, play with or re-write.

Then progress to 16-bit assembly under MSDOS. Once again, there are plenty of websites with ASM files to look at, analyse and rewrite.

After that, you should have a good idea yourself as where you should need to go next.