1 Registry
2 Making a program that runs: -The Push and Pop commands
3 Arithmetic functions: Add, Sub, mul, neg
4 Logic Functions: orr, and, mvn. eor, lsl, lsr, ror
5 Memory access: ldr, ldrh, ldrb, str, strh, strb
6 Control Flow and Unconditional Jumps: cmp, b, b<xx>
7 Call and return to functions: bl, bx, swi
Before I begin, I shall explain briefly some concepts you need to know.
Registry
Registers are small, extremely fast, extremely low capacity memory that sits inside the processor. Why are they so important? Because processors only know how to work with them. All operations involve at least one register, but should normally involve two or three directly. The processor cannot work directly on any other memory, so every piece of data to be worked on must be loaded into one of these.
How many are there?
For the Thumb mode (the one in this document) only 16 registers are available. Of those 16, only 8 are available for any use. Those registers are called low registers, and are all-purpose, meaning the processor doesn’t have any designed use for them. Those are called R0 to R7 respectively, and are the ones you will normally use on most programs.
The remaining 8 are called High registers and are usually unavailable to manipulate directly. The last three of them have special names: SP, LR and PC.
SP is the Stack Pointer. The stack pointer contains an address in memory where data is stored when the Push command is called. More on that later.
LR is the Link Return register. When a branch and link(bl) function is called, the value of the line where it was called is stored here. Not very important right now, but it needs to be kept safe.
PC is the Program Counter it’s the address of the next instruction to be executed. This is where the Processor finds out where on the memory is the next