Live data from Hacker News

Introduction to ARM Assembly Basics

azeria-labs.com

21–30 of 48 posts

Re: Introduction to ARM Assembly Basics

#21

Earlier quoted context omitted.

I was very surprised when I'd discovered that the assembly in the Linux kernel sources for x86 was written in the AT&T syntax and the assembly for ARM was not. I always thought that the AT&T syntax was supposed to be independent from an architecture.

"Architecture independent assembly language". Just say that out loud and set it sink in for a moment. Anyways, glad that there's no AT&T abomination for ARM, too.

And web assembly is written in some kind of weird lisp inspired s expression format.

Re: Introduction to ARM Assembly Basics

#22

Earlier quoted context omitted.

"Architecture independent assembly language". Just say that out loud and set it sink in for a moment. Anyways, glad that there's no AT&T abomination for ARM, too.

And web assembly is written in some kind of weird lisp inspired s expression format.

WebAssembly is really WebBytecode. https://en.wikipedia.org/wiki/WebAssembly

Re: Introduction to ARM Assembly Basics

#23
I'm only a couple of pages in but already a lot of this guide is incorrect for ARMV8-A (A64). Much is different, e.g. no thumb mode, no directly accessible program counter, no load multiple, no PUSH/POP, different stack pointer, etc. Looks good if you're interested in older ARM ISAs, which is probably more applicable for IoT etc.

Re: Introduction to ARM Assembly Basics

#24

I'm only a couple of pages in but already a lot of this guide is incorrect for ARMV8-A (A64). Much is different, e.g. no thumb mode, no directly accessible program counter, no load multiple, no PUSH/POP, different stack pointer, etc. Looks good if you're interested in older ARM ISAs, which is probably more applicable for IoT etc.

Lol, that's because it's about ARMv6. She even points it out in Part 1 or so (not sure where but I saw it somewhere). If you wanna include all differences of ARM that would be a long tutorial.

Re: Introduction to ARM Assembly Basics

#25
You can also compile assembly with gcc rather than as + ld.

And you can output assembly from C programs

    gcc -S 
You can disassemble a binary to see how it actually looks. The resulting binary is much larger than your assembly code.

    objdump -d 
Many disassemblers will show you friendlier output than objdump. I use ht editor (packaged in Debian based distros as ht), an open source clone of Hiew. In ht, press F6 -> select image, and you will have an easy to follow disassembled version of a binary that you can edit, if you happen to know opcodes.

Re: Introduction to ARM Assembly Basics

#26

Some of the arm instruction set manuals seem harder to come by than others. Recently I reverse engineered one of the firmwares of the ImmersionRC Vortex 150 racing quadcopter (it uses an stm32f3 chip, arm cortex instruction set). It was pretty hard to come by a copy of the full instruction set manual - i just assumed that kind of thing would be a quick google away. Eventually i got there and made my changes but it wa…

Are you going to post the instruction set anywhere to help future hackers?

If so a link would be fantastic!

Re: Introduction to ARM Assembly Basics

#27

Some of the arm instruction set manuals seem harder to come by than others. Recently I reverse engineered one of the firmwares of the ImmersionRC Vortex 150 racing quadcopter (it uses an stm32f3 chip, arm cortex instruction set). It was pretty hard to come by a copy of the full instruction set manual - i just assumed that kind of thing would be a quick google away. Eventually i got there and made my changes but it wa…

What are you talking about???

https://static.docs.arm.com/ddi0403/e/DDI0403E_B_armv7m_arm....

http://infocenter.arm.com/help/topic/com.arm.doc.dui0553a/BA...

There is also the old cheat sheet:

http://users.ece.utexas.edu/~valvano/Volume1/QuickReferenceC...

Re: Introduction to ARM Assembly Basics

#29

I'm only a couple of pages in but already a lot of this guide is incorrect for ARMV8-A (A64). Much is different, e.g. no thumb mode, no directly accessible program counter, no load multiple, no PUSH/POP, different stack pointer, etc. Looks good if you're interested in older ARM ISAs, which is probably more applicable for IoT etc.

Iot often use a slightly modified thumb2 which is actually a pretty recent addition to arm ISA.

Re: Introduction to ARM Assembly Basics

#30

I'm only a couple of pages in but already a lot of this guide is incorrect for ARMV8-A (A64). Much is different, e.g. no thumb mode, no directly accessible program counter, no load multiple, no PUSH/POP, different stack pointer, etc. Looks good if you're interested in older ARM ISAs, which is probably more applicable for IoT etc.

Lol, that's because it's about ARMv6. She even points it out in Part 1 or so (not sure where but I saw it somewhere). If you wanna include all differences of ARM that would be a long tutorial.

I think you'll find the only reference to v6 is where the register names are explained, e.g. http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc....
Post reply on HN