<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>ARM Assembly By Example</title><link>/docs/registers-and-memory/</link><description>Recent content on ARM Assembly By Example</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><atom:link href="/docs/registers-and-memory/index.xml" rel="self" type="application/rss+xml"/><item><title>Register Overview</title><link>/docs/registers-and-memory/register-overview/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/registers-and-memory/register-overview/</guid><description>Register overview # As mentioned before, the registers are inside the processor and allow the processor to operate on data. The ARM processor can not do calculations or manipulate data directly inside the memory. The ARM processor has 16 32-bit registers (r0-r15).
Sane register usage # While technically you can use every register, some of the registers are reserved for
specific functions.
r0 - r12: General purpose - Use without care of reserved functionality r13: Stack pointer - Address location of stack in memory r14: Link register - Address location of where to return to after branch r15: Program counter - Address location of &amp;ldquo;next&amp;rdquo; operation to perform And then, within the general purpose registers, there are some soft rules.</description></item><item><title>Memory Overview</title><link>/docs/registers-and-memory/memory-overview/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/registers-and-memory/memory-overview/</guid><description>Memory overview # When someone says that a computer has &amp;ldquo;memory,&amp;rdquo; it could be a number of things. There are all kinds of media that fall under this category. Any peripheral outside of the processor that stores data can be considered memory. In addition to the RAM, there may be ROM (read only memory), EEPROM (electrically erasable programmable read-only memory), flash drives, disc drives, tape cassettes&amp;hellip; In this series, when we talk about memory, we will always be talking about RAM unless specified otherwise.</description></item><item><title>Program 3: Find the Otter</title><link>/docs/registers-and-memory/find-the-otter/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/registers-and-memory/find-the-otter/</guid><description>ADD operation # You will focus on math heavy concepts later, but for now you do need one operator to increment for things like memory addresses and loops. Also, you may have guessed that the ADD opcode adds two numbers. Both of these formats are exactly the same.
add r0, r1, r2 @ Add r1 and r2 and store in r0 add r1, r2 @ Add r1 and r2 and store in r1 STR(-B) operation # STR is the opposite of LDR.</description></item><item><title>Program 4: Memory Copy</title><link>/docs/registers-and-memory/memory-copy/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/registers-and-memory/memory-copy/</guid><description>Reserving Space, Pt. 2 # Sometimes (read most of the time) you probably won&amp;rsquo;t know the length of the output or exactly how much space you will need for the program. As opposed to writing a string in memory, you can use the fill directive to reserve space. The syntax is # of data parts to reserve, the size of the space to reserve, and the value to store in that space.</description></item></channel></rss>