Alextek117
Posts: 36
Joined: Fri Mar 10, 2017 5:11 pm

ARM assembly textbook suggestions

Thu Apr 06, 2017 2:51 pm

Hello everyone,
Which book would you suggest to learn ARM assembly? I'm looking at ARM Assembly Language: Fundamentals and Techniques, Second Edition by William Hohl & Christopher Hinds. It seems like a good book but it's center around ARM7 and not ARMv8 like the rp3.

User avatar
Paeryn
Posts: 2967
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: ARM assembly textbook suggestions

Thu Apr 06, 2017 3:33 pm

Alextek117 wrote:Hello everyone,
Which book would you suggest to learn ARM assembly? I'm looking at ARM Assembly Language: Fundamentals and Techniques, Second Edition by William Hohl & Christopher Hinds. It seems like a good book but it's center around ARM7 and not ARMv8 like the rp3.
It depends on what you want, ARMv8 is divided into two modes, AArch32 and AArch64. Raspbian and most other flavours run the RPi3 in AArch32 mode which is practially the same as ARMv7 (a few instructions that had been deprecated were removed and there are a few extra to help with cryptography AFAICR). AArch64 is a whole new instruction set and unless you are running a 64 bit OS you won't be using it.

I can't recommend any books as I haven't read any but if you only want 32bit assembly then books targetting ARMv7 should be fine.
She who travels light — forgot something.

jahboater
Posts: 5760
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Re: ARM assembly textbook suggestions

Thu Apr 06, 2017 5:09 pm

Alextek117 wrote:Hello everyone,
Which book would you suggest to learn ARM assembly? I'm looking at ARM Assembly Language: Fundamentals and Techniques, Second Edition by William Hohl & Christopher Hinds. It seems like a good book but it's center around ARM7 and not ARMv8 like the rp3.
I have that book, and I can recommend it.

The other resource of course is Google. Search for "arm sdiv instruction" for example and you will see many sites describing the instruction - usually quicker than looking it up in a book.

Having said that, the above book will give you a huge amount of background information that is not so easily found on google.

Finally, use the compiler. If you want to see how something is done, create a simple example in C, compile it to assembler with a recent version of GCC and study the resulting code. If you use too high an optimization level (-O3) the assembler output will be hard to understand, but -Os is readable enough and often produces code more similar to hand written assembler. Make sure you fully understand each instruction, what its doing and why its there.

Return to “Teaching and learning resources”