Friday, 29 November 2013

ARM Assembly Part 1 - An Introduction

Posted by srini0x00 on 12:52
We have seen a very basic C Program in the previous article to get a brief understanding of how a processor processes and executes the code written in a High Level language like C. If you have missed it, you can refer it from here.  Now let’s see a brief introduction to Assembly Language and ARM Processors.

Assembly Language

Assembly is a low level programming language with which we can directly communicate with the Processor.
Our Processor can understand only 0s and 1s (binary) where, it is very difficult for a human being to understand binary.

Assembly Language acts as a bridge between the human and Processor. Though, there are many advantages with Assembly,  it is machine dependent. As it is very specific to Hardware Processor family, Programs written for one computer might not run in another computer with different hardware configuration.
It means, A Program written for a machine working on Intel processor might not work with a machine running on ARM processor. Hence, Different processors need different assembly language.

Example Processor families:

This series focuses only on ARM Assembly language.

What is ARM?

ARM is one of the leading companies which provide processors for embedded devices such as mobile Phones. These ARM processors are based on RISC Architecture.

Most of the devices around us today including mobile Phones, tablets, Multimedia players, and routers are running with ARM Processors. i-devices  such as iPhone, iPad and most of the smart phones running on android platform use ARM processors because of their enhanced power saving design.

Checking for Processor information on an Android Device

We can see the details of the processor being used in our android mobile Phone by following the steps below.

In this example, I am using an emulator instance to show how we can see the CPU information on a device. Just in case if you are using a real device, steps remain the same.

Step 1: Connect your Phone to the machine using adb or over SSH to open a shell on the device.
Please refer to this article if you want to know more about adb

Step 2: type the following command
cat /proc/cpuinfo

It looks as shown in the figure 1.1

figure 1.1
The above figure says that the processor being used is ARMv7.
Note: When launching a new emulator, we can explicitly specify which processor we want to use with the emulator instance as shown in figure 1.2
figure 1.2


We have seen what assembly language is and how it is specific to each processor family. We have also seen the details about ARM family of processors. In the next article, we will see the lab setup to start programming ARM Assembly.

Hope this information helps you. Please post your comments for any queries or suggestions.

Kindly Bookmark and Share it:


Post a Comment


Recent posts

Recent Comments

Bookmark & Share