Starting ARM Asm : Part 00

BACK CONTENTS NEXT
Introduction:

Where we Come From To Here:

Back in 2012 I had began writing a series of tutorials for ARM assembly Language programming on RISC OS. At that time I was posting each only to a public forum. Do to different opinions from people that do not like Assembly Language an argument insued. I later wrote a more complete series with the intent of posting them to a forum, though when I asked certain questions around this, the feedback was too mixed.

So here we are more than 9 years after those first tutorials were posted, and I still love ARM Assembly Language Programming, and would still like to help others that are interested in this language. Those that were interested in learning ARM Assembly on RISC OS asked me to continue, even back then. I am guessing I was on the correct track to help some, so it is time to begin again.

Originally I was going to modify my existing tutorials to fit this format. I decided instead to write a new series, in the same spirit as what I wrote the others.

Prerequisits:

This tutorial assumes you use RISC OS, and have some experience with programming. It need not be much, so long as you have a grasp of the basic concepts used in programming, such as variables, loops, procedures, arrays, etc.

This will fail you if you have never programmed before. Though it is fun to learn to program in an HLL (like BASIC V, or C), and increases the joy of learning ARM Assembly.

A bit on ARM Asm and How I Teach:

ARM Assembly language is fairly simple, and represents a truely great instrunction set. The ARM has 16 user registers, one of which is the program counter (R15), thus reducing the need for strange branching instruction (we can write directly into R15 just like any other). There are almost no restrictions on the usage of registers in the ARM CPU. Do not worry if this is a bit above head at this point, as you go through the series you will learn what all this is.

The particular instruction set that is worked with in these tutorials is the 32-bit instruction set that has been around since 1985 on the ARM, sometimes called AARCH32 to keep it seperate from the newer ones. We will cover things that require newer versions of the ARM, though always the 32-bit instruction set encoded in a 32-bit word per instruction.

The ARM has a huge advantage in avoiding unneeded branching, in that almost all ARM instructions are conditional, not just branches like many others. So skiping one instruction conditionaly often is more effecient than branching.

I will be teaching by using actual working code, and disecting that code to explain what is going on in each step of this series. This is the method that I have found most effective to teach Assembly Language to those that are new to it. This also means that every step (except this one) will have working code.

For simplicity I will be using the BBC BASIC V ARM Assembler in this series, as it is builtin to RISC OS and thus assured to be present on all machines running RISC OS. Do not worry I do break code up into sections using BASIC FNs, as well as larger code across files using LIBRARY. In the last part of this series I will quickly mention some options for an Assembler that can be used more freely, as well as showing examples with each assembler.


This site created on RISC OS using !Zap.
Hosting for this site provided by David F
This page viewable with Any Browser
LAST UPDATED: Sept 10th 2021