ARM Assembly Language
Getting the most from the ARM processor
This lecture introduces working with assembly language on ARM processors, including the ARM Cortex-A8 found in Bela. It explains the basic operations of the CPU, the format of assembly language instructions and how to call them from C or C++. It also explains how to work with floating point numbers in assembly, setting the stage for high-performance filtering in Lecture 22.
Table of contents
- What you’ll learn in this lecture
- What you’ll make in this lecture
- Code examples
- Recommended parts
- Additional references
Lecture 21: ARM Assembly Language
What you’ll learn in this lecture
- Basics of assembly language instructions on ARM
- Calling assembly language code from C++
- Floating point in assembly language
What you’ll make in this lecture
- Example functions written in assembly
Code examples
asm-test: Template project for creating basic functions in assembly language.
asm-factorial: Implement a factorial function in assembly language and compare the results to the same thing written in C.
asm-float: Shows how to work with floating point numbers in assembly language.
Recommended parts
Running the examples in this course assumes that you have a Bela Starter Kit or Bela Mini Starter Kit.
No external components are required for this lecture.
Additional references
- ARM instruction set quick reference card. Handy PDF featuring summaries of the instructions on most ARM processors.
- VFP instruction set quick reference card. PDF reference for the instruction set on the Vector Floating Point unit. Note: you will find different versions of this instruction set, some with VFP instructions preceded by
V
(as it is here), others with instructions preceded byF
. Which one to use may depend on the specific version of the assembler. - ARM Cortex-A8 technical reference manual. This is the complete technical information on the operation of the ARM Cortex-A8 CPU, including its instruction set and its floating point units.