Mobile Security Platform

ARM assembly vol2


In this tutorial/page(or whatever the fuck you call it).

a Register is a place where CPU keeps data at. The Registers are important because the data here is what is used for the calculation of many Instructions.

GPRs General Purpose Registers
FPRs Floating Point Registers
SPRs Special Purpose Registers

we will focus on the General Purpose Registers. There are 31 GPRs. Register #0 —> Register #30, or also known as r0 thru r30. Each GPR is 64-bits in length. Therefore a double-word value is the maximum size data type that can fit into a GPR.

P.S: Hex values present in an Assembly Source file are always designated via a “0x”. For example, the Hex Value BC needs to be written as 0xBC.
Some Special terms that is good to know:
8 Bits = Byte (2 Hex digits) Example: 0x44
16 Bits = Halfword (4 Hex digits) Example: 0xB0C8
32 Bits = Word (8 Hex digits) Example: 0xDEDD0020
64 Bits = Double-Word (16 Hex digits)
128 Bits = Quadword (32 Hex digits)

As an example:
0x8045CD0A
The “8045” portion (lefthand 16-bits) of the word value is known as the upper 16-bits. The “CD0A” portion (righthand 16-bits) is known as the lower 16-bits. Another example, we have the following double-word value:
0xFFFFFFFF80007774
The “FFFFFFFF” portion is known as the upper 32-bits and the “80007774” portion is known as the lower 32-bits.
Lefthand = upper
righthand = lower.

Memory: CPU’s all instructions will reside in Memory. There are two types of memory- Static and Dynamic.
The region of Memory where a CPU’s instructions reside at is usually called Static or Main. It’s named Static because every time a specific program is executed by the CPU, the CPU instructions are usually placed at the same locations within Static Memory every single time.
The region of Memory where Data is kept at is usually called Dynamic or Heap. It’s called Dynamic because every time a specific program is executed/launched by the CPU, the Data may not be at the same location it was present at the time before.
Locations in Memory are called Memory Addresses

References:

https://mariokartwii.com/armv8/

Home