ruby-x.github.io/arm/target.html

1318 lines
905 KiB
HTML
Raw Normal View History

2015-11-13 12:59:26 +01:00
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Style-Type" content="text/css" />
<title>target</title>
<link rel="stylesheet" type="text/css" href="./target/target.css" />
<!--[if IE]><script type="text/javascript" src="./target/excanvas-compiled.js"></script><![endif]-->
<script type="text/javascript" src="./target/target.js"> </script>
</head>
<body>
<div style="margin:1ex;">
<div style="width:100%">
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 1</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-0">
<img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:2;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__2" />
<img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:3;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__3" />
<img style="position:absolute;left:283.9pt;top:277.54pt;width:261pt;height:31pt;z-index:89;" src="./target/6bc913ad8ef7fc88a8590e3ec460e9b0.png" alt="__rendered_path__89" /><span class="fmt-2" style="white-space:pre;"><div style="position:absolute;top:177.17pt;left:283.72pt;z-index:85;">A</div></span><span class="fmt-3" style="white-space:pre;"><div style="position:absolute;top:281.92pt;left:285.64pt;z-index:90;">A</div></span><span class="fmt-3" style="white-space:pre;"><div style="position:absolute;top:281.92pt;left:300.76pt;z-index:91;letter-spacing:.001em;">d</div></span><span class="fmt-3" style="white-space:pre;"><div style="position:absolute;top:281.92pt;left:313.6pt;z-index:92;">v</div></span><span class="fmt-3" style="white-space:pre;"><div style="position:absolute;top:281.92pt;left:325.24pt;z-index:93;">a</div></span><span class="fmt-3" style="white-space:pre;"><div style="position:absolute;top:281.92pt;left:336.88pt;z-index:94;letter-spacing:.001em;">n</div></span><span class="fmt-3" style="white-space:pre;"><div style="position:absolute;top:281.92pt;left:349.72pt;z-index:95;">c</div></span><span class="fmt-2" style="white-space:pre;"><div style="position:absolute;top:177.17pt;left:367.12pt;z-index:86;letter-spacing:.001em;">R</div></span><span class="fmt-3" style="white-space:pre;"><div style="position:absolute;top:281.92pt;left:361.36pt;z-index:96;">e</div></span><span class="fmt-3" style="white-space:pre;"><div style="position:absolute;top:281.92pt;left:373pt;z-index:97;letter-spacing:.001em;">d</div></span><span class="fmt-3" style="white-space:pre;"><div style="position:absolute;top:281.92pt;left:385.84pt;z-index:98;letter-spacing:.001em;"> </div></span><span class="fmt-3" style="white-space:pre;"><div style="position:absolute;top:281.92pt;left:391.72pt;z-index:99;">R</div></span><span class="fmt-3" style="white-space:pre;"><div style="position:absolute;top:281.92pt;left:406.96pt;z-index:100;letter-spacing:.001em;">I</div></span><span class="fmt-3" style="white-space:pre;"><div style="position:absolute;top:281.92pt;left:412.84pt;z-index:101;letter-spacing:.001em;">S</div></span><span class="fmt-3" style="white-space:pre;"><div style="position:absolute;top:281.92pt;left:426.88pt;z-index:102;">C</div></span><span class="fmt-2" style="white-space:pre;"><div style="position:absolute;top:177.17pt;left:444.04pt;z-index:87;">M</div></span><span class="fmt-3" style="white-space:pre;"><div style="position:absolute;top:281.92pt;left:442pt;z-index:103;letter-spacing:.001em;"> </div></span><span class="fmt-3" style="white-space:pre;"><div style="position:absolute;top:281.92pt;left:447.76pt;z-index:104;">M</div></span><span class="fmt-3" style="white-space:pre;"><div style="position:absolute;top:281.92pt;left:465.28pt;z-index:105;">a</div></span><span class="fmt-3" style="white-space:pre;"><div style="position:absolute;top:281.92pt;left:476.92pt;z-index:106;">c</div></span><span class="fmt-3" style="white-space:pre;"><div style="position:absolute;top:281.92pt;left:488.56pt;z-index:107;letter-spacing:.001em;">h</div></span><span class="fmt-3" style="white-space:pre;"><div style="position:absolute;top:281.92pt;left:501.28pt;z-index:108;letter-spacing:.001em;">i</div></span><span class="fmt-3" style="white-space:pre;"><div style="position:absolute;top:281.92pt;left:507.16pt;z-index:109;letter-spacing:.001em;">n</div></span><span class="fmt-3" style="white-space:pre;"><div style="position:absolute;top:281.92pt;left:519.88pt;z-index:110;">e</div></span><span class="fmt-3" style="white-space:pre;"><div style="position:absolute;top:281.92pt;left:531.52pt;z-index:111;">s</div></span><img style="position:absolute;left:723.82pt;top:560.22pt;width:5.6pt;height:5.6pt;z-index:60;" src="./target/ce6513985399c0e12fc064993de3a583.png" alt="__rendered_path__60" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:340.72pt;left:194.68pt;z-index:84;letter-spacing:.001em;">The ARM Instruction Set</div></span><img style="position:absolute;left:43.1197pt;top:13.0003pt;width:756pt;height:568pt;z-index:
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 2</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-4"><span style="white-space:pre;"><div style="position:absolute;top:269.85pt;left:667.84pt;z-index:347;">u</div></span><span style="white-space:pre;"><div style="position:absolute;top:269.85pt;left:686.68pt;z-index:349;letter-spacing:.001em;">t</div></span><span style="white-space:pre;"><div style="position:absolute;top:269.85pt;left:697.72pt;z-index:351;">o</div></span><span style="white-space:pre;"><div style="position:absolute;top:269.85pt;left:722.56pt;z-index:354;letter-spacing:.001em;">i</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:260.68pt;z-index:75;letter-spacing:.001em;">Processor Modes</div></span><span class="fmt-5" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.44pt;z-index:108;letter-spacing:-.001em;"><span class="fmt-4">*</span> The ARM has six operating modes:</div></span><span style="white-space:pre;"><div style="position:absolute;top:183.69pt;left:137.32pt;z-index:159;letter-spacing:-.002em;"><span class="fmt-6">U</span><span class="fmt-6">s</span><span class="fmt-6">e</span><span class="fmt-6">r</span> (unprivileged mode under which most tasks run)</div></span><span style="white-space:pre;"><div style="position:absolute;top:212.49pt;left:137.32pt;z-index:220;letter-spacing:-.002em;"><span class="fmt-6">F</span><span class="fmt-6">I</span><span class="fmt-6">Q</span> (entered when a high priority (fast) interrupt is raised)</div></span><span style="white-space:pre;"><div style="position:absolute;top:241.17pt;left:137.32pt;z-index:282;letter-spacing:-.002em;"><span class="fmt-6">I</span><span class="fmt-6">R</span><span class="fmt-6">Q</span> (entered when a low priority (normal) interrupt is raised)</div></span><span style="white-space:pre;"><div style="position:absolute;top:269.85pt;left:137.32pt;z-index:346;letter-spacing:-.002em;"><span class="fmt-6">S</span><span class="fmt-6">u</span><span class="fmt-6">p</span><span class="fmt-6">e</span><span class="fmt-6">r</span><span class="fmt-6">v</span><span class="fmt-6">i</span><span class="fmt-6">s</span><span class="fmt-6">o</span><span class="fmt-6">r</span> (entered on reset and when a Software Interrupt instr</div></span><span style="white-space:pre;"><div style="position:absolute;top:291.33pt;left:156.76pt;z-index:365;">executed)</div></span><span style="white-space:pre;"><div style="position:absolute;top:320.01pt;left:137.32pt;z-index:412;letter-spacing:-.003em;"><span class="fmt-6">A</span><span class="fmt-6">b</span><span class="fmt-6">o</span><span class="fmt-6">r</span><span class="fmt-6">t</span> (used to handle memory access violations)</div></span><span style="white-space:pre;"><div style="position:absolute;top:348.69pt;left:137.32pt;z-index:457;letter-spacing:-.003em;"><span class="fmt-6">U</span><span class="fmt-6">n</span><span class="fmt-6">d</span><span class="fmt-6">e</span><span class="fmt-6">f</span> (used to handle undefined instructions)</div></span><span class="fmt-5" style="white-space:pre;"><div style="position:absolute;top:377.37pt;left:98.44pt;z-index:505;"><span class="fmt-4">*</span> ARM Architecture Version 4 adds a seventh mode:</div></span><span style="white-space:pre;"><div style="position:absolute;top:406.05pt;left:137.32pt;z-index:567;letter-spacing:-.002em;"><span class="fmt-6">S</span><span class="fmt-6">y</span><span class="fmt-6">s</spa
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 3</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-7"><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:120.28pt;z-index:13;letter-spacing:.001em;">n</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span style="white-space:pre;"><div style="position:absolute;top:168.57pt;left:107.56pt;z-index:61;">*</div></span><span style="white-space:pre;"><div style="position:absolute;top:311.97pt;left:107.56pt;z-index:267;">*</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:93.5197pt;z-index:12;letter-spacing:.002em;">RM I</div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3621pt;left:294.04pt;z-index:664;letter-spacing:.001em;">The Registers</div></span><span class="fmt-8" style="white-space:pre;"><div style="position:absolute;top:168.57pt;left:131.8pt;z-index:122;">ARM has 37 registers in total, all of which are 32-bits long.</div></span><span style="white-space:pre;"><div style="position:absolute;top:197.25pt;left:146.44pt;z-index:150;letter-spacing:-.004em;">• 1 dedicated program counter</div></span><span style="white-space:pre;"><div style="position:absolute;top:225.93pt;left:146.44pt;z-index:194;letter-spacing:-.003em;">• 1 dedicated current program status register</div></span><span style="white-space:pre;"><div style="position:absolute;top:254.61pt;left:146.44pt;z-index:237;letter-spacing:-.003em;">• 5 dedicated saved program status registers</div></span><span style="white-space:pre;"><div style="position:absolute;top:283.29pt;left:146.44pt;z-index:266;letter-spacing:-.004em;">• 30 general purpose registers</div></span><img style="position:absolute;left:723.82pt;top:560.22pt;width:5.6pt;height:5.6pt;z-index:59;" src="./target/ce6513985399c0e12fc064993de3a583.png" alt="__rendered_path__59" /><span class="fmt-8" style="white-space:pre;"><div style="position:absolute;top:311.97pt;left:131.8pt;z-index:334;">However these are arranged into several banks, with the accessible </div></span><span class="fmt-8" style="white-space:pre;"><div style="position:absolute;top:333.45pt;left:131.8pt;z-index:398;">bank being governed by the processor mode. Each mode can access </div></span><span style="white-space:pre;"><div style="position:absolute;top:362.13pt;left:146.44pt;z-index:435;letter-spacing:-.003em;">• a particular set of r0-r12 registers</div></span><span style="white-space:pre;"><div style="position:absolute;top:390.93pt;left:146.44pt;z-index:496;letter-spacing:-.002em;">• a particular r13 (the stack pointer) and r14 (link register)</div></span><span style="white-space:pre;"><div style="position:absolute;top:419.61pt;left:146.44pt;z-index:522;letter-spacing:-.004em;">• r15 (the program counter)</div></span><img style="position:absolute;left:43.12pt;top:14pt;width:755.8pt;height:567pt;z-index:665;" src="./target/0901647d626b9293db6430463286fe9d.png" alt="__rendered_path__665" /><span style="white-space:pre;"><div style="position:absolute;top:448.29pt;left:146.44pt;z-index:565;letter-spacing:-.003em;">• cpsr (the current program status register)</div></span><span class=
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 4</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-10"><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:269.44pt;z-index:63;letter-spacing:.001em;">g</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:532.48pt;z-index:77;">a</div></span><span class="fmt-9" style="white-space:pre;"><div style="position:absolute;top:155.63pt;left:533.8pt;z-index:117;letter-spacing:.001em;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:268.48pt;z-index:36;">v</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:219.76pt;z-index:62;">Re</div></span><span class="fmt-11" style="white-space:pre;"><div style="position:absolute;top:187.23pt;left:202.12pt;z-index:247;letter-spacing:-.001em;">User32 / System</div></span><span style="white-space:pre;"><div style="position:absolute;top:209.31pt;left:228.88pt;z-index:443;letter-spacing:-.002em;">r0</div></span><img style="position:absolute;left:208pt;top:206.52pt;width:49pt;height:14pt;z-index:143;" src="./target/084cc801b4c9e8dc9e0caa2b250f8e27.png" alt="__rendered_path__143" /><span style="white-space:pre;"><div style="position:absolute;top:224.43pt;left:228.88pt;z-index:441;letter-spacing:-.002em;">r1</div></span><img style="position:absolute;left:208pt;top:220.8pt;width:49pt;height:14pt;z-index:143;" src="./target/084cc801b4c9e8dc9e0caa2b250f8e27.png" alt="__rendered_path__143" /><span style="white-space:pre;"><div style="position:absolute;top:237.75pt;left:228.88pt;z-index:439;letter-spacing:-.002em;">r2</div></span><img style="position:absolute;left:208pt;top:235.08pt;width:49pt;height:14pt;z-index:143;" src="./target/084cc801b4c9e8dc9e0caa2b250f8e27.png" alt="__rendered_path__143" /><span style="white-space:pre;"><div style="position:absolute;top:252.99pt;left:228.88pt;z-index:445;letter-spacing:-.002em;">r3</div></span><img style="position:absolute;left:208pt;top:249.36pt;width:49pt;height:14pt;z-index:143;" src="./target/084cc801b4c9e8dc9e0caa2b250f8e27.png" alt="__rendered_path__143" /><span style="white-space:pre;"><div style="position:absolute;top:267.15pt;left:228.88pt;z-index:435;letter-spacing:-.002em;">r4</div></span><img style="position:absolute;left:208pt;top:263.64pt;width:49pt;height:14pt;z-index:143;" src="./target/084cc801b4c9e8dc9e0caa2b250f8e27.png" alt="__rendered_path__143" /><span style="white-space:pre;"><div style="position:absolute;top:280.59pt;left:228.88pt;z-index:437;letter-spacing:-.002em;">r5</div></span><img style="position:absolute;left:208pt;top:277.8pt;width:49pt;height:14pt;z-index:143;" src="./target/084cc801b4c9e8dc9e0caa2b250f8e27.png" alt="__rendered_path__143" /><span style="white-space:pre;"><div style="position:absolute;top:294.75pt;left:228.88pt;z-index:447;letter-spacing:-.002em;">r6</div></span><img style="position:absolute;left:208pt;top:292.08pt;width:49pt;height:14pt;z-index:143;" src="./target/084cc801b4c9e8dc9e0caa2b250f8e27.png" alt="__rendered_path__143" /><span style="white-space:pre;"><div style="position:absolute;top:309.03pt;left:228.88pt;z-index:433;letter-spacing:-.002em;">r7</div></span><img style="position:absolute;left:208pt;top:306.36pt;width:49pt;height:14pt;z-index:143;" src="./target/084cc801b4c9e8dc9e0caa2b250f8e27.png" alt="__rendered_path__143" /><span style="white-space:pre;"><div style="position:absolute;top:323.43pt;left:228.88pt;z-index:431;letter-spacing:-.002em;">r8</div></span><img style="position:absolute;left:208pt;top:320.64pt;width:49pt;height:14pt;z-index:143;" src="./target/084cc801b4c9e8dc9e0caa2b250f8e27.png" alt="__rendered_path__143" /><span style="white-space:pre;"><div style="position:absolute;top:337.59pt;left:228.88pt;z-index:429;letter-spacing:-.002em;">r9</div></span><img style="position:absolute;left:208pt;top:334.92pt;width:49pt;height:14pt;z-index:143;" src="./target/084cc801b4c9e8dc9e0caa2b250f8e27.png" alt="__rendered_path
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 5</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-12"><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:49.3622pt;left:522.76pt;z-index:74;letter-spacing:.001em;">p</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:49.3622pt;left:557.2pt;z-index:76;">e</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:91.242pt;left:514pt;z-index:91;letter-spacing:.001em;">o</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:91.242pt;left:561.4pt;z-index:93;">e</div></span><span class="fmt-13" style="white-space:pre;"><div style="position:absolute;top:158.53pt;left:195.64pt;z-index:454;">n</div></span><span class="fmt-13" style="white-space:pre;"><div style="position:absolute;top:158.53pt;left:202.6pt;z-index:455;"> </div></span><span class="fmt-14" style="white-space:pre;"><div style="position:absolute;top:180.57pt;left:521.56pt;z-index:510;">o</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:200.68pt;z-index:26;">t</div></span><span class="fmt-13" style="white-space:pre;"><div style="position:absolute;top:158.53pt;left:139.24pt;z-index:453;letter-spacing:.001em;">Registers i</div></span><img style="position:absolute;left:174.4pt;top:178.16pt;width:12pt;height:18pt;z-index:460;" src="./target/44899ede1167ff22e0978a9c302f5c39.png" alt="__rendered_path__460" /><span style="white-space:pre;"><div style="position:absolute;top:203.07pt;left:176.32pt;z-index:312;letter-spacing:-.002em;">r0</div></span><span style="white-space:pre;"><div style="position:absolute;top:218.07pt;left:176.32pt;z-index:310;letter-spacing:-.002em;">r1</div></span><span style="white-space:pre;"><div style="position:absolute;top:231.63pt;left:176.32pt;z-index:308;letter-spacing:-.002em;">r2</div></span><span style="white-space:pre;"><div style="position:absolute;top:246.63pt;left:176.32pt;z-index:314;letter-spacing:-.002em;">r3</div></span><span style="white-space:pre;"><div style="position:absolute;top:260.79pt;left:176.32pt;z-index:304;letter-spacing:-.002em;">r4</div></span><span style="white-space:pre;"><div style="position:absolute;top:274.35pt;left:176.32pt;z-index:306;letter-spacing:-.002em;">r5</div></span><span style="white-space:pre;"><div style="position:absolute;top:288.51pt;left:176.32pt;z-index:316;letter-spacing:-.002em;">r6</div></span><span style="white-space:pre;"><div style="position:absolute;top:302.91pt;left:176.32pt;z-index:302;letter-spacing:-.002em;">r7</div></span><span style="white-space:pre;"><div style="position:absolute;top:317.19pt;left:176.32pt;z-index:299;letter-spacing:-.002em;">r8</div></span><span style="white-space:pre;"><div style="position:absolute;top:331.35pt;left:176.32pt;z-index:297;letter-spacing:-.002em;">r9</div></span><span style="white-space:pre;"><div style="position:absolute;top:345.51pt;left:174.04pt;z-index:292;letter-spacing:.001em;">r10</div></span><span style="white-space:pre;"><div style="position:absolute;top:359.79pt;left:174.04pt;z-index:295;letter-spacing:.001em;">r11</div></span><span style="white-space:pre;"><div style="position:absolute;top:374.19pt;left:174.04pt;z-index:289;letter-spacing:.001em;">r12</div></span><span style="white-space:pre;"><div style="position:absolute;top:388.47pt;left:166.36pt;z-index:286;letter-spacing:.001em;">r13 (sp)</div></span><span style="white-space:pre;"><div style="position:absolute;top:402.63pt;left:166.36pt;z-index:278;letter-spacing:-.001em;">r14 (lr)</div></span><span style="white-space:pre;"><div style="position:absolute;top:416.91pt;left:165.4pt;z-index:269;">r15 (pc)</div></span><span style="white-space:pre;"><div style="position:absolute;top:448.71pt;left:172.48pt;z-index:260;letter-spacing:.002em;">cpsr</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:25;">The ARM Instruction Se</div></span><span class="fmt-1" style="whit
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 6</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-16"><span style="white-space:pre;"><div style="position:absolute;top:269.85pt;left:684.88pt;z-index:367;">t</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:49.3622pt;left:174.4pt;z-index:86;letter-spacing:.001em;">Accessing Registers using </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:91.242pt;left:261.88pt;z-index:102;letter-spacing:.001em;">ARM Instructions</div></span><span style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.44pt;z-index:150;letter-spacing:-.001em;"><span class="fmt-15">*</span> No breakdown of currently accessible registers.</div></span><span class="fmt-15" style="white-space:pre;"><div style="position:absolute;top:183.69pt;left:137.32pt;z-index:195;letter-spacing:-.003em;">• All instructions can access r0-r14 directly.</div></span><span class="fmt-15" style="white-space:pre;"><div style="position:absolute;top:212.49pt;left:137.32pt;z-index:239;letter-spacing:-.003em;">• Most instructions also allow use of the PC.</div></span><span style="white-space:pre;"><div style="position:absolute;top:241.17pt;left:98.4381pt;z-index:295;"><span class="fmt-15">*</span> Specific instructions to allow access to CPSR and SPSR.</div></span><span style="white-space:pre;"><div style="position:absolute;top:269.85pt;left:98.438pt;z-index:366;"><span class="fmt-15">*</span> Note : When in a privileged mode, it is also possible to load / store </div></span><span style="white-space:pre;"><div style="position:absolute;top:291.33pt;left:122.68pt;z-index:421;">(banked out) user mode registers to or from memory.</div></span><span class="fmt-15" style="white-space:pre;"><div style="position:absolute;top:320.01pt;left:137.32pt;z-index:445;letter-spacing:-.005em;">• See later for details. </div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:93.5197pt;z-index:56;">RM Instruction Set - ARM University Program - V1.0</div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><span style="white-space:pre;"><div style="position:absolute;top:269.85pt;left:691.48pt;z-index:370;letter-spacing:-.002em;">he </div></span><img style="position:absolute;left:623.08pt;top:484.04pt;width:108pt;height:96pt;z-index:3;" src="./target/c6053f756b075808893b5298e38e1f84.png" alt="__rendered_path__3" /><img style="position:absolute;left:723.88pt;top:559.76pt;width:6pt;height:6pt;z-index:58;" src="./target/58efb4d00cfdb6014dbb515b1afcaef7.png" alt="__rendered_path__58" /><img style="position:absolute;left:723.82pt;top:560.22pt;width:5.6pt;height:5.6pt;z-index:59;" src="./target/ce6513985399c0e12fc064993de3a583.png" alt="__rendered_path__59" /><img style="position:absolute;left:641.92pt;top:505.04pt;width:72.5992pt;height:68.28pt;z-index:60;" src="./target/7411ebe8c009fe014a242380fa9c7f7d.png" alt="Image_64_0" /><img style="position:absolute;left:43.12pt;top:14pt;width:755.8pt;height:567pt;z-index:446;" src="./target/0901647d626b9293db6430463286fe9d.png" alt="__rendered_path__446" /><span class="fmt-0" style="white-space:pre;"><div style="pos
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 7</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-18">
<img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" />
<img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" />
<img style="position:absolute;left:134.06pt;top:244.54pt;width:27.5pt;height:27.6pt;z-index:508;" src="./target/b67b57047626311dbab44d05d32cfd3e.png" alt="__rendered_path__508" />
<img style="position:absolute;left:602.86pt;top:211.34pt;width:11.9pt;height:25.8pt;z-index:509;" src="./target/d0a947a3ff236a101ee0ffec985df0c6.png" alt="__rendered_path__509" />
<img style="position:absolute;left:158.26pt;top:209.54pt;width:76pt;height:27pt;z-index:510;" src="./target/ab30029c4c81c6bb04eb07dea32e55ce.png" alt="__rendered_path__510" />
<img style="position:absolute;left:635.38pt;top:209.06pt;width:75.3pt;height:26.4pt;z-index:511;" src="./target/fe53f4ba0e18cf80ab0ee5d182afa542.png" alt="__rendered_path__511" />
<img style="position:absolute;left:267.22pt;top:208pt;width:1.1pt;height:7.6pt;z-index:513;" src="./target/20e877dbe9395a40af5cd4982269f149.png" alt="__rendered_path__513" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:49.3622pt;left:144.16pt;z-index:88;letter-spacing:.001em;">The Program Status Registers</div></span><img style="position:absolute;left:582.1pt;top:209.04pt;width:35pt;height:26.9pt;z-index:512;" src="./target/e8df83956786a8bf4a55d7dc64af2db8.png" alt="__rendered_path__512" /><img style="position:absolute;left:284.62pt;top:207.98pt;width:1.1pt;height:8.7pt;z-index:514;" src="./target/bfc0ec4f45fa5d691e048c7e88fbbab4.png" alt="__rendered_path__514" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:91.242pt;left:252.28pt;z-index:104;letter-spacing:.001em;">(CPSR and SPSRs)</div></span><img style="position:absolute;left:301.9pt;top:207.98pt;width:1.1pt;height:8.7pt;z-index:514;" src="./target/bfc0ec4f45fa5d691e048c7e88fbbab4.png" alt="__rendered_path__514" /><span class="fmt-21" style="white-space:pre;"><div style="position:absolute;top:191.78pt;left:162.76pt;z-index:532;letter-spacing:.003em;">31</div><div style="position:absolute;top:191.78pt;left:223.36pt;z-index:532;letter-spacing:.003em;"><span style="position:relative;left:0pt;top:-1pt;">2</span><span style="position:relative;left:0pt;top:-1pt;">8</span></div><div style="position:absolute;top:191.78pt;left:572.44pt;z-index:532;">8</div><div style="position:absolute;top:190.58pt;left:638.56pt;z-index:532;">4</div><div style="position:absolute;top:190.58pt;left:703.72pt;z-index:532;">0</div></span><img style="position:absolute;left:319.3pt;top:207.98pt;width:1.1pt;height:8.7pt;z-index:514;" src="./target/bfc0ec4f45fa5d691e048c7e88fbbab4.png" alt="__rendered_path__514" /><span class="fmt-20" style="white-space:pre;"><div style="position:absolute;top:216.47pt;left:163.36pt;z-index:540;letter-spacing:.02em;">N <span style="position:relative;left:0pt;top:-1pt;">Z</span> <span style="position:relative;left:0pt;top:-1pt;">C</span> <span style="position:relative;left:0pt;top:-1pt;">V</span></div><div style="position:absolute;top:216.47pt;left:588.64pt;z-index:540;letter-spacing:.001em;"><span style="position:relative;left:0pt;top:3pt;">I</span><span style="position:relative;left:0pt;top:3pt;"> </span><span style="position:relative;left:0pt;top:3pt;"> </span><span style="position:relative;left:0pt;top:3pt;"> </span><span style="position:relative;left:0pt;top:3pt;">F</span><span style="position:relative;left:0pt;top:3pt;"> </span><span style="position:relative;left:0pt;top:3pt;"> </span><span style="position:relative;left:0pt;top:3pt;">T</span></div><div style="position:absolute;top:216.47pt;left:653.92pt;z-index:540;letter-spacing:.002em;"><span style="position:relative;left:0pt;top:4pt;">M</span><span style="position:relative;left:0pt;top:4pt;">o</span><span style="position:relative;left:0pt;top:4pt;">d</span><span style="position:relative;left:0pt;top:4pt;">e</span></div></span><img style="position:absolute;left:336.7pt;top:207.98pt;width:1.1pt;height:8.7pt;z-index:514;" src="./target/bfc0ec4f45fa5d691e048c7e88fbbab4.png" alt="__rendered_path__514" /><span class="fmt-17" style="white-space:pre;"><div style="position:absolute;top:276.23pt;left:99.2789pt;z-index:150;">Copies of the ALU status flags (latched if the</div></span><img style="position:absolute;left:353.98pt;top:207.98pt;width:1.1pt;height:8.7pt;z-index:514;" src="./target/bfc0ec4f45fa5d691e048c7e88fbbab4.png" alt="__rendered_path__514" /><span class="fmt-17" style="white-space:pre;"><div style="position:absolute;top:293.27pt;left:99.279pt;z-index:183;">instruction has the "S" bit set).</div></span><img style="position:absolute;left:723.82pt;top:560.22pt;width:5.6pt;height:5.6pt;z-index:59;" src="./target/ce6513985399c0e12fc064993de3a583.png" alt="__rendered_path__59" /><img style="position:absolute;left:371.38pt;top:207.98pt;width:1.1pt;height:8.7pt;z-index:514;" src="./target/bfc0ec4f45fa5d691e048c7e88fbbab4.png" alt="__rend
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 8</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-23"><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:433.24pt;z-index:492;letter-spacing:.001em;">n</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:467.68pt;z-index:494;letter-spacing:.001em;">F</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:102.64pt;z-index:10;">M</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:185.32pt;z-index:24;letter-spacing:.001em;">S</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:234.28pt;z-index:31;">M</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:248.2pt;z-index:33;">U</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:93.5197pt;z-index:9;">R</div></span><span class="fmt-22" style="white-space:pre;"><div style="position:absolute;top:202.42pt;left:113.08pt;z-index:106;letter-spacing:.001em;">Flag</div></span><img style="position:absolute;left:113.08pt;top:219.08pt;width:34pt;height:3pt;z-index:107;" src="./target/0d9e8bea7d53d26dd096547d916bbc38.png" alt="__rendered_path__107" /><span style="white-space:pre;"><div style="position:absolute;top:240.94pt;left:113.08pt;z-index:115;letter-spacing:.001em;">Negative</div></span><span style="white-space:pre;"><div style="position:absolute;top:260.14pt;left:113.08pt;z-index:165;">(N=1)</div></span><span style="white-space:pre;"><div style="position:absolute;top:317.98pt;left:113.08pt;z-index:216;">Zero</div></span><span style="white-space:pre;"><div style="position:absolute;top:337.18pt;left:113.08pt;z-index:271;letter-spacing:.001em;">(Z=1)</div></span><span style="white-space:pre;"><div style="position:absolute;top:375.7pt;left:113.08pt;z-index:276;">Carry</div></span><span style="white-space:pre;"><div style="position:absolute;top:395.02pt;left:113.08pt;z-index:335;">(C=1)</div></span><span style="white-space:pre;"><div style="position:absolute;top:433.54pt;left:113.08pt;z-index:368;letter-spacing:.001em;">oVerflow</div></span><span style="white-space:pre;"><div style="position:absolute;top:452.74pt;left:113.08pt;z-index:416;">(V=1)</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:113.2pt;z-index:23;letter-spacing:.001em;"> Instruction </div></span><img style="position:absolute;left:113.08pt;top:180.56pt;width:76pt;height:3pt;z-index:61;" src="./target/78c0528c83b82ff6b9b873e8dc84fcd4.png" alt="__rendered_path__61" /><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:193.72pt;z-index:28;letter-spacing:-.001em;">et -</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:216.28pt;z-index:30;letter-spacing:-.013em;">AR</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:244.72pt;z-index:32;letter-spacing:.001em;"> </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:275.92pt;z-index:491;letter-spacing:.001em;">Conditio</div></span><span class="fmt-22" style="white-space:pre;"><div style="position:absolute;top:163.9pt;left:264.04pt;z-index:80;letter-spacing:.002em
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 9</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-25"><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3619pt;left:169.12pt;z-index:550;letter-spacing:.001em;">The Program Counter (R15)</div></span><span style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.4396pt;z-index:106;letter-spacing:-.001em;"><span class="fmt-24">*</span> When the processor is executing in ARM state:</div></span><span class="fmt-24" style="white-space:pre;"><div style="position:absolute;top:183.69pt;left:137.32pt;z-index:145;letter-spacing:-.003em;">• All instructions are 32 bits in length</div></span><span class="fmt-24" style="white-space:pre;"><div style="position:absolute;top:212.49pt;left:137.32pt;z-index:183;letter-spacing:-.003em;">• All instructions must be word aligned</div></span><span class="fmt-24" style="white-space:pre;"><div style="position:absolute;top:241.17pt;left:137.32pt;z-index:257;letter-spacing:-.002em;">• Therefore the PC value is stored in bits [31:2] with bits [1:0] equal to </div></span><span class="fmt-24" style="white-space:pre;"><div style="position:absolute;top:262.65pt;left:156.88pt;z-index:314;">zero (as instruction cannot be halfword or byte aligned).</div></span><span style="white-space:pre;"><div style="position:absolute;top:291.33pt;left:98.4403pt;z-index:386;"><span class="fmt-24">*</span> R14 is used as the subroutine link register (LR) and stores the return </div></span><img style="position:absolute;left:723.82pt;top:560.22pt;width:5.6pt;height:5.6pt;z-index:59;" src="./target/ce6513985399c0e12fc064993de3a583.png" alt="__rendered_path__59" /><span style="white-space:pre;"><div style="position:absolute;top:312.81pt;left:122.68pt;z-index:442;">address when Branch with Link operations are performed, </div></span><span style="white-space:pre;"><div style="position:absolute;top:334.29pt;left:122.68pt;z-index:465;">calculated from the PC.</div></span><span style="white-space:pre;"><div style="position:absolute;top:362.97pt;left:98.4393pt;z-index:501;"><span class="fmt-24">*</span> Thus to return from a linked branch</div></span><span class="fmt-26" style="white-space:pre;"><div style="position:absolute;top:390.33pt;left:137.32pt;z-index:513;letter-spacing:.002em;"><span class="fmt-24"></span> MOV r15,r14</div></span><span style="white-space:pre;"><div style="position:absolute;top:420.33pt;left:122.68pt;z-index:515;letter-spacing:.001em;">or</div></span><img style="position:absolute;left:43.12pt;top:14pt;width:755.8pt;height:567pt;z-index:551;" src="./target/0901647d626b9293db6430463286fe9d.png" alt="__rendered_path__551" /><span class="fmt-26" style="white-space:pre;"><div style="position:absolute;top:447.69pt;left:137.32pt;z-index:525;letter-spacing:.002em;"><span class="fmt-24"></span> MOV pc,lr</div></span><img style="position:absolute;left:623.08pt;top:484.04pt;width:108pt;height:96pt;z-index:3;" src="./target/c6053f756b075808893b5298e38e1f84.png" alt="__rendered_path__3" /><img style="position:absolute;left:723.88pt;top:559.76pt;width:6pt;height:6pt;z-index:58;" src="./target/58efb4d00cfdb6014dbb51
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 10</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-31"><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:49.3621pt;left:510.88pt;z-index:520;letter-spacing:.001em;">d</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:91.2419pt;left:511.96pt;z-index:540;letter-spacing:.001em;">T</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:91.2419pt;left:591.76pt;z-index:544;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:93.5197pt;z-index:9;">R</div></span><span class="fmt-27" style="white-space:pre;"><div style="position:absolute;top:181.17pt;left:79.9596pt;z-index:62;">*</div></span><span class="fmt-27" style="white-space:pre;"><div style="position:absolute;top:460.17pt;left:79.9603pt;z-index:412;">*</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:8;letter-spacing:.003em;">The A</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:49.3621pt;left:241.36pt;z-index:519;letter-spacing:.001em;">Exception Han</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:91.2419pt;left:231.52pt;z-index:539;letter-spacing:.001em;">and the Vector </div></span><span class="fmt-28" style="white-space:pre;"><div style="position:absolute;top:181.17pt;left:104.2pt;z-index:97;">When an exception occurs, <span class="fmt-29">t</span><span class="fmt-29">h</span><span class="fmt-29">e</span><span class="fmt-29"> </span><span class="fmt-29">c</span><span class="fmt-29">o</span><span class="fmt-29">r</span><span class="fmt-29">e</span><span class="fmt-29">:</span></div></span><span style="white-space:pre;"><div style="position:absolute;top:204.55pt;left:118.84pt;z-index:126;letter-spacing:-.001em;"><span class="fmt-30"></span> Copies CPSR into SPSR_&lt;mode&gt;</div></span><span style="white-space:pre;"><div style="position:absolute;top:230.23pt;left:118.84pt;z-index:154;letter-spacing:-.002em;"><span class="fmt-30"></span> Sets appropriate CPSR bits </div></span><span style="white-space:pre;"><div style="position:absolute;top:260.62pt;left:177.16pt;z-index:201;letter-spacing:.001em;">If core implements ARM Architecture 4T and is </div></span><img style="position:absolute;left:159.2pt;top:270.48pt;width:6pt;height:3pt;z-index:155;" src="./target/4e0d8c4b36630c41663f1cbdd157e8b1.png" alt="__rendered_path__155" /><span style="white-space:pre;"><div style="position:absolute;top:279.82pt;left:177.16pt;z-index:231;letter-spacing:.001em;">currently in Thumb state, then</div></span><span style="white-space:pre;"><div style="position:absolute;top:305.5pt;left:211.12pt;z-index:253;letter-spacing:.002em;">ARM state is entered.</div></span><img style="position:absolute;left:198.4pt;top:313.54pt;width:6pt;height:6pt;z-index:232;" src="./target/837bcc38d27afc917ea051f691a69882.png" alt="__rendered_path__232" /><span style="white-space:pre;"><div style="position:absolute;top:331.18pt;left:177.16pt;z-index:269;letter-spacing:.001em;">Mode field bits </div></span><img style="position:absolute;left:159.2pt;top:341.04pt;width:6pt;height:3pt;z-index:155;" src="./target/4e0d8c4b36630c41663f1cbdd157e8b1.png" alt="__rendered_path__155" /><span style="white-space:pre;"><div style="position:absolute;top:356.86pt;left:177.16pt;z-index:308;letter-spacing:.001em;">Interrupt disable flags if appropriate.</div></span><img style="position:absolute;left:159.2pt;top:366.72pt;width:6pt;height:3pt;z-index:155;" src="./target/4e0d8c4b36630c41663f1cbdd157e8b1.png" alt="__rendered_path__155" /><span style="white-space:pre;"><div style="position:absolute;top:377.83pt;left:118.84pt;z-index:345;letter-spacing:-.002em;"><span class="fmt-30"></span> Maps in appropriate banked registers</div></span><span style="white-space:pre;"><div style="position:absolute;top:403.51pt;left:118.84pt;z-index:385;let
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 11</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-36"><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:120.28pt;z-index:13;letter-spacing:.001em;">n</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-35" style="white-space:pre;"><div style="position:absolute;top:153.57pt;left:107.56pt;z-index:86;">*</div></span><span class="fmt-35" style="white-space:pre;"><div style="position:absolute;top:483.57pt;left:107.56pt;z-index:268;">*</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:93.5197pt;z-index:12;letter-spacing:.002em;">RM I</div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><img style="position:absolute;left:298.9pt;top:283.08pt;width:117.3pt;height:46.1pt;z-index:372;" src="./target/2780cfc52d2ee88ca6d3f9557fc04b4f.png" alt="__rendered_path__372" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:202.6pt;z-index:85;letter-spacing:.001em;">The Instruction Pipeline</div></span><img style="position:absolute;left:299.02pt;top:353.76pt;width:117.3pt;height:46.1pt;z-index:372;" src="./target/2780cfc52d2ee88ca6d3f9557fc04b4f.png" alt="__rendered_path__372" /><img style="position:absolute;left:353.62pt;top:329.82pt;width:2.1pt;height:11.3pt;z-index:391;" src="./target/648143e57fb97f0a9d34618b58a7b652.png" alt="__rendered_path__391" /><span style="white-space:pre;"><div style="position:absolute;top:153.57pt;left:131.8pt;z-index:156;">The ARM uses a pipeline in order to increase the speed of the flow of </div></span><img style="position:absolute;left:298.9pt;top:421.44pt;width:117.3pt;height:46.1pt;z-index:372;" src="./target/2780cfc52d2ee88ca6d3f9557fc04b4f.png" alt="__rendered_path__372" /><img style="position:absolute;left:353.62pt;top:399.74pt;width:2.1pt;height:9.9pt;z-index:393;" src="./target/d51c75814b3f65f6e8b474d6b51f4059.png" alt="__rendered_path__393" /><span style="white-space:pre;"><div style="position:absolute;top:175.05pt;left:131.8pt;z-index:186;">instructions to the processor.</div></span><span class="fmt-35" style="white-space:pre;"><div style="position:absolute;top:203.73pt;left:147.52pt;z-index:258;letter-spacing:-.002em;">• Allows several operations to be undertaken simultaneously, rather than </div></span><span class="fmt-35" style="white-space:pre;"><div style="position:absolute;top:225.33pt;left:166.96pt;z-index:267;">serially.</div></span><span class="fmt-37" style="white-space:pre;"><div style="position:absolute;top:258.6pt;left:233.56pt;z-index:578;letter-spacing:-.001em;">ARM</div></span><img style="position:absolute;left:157.84pt;top:274.4pt;width:152pt;height:3pt;z-index:579;" src="./target/42a04203e18a66fa4b692dd2da948076.png" alt="__rendered_path__579" /><span class="fmt-37" style="white-space:pre;"><div style="position:absolute;top:299.16pt;left:235.36pt;z-index:565;letter-spacing:-.001em;">PC</div><div style="position:absolute;top:299.16pt;left:327.64pt;z-index:565;letter-spacing:-.002em;"><span style="position:relative;left:0pt;top:-2pt;">F</span><span style="position:relative;left:0pt;top:-2pt;">E</span><span style="position:relative;left:0pt;top:-2pt;">T</span><span style="p
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 12</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-39"><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:277pt;z-index:76;letter-spacing:.001em;">Quiz #1 - Verbal</div></span><span style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.439pt;z-index:148;"><span class="fmt-38">*</span> What registers are used to store the program counter and link register?</div></span><span style="white-space:pre;"><div style="position:absolute;top:241.17pt;left:98.439pt;z-index:181;letter-spacing:-.001em;"><span class="fmt-38">*</span> What is r13 often used to store?</div></span><span style="white-space:pre;"><div style="position:absolute;top:327.21pt;left:98.4392pt;z-index:248;"><span class="fmt-38">*</span> Which mode, or modes has the fewest available number of registers </div></span><span style="white-space:pre;"><div style="position:absolute;top:348.69pt;left:122.68pt;z-index:276;">available? How many and why?</div></span><img style="position:absolute;left:641.92pt;top:505.04pt;width:72.5992pt;height:68.28pt;z-index:61;" src="./target/7411ebe8c009fe014a242380fa9c7f7d.png" alt="Image_133_0" /><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:56;">The ARM Instruction Set - ARM University Program - V1.0</div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><img style="position:absolute;left:623.08pt;top:484.04pt;width:108pt;height:96pt;z-index:3;" src="./target/c6053f756b075808893b5298e38e1f84.png" alt="__rendered_path__3" /><img style="position:absolute;left:723.88pt;top:559.76pt;width:6pt;height:6pt;z-index:59;" src="./target/58efb4d00cfdb6014dbb515b1afcaef7.png" alt="__rendered_path__59" /><img style="position:absolute;left:723.82pt;top:560.22pt;width:5.6pt;height:5.6pt;z-index:60;" src="./target/ce6513985399c0e12fc064993de3a583.png" alt="__rendered_path__60" /><img style="position:absolute;left:43.12pt;top:14pt;width:755.8pt;height:567pt;z-index:277;" src="./target/0901647d626b9293db6430463286fe9d.png" alt="__rendered_path__277" /><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:759.16pt;z-index:58;letter-spacing:-.002em;">12</div></span></div>
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 13</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-45"><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:50.5622pt;left:570.76pt;z-index:83;letter-spacing:.001em;">o</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:50.5622pt;left:165.4pt;z-index:82;letter-spacing:.001em;">ARM Instruction Set F</div></span><span class="fmt-46" style="white-space:pre;"><div style="position:absolute;top:127.34pt;left:69.0394pt;z-index:1321;">31</div><div style="position:absolute;top:127.34pt;left:119.32pt;z-index:1321;letter-spacing:.023em;">2827</div><div style="position:absolute;top:127.34pt;left:308.08pt;z-index:1321;letter-spacing:.021em;">1615</div><div style="position:absolute;top:127.34pt;left:440.08pt;z-index:1321;letter-spacing:.026em;">87</div><div style="position:absolute;top:127.34pt;left:559.6pt;z-index:1321;">0</div></span><span style="white-space:pre;"><div style="position:absolute;top:152.3pt;left:80.7996pt;z-index:520;letter-spacing:.003em;">Cond 0 0 I Opcode S Rn Rd Operand2 </div></span><img style="position:absolute;left:242.32pt;top:144.12pt;width:15pt;height:26pt;z-index:443;" src="./target/61278b21a4a4d80036a8f96464b6396c.png" alt="__rendered_path__443" /><span style="white-space:pre;"><div style="position:absolute;top:178.46pt;left:80.7994pt;z-index:583;letter-spacing:.003em;">Cond 0 0 0 0 0 0 A S Rd Rn Rs 1 0 0 1 Rm </div></span><img style="position:absolute;left:242.32pt;top:170.4pt;width:15pt;height:26pt;z-index:445;" src="./target/5c5c1ce14e75b2c5e5c67ede216b9d6e.png" alt="__rendered_path__445" /><img style="position:absolute;left:163.6pt;top:144.12pt;width:15pt;height:26pt;z-index:449;" src="./target/51d8a29c0d13ac23d19cda4bf9ae6427.png" alt="__rendered_path__449" /><span style="white-space:pre;"><div style="position:absolute;top:204.74pt;left:80.7996pt;z-index:836;letter-spacing:.003em;">Cond 0 0 0 0 1 U A S RdHi RdLo Rs 1 0 0 1 Rm </div></span><img style="position:absolute;left:210.88pt;top:196.56pt;width:15pt;height:26pt;z-index:443;" src="./target/61278b21a4a4d80036a8f96464b6396c.png" alt="__rendered_path__443" /><img style="position:absolute;left:226.6pt;top:170.4pt;width:15pt;height:26pt;z-index:445;" src="./target/5c5c1ce14e75b2c5e5c67ede216b9d6e.png" alt="__rendered_path__445" /><img style="position:absolute;left:69.2796pt;top:144.12pt;width:62pt;height:26pt;z-index:451;" src="./target/722fa05319136ae54c5ddaa19fa307e4.png" alt="__rendered_path__451" /><span style="white-space:pre;"><div style="position:absolute;top:230.78pt;left:80.6796pt;z-index:659;letter-spacing:.003em;">Cond 0 0 0 1 0 B 0 0 Rn Rd 0 0 0 0 1 0 0 1 Rm </div></span><img style="position:absolute;left:132.16pt;top:170.4pt;width:94pt;height:26pt;z-index:447;" src="./target/1649358bc253aeaca71d7a7bdd39da9b.png" alt="__rendered_path__447" /><img style="position:absolute;left:132.16pt;top:144.12pt;width:31pt;height:26pt;z-index:453;" src="./target/100233d7543c4d1a5648bb8fa4acbfbb.png" alt="__rendered_path__453" /><span style="white-space:pre;"><div style="position:absolute;top:256.94pt;left:80.6784pt;z-index:715;letter-spacing:.003em;">Cond 0 1 I P U B W L Rn Rd Offset </div></span><img style="position:absolute;left:320.92pt;top:144.12pt;width:62pt;height:26pt;z-index:455;" src="./target/fa8e149a1a790a395f6583a25668d6c7.png" alt="__rendered_path__455" /><span style="white-space:pre;"><div style="position:absolute;top:283.1pt;left:80.6781pt;z-index:771;letter-spacing:.003em;">Cond 1 0 0 P U S W L Rn Register List </div></span><img style="position:absolute;left:258.04pt;top:144.12pt;width:62pt;height:26pt;z-index:455;" src="./target/fa8e149a1a790a395f6583a25668d6c7.png" alt="__rendered_path__455" /><span style="white-space:pre;"><div style="position:absolute;top:309.38pt;left:81.1596pt;z-index:902;letter-spacing:.003em;">Cond 0 0 0 P U 1 W L Rn Rd Offset1 1 S H 1 Offset2</div>
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 14</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-47"><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:217.72pt;z-index:82;letter-spacing:.001em;">Conditional Execution</div></span><span class="fmt-48" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.439pt;z-index:154;"><span class="fmt-47">*</span> Most instruction sets only allow branches to be executed conditionally.</div></span><span class="fmt-48" style="white-space:pre;"><div style="position:absolute;top:183.69pt;left:98.438pt;z-index:226;"><span class="fmt-47">*</span> However by reusing the condition evaluation hardware, ARM effectively </div></span><span class="fmt-48" style="white-space:pre;"><div style="position:absolute;top:205.17pt;left:122.68pt;z-index:259;">increases number of instructions.</div></span><span style="white-space:pre;"><div style="position:absolute;top:233.97pt;left:137.32pt;z-index:332;letter-spacing:-.002em;">• All instructions contain a condition field which determines whether the </div></span><span style="white-space:pre;"><div style="position:absolute;top:255.45pt;left:156.76pt;z-index:355;letter-spacing:-.001em;">CPU will execute them. </div></span><span style="white-space:pre;"><div style="position:absolute;top:284.13pt;left:137.32pt;z-index:398;letter-spacing:-.003em;">• Non-executed instructions soak up 1 cycle.</div></span><img style="position:absolute;left:723.82pt;top:560.22pt;width:5.6pt;height:5.6pt;z-index:60;" src="./target/ce6513985399c0e12fc064993de3a583.png" alt="__rendered_path__60" /><span style="white-space:pre;"><div style="position:absolute;top:312.81pt;left:176.2pt;z-index:469;letter-spacing:-.001em;"> Still have to complete cycle so as to allow fetching and decoding of </div></span><span style="white-space:pre;"><div style="position:absolute;top:334.29pt;left:195.64pt;z-index:492;">following instructions.</div></span><span class="fmt-48" style="white-space:pre;"><div style="position:absolute;top:362.97pt;left:98.4395pt;z-index:562;"><span class="fmt-47">*</span> This removes the need for many branches, which stall the pipeline (3 </div></span><span class="fmt-48" style="white-space:pre;"><div style="position:absolute;top:384.45pt;left:122.68pt;z-index:580;letter-spacing:-.001em;">cycles to refill).</div></span><span style="white-space:pre;"><div style="position:absolute;top:413.13pt;left:137.32pt;z-index:630;letter-spacing:-.003em;">• Allows very dense in-line code, without branches.</div></span><span style="white-space:pre;"><div style="position:absolute;top:441.81pt;left:137.32pt;z-index:701;letter-spacing:-.002em;">• The Time penalty of not executing several conditional instructions is </div></span><img style="position:absolute;left:43.12pt;top:14pt;width:755.8pt;height:567pt;z-index:796;" src="./target/0901647d626b9293db6430463286fe9d.png" alt="__rendered_path__796" /><span style="white-space:pre;"><div style="position:absolute;top:463.29pt;left:156.76pt;z-index:745;">frequently less than overhead of the branch </div></span><span style="white-space:pre;"><div style="position:absolut
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 15</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-51"><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:54.0422pt;left:319.6pt;z-index:67;">C</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:54.0422pt;left:347.68pt;z-index:68;letter-spacing:.001em;">o</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:54.0422pt;left:371.32pt;z-index:69;letter-spacing:.001em;">n</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:54.0422pt;left:442.48pt;z-index:73;letter-spacing:.001em;">i</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:54.0422pt;left:453.28pt;z-index:74;letter-spacing:.001em;">o</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:333.4pt;z-index:47;letter-spacing:.001em;">g</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:352.96pt;z-index:50;">m</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:375.28pt;z-index:53;letter-spacing:.001em;">V</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:54.0422pt;left:239.8pt;z-index:66;letter-spacing:.001em;">The </div></span><span class="fmt-49" style="white-space:pre;"><div style="position:absolute;top:157.94pt;left:195.64pt;z-index:90;letter-spacing:.003em;">31</div><div style="position:absolute;top:157.94pt;left:251.08pt;z-index:90;letter-spacing:.003em;"><span style="position:relative;left:0pt;top:-1pt;">2</span><span style="position:relative;left:0pt;top:-1pt;">8</span></div><div style="position:absolute;top:157.94pt;left:318.28pt;z-index:90;letter-spacing:.003em;"><span style="position:relative;left:0pt;top:-1pt;">2</span><span style="position:relative;left:0pt;top:-1pt;">4</span></div></span><span class="fmt-50" style="white-space:pre;"><div style="position:absolute;top:180.45pt;left:202.12pt;z-index:104;letter-spacing:.001em;">Cond</div></span><span style="white-space:pre;"><div style="position:absolute;top:252.59pt;left:105.64pt;z-index:128;">0000 = EQ - Z set (equal)</div></span><span style="white-space:pre;"><div style="position:absolute;top:277.91pt;left:105.64pt;z-index:158;">0001 = NE - Z clear (not equal)</div></span><span style="white-space:pre;"><div style="position:absolute;top:303.23pt;left:105.64pt;z-index:191;">0010 = HS / CS - C set (unsigned </div></span><span style="white-space:pre;"><div style="position:absolute;top:320.03pt;left:154.6pt;z-index:206;">higher or same)</div></span><span style="white-space:pre;"><div style="position:absolute;top:345.23pt;left:105.64pt;z-index:240;">0011 = LO / CC - C clear (unsigned </div></span><span style="white-space:pre;"><div style="position:absolute;top:362.03pt;left:154.6pt;z-index:246;letter-spacing:.001em;">lower)</div></span><span style="white-space:pre;"><div style="position:absolute;top:387.35pt;left:105.64pt;z-index:273;">0100 = MI -N set (negative)</div></span><span style="white-space:pre;"><div style="position:absolute;top:412.55pt;left:105.64pt;z-index:305;">0101 = PL - N clear (positive or </div></span><span style="white-space:pre;"><div style="position:absolute;top:429.35pt;left:154.6pt;z-index:310;letter-spacing:.001em;">zero)</div></span><span style="white-space:pre;"><div style="position:absolute;top:454.67pt;left:105.64pt;z-index:338;letter-spacing:.001em;">0110 = VS - V set (overflow)</div></span><span style="white-space:pre;"><div style="position:absolute;top:479.99pt;left:105.64pt;z-index:370;">0111 = VC - V clear (no overflow)</div></span><span style="white-space:pre;"><div style="position:absolute;top:505.19pt;left:105.64pt;z-index:399;">1000 = HI - C set and Z clear </div></span><span style="white-space:pre;"><div style="position:absolute;top:521.99pt;left:154.6pt;z-index:416;">(unsigned higher)</div></span><span class="fmt-0" style="white-
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 16</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-53"><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:116.68pt;z-index:12;letter-spacing:.001em;">I</div></span><span class="fmt-52" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.44pt;z-index:100;">*</div></span><span class="fmt-52" style="white-space:pre;"><div style="position:absolute;top:341.49pt;left:98.4427pt;z-index:376;">*</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:11;letter-spacing:-.001em;">The ARM </div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:49.3622pt;left:206.8pt;z-index:84;letter-spacing:.001em;">Using and updating the </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:91.242pt;left:281.32pt;z-index:99;letter-spacing:.001em;">Condition Field</div></span><span style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:122.68pt;z-index:168;letter-spacing:.001em;">To execute an instruction conditionally, simply postfix it with the </div></span><span style="white-space:pre;"><div style="position:absolute;top:176.49pt;left:122.68pt;z-index:190;letter-spacing:.001em;">appropriate condition:</div></span><span class="fmt-52" style="white-space:pre;"><div style="position:absolute;top:205.17pt;left:137.32pt;z-index:237;letter-spacing:-.003em;">• For example an add instruction takes the form:</div></span><span class="fmt-26" style="white-space:pre;"><div style="position:absolute;top:232.65pt;left:176.2pt;z-index:272;letter-spacing:-.01em;"><span class="fmt-52"></span> ADD r0,r1,r2</div><div style="position:absolute;top:232.65pt;left:409.24pt;z-index:272;letter-spacing:-.001em;">; r0 = r1 + r2 (ADDAL)</div></span><span class="fmt-52" style="white-space:pre;"><div style="position:absolute;top:262.65pt;left:137.32pt;z-index:318;letter-spacing:-.003em;">• To execute this only if the zero flag is set:</div></span><span class="fmt-26" style="white-space:pre;"><div style="position:absolute;top:290.13pt;left:176.2pt;z-index:357;letter-spacing:-.005em;"><span class="fmt-52"></span> ADDEQ r0,r1,r2 ; If zero flag set then<span class="fmt-52"></span></div></span><img style="position:absolute;left:723.82pt;top:560.22pt;width:5.6pt;height:5.6pt;z-index:60;" src="./target/ce6513985399c0e12fc064993de3a583.png" alt="__rendered_path__60" /><span class="fmt-26" style="white-space:pre;"><div style="position:absolute;top:312.65pt;left:409.24pt;z-index:375;letter-spacing:-.001em;">; ... r0 = r1 + r2</div></span><span style="white-space:pre;"><div style="position:absolute;top:341.49pt;left:122.68pt;z-index:449;letter-spacing:.001em;">By default, data processing operations do not affect the condition flags </div></span><span style="white-space:pre;"><div style="position:absolute;top:362.97pt;left:122.68pt;z-index:522;">(apart from the comparisons where this is the only effect). To cause the </div></span><span style="white-space:pre;"><div style="position:absolute;top:384.45pt;left:122.68pt;z-index:598;letter-spacing:.001em;">condition flags to be updated, the S bit of the instruction needs to be set </div></span><span style="white-space:pre;"><div style="position:absolute;top:405.93pt;left:122.68pt;z-index:665;letter-spacing:.001em;">by postfixing the instruction (and any condition code) with an “S”.</div></span><span class="fmt-52" style="white-space:pre;"><div style="position:absolute;top:434.61pt;left:137.32pt;z-index:725;letter-spacing:-.002em;">• For example to add two numbers and set the condition flags:<
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 17</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-54"><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:102.64pt;z-index:10;">M</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:120.28pt;z-index:13;letter-spacing:.001em;">n</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:93.5197pt;z-index:9;">R</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:113.2pt;z-index:12;"> I</div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><img style="position:absolute;left:141.1pt;top:244.4pt;width:548.7pt;height:30.3pt;z-index:546;" src="./target/18a4a17b28ac95c7509ed0d794919f2f.png" alt="__rendered_path__546" /><img style="position:absolute;left:243.46pt;top:244.52pt;width:1.1pt;height:8.4pt;z-index:548;" src="./target/1b4ef5f400cfedc5710305acd89a3487.png" alt="__rendered_path__548" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:209.92pt;z-index:545;letter-spacing:.001em;">Branch instructions (1)</div></span><img style="position:absolute;left:278.86pt;top:245.46pt;width:2.1pt;height:29.3pt;z-index:547;" src="./target/ee182755860c150710d601d7defc937f.png" alt="__rendered_path__547" /><img style="position:absolute;left:295.54pt;top:245.42pt;width:1.1pt;height:8.7pt;z-index:549;" src="./target/bfc0ec4f45fa5d691e048c7e88fbbab4.png" alt="__rendered_path__549" /><img style="position:absolute;left:140.62pt;top:244.52pt;width:1.1pt;height:8.4pt;z-index:548;" src="./target/1b4ef5f400cfedc5710305acd89a3487.png" alt="__rendered_path__548" /><span class="fmt-26" style="white-space:pre;"><div style="position:absolute;top:153.33pt;left:143.32pt;z-index:85;letter-spacing:.008em;"><span class="fmt-54">*</span> <span class="fmt-55">B</span><span class="fmt-55">r</span><span class="fmt-55">a</span><span class="fmt-55">n</span><span class="fmt-55">c</span><span class="fmt-55">h</span><span class="fmt-55"> </span><span class="fmt-55">:</span></div><div style="position:absolute;top:153.33pt;left:378.76pt;z-index:85;letter-spacing:-.001em;">B{&lt;cond&gt;} label</div></span><img style="position:absolute;left:260.38pt;top:245.46pt;width:2.1pt;height:29.3pt;z-index:547;" src="./target/ee182755860c150710d601d7defc937f.png" alt="__rendered_path__547" /><img style="position:absolute;left:313.06pt;top:245.42pt;width:1.1pt;height:8.7pt;z-index:549;" src="./target/bfc0ec4f45fa5d691e048c7e88fbbab4.png" alt="__rendered_path__549" /><img style="position:absolute;left:349.66pt;top:244.7pt;width:1.1pt;height:8.7pt;z-index:549;" src="./target/bfc0ec4f45fa5d691e048c7e88fbbab4.png" alt="__rendered_path__549" /><span class="fmt-26" style="white-space:pre;"><div style="position:absolute;top:182.01pt;left:143.32pt;z-index:132;letter-spacing:.005em;"><span class="fmt-54">*</span> <span class="fmt-55">B</span><span class="fmt-55">r</span><span class="fmt-55">a</span><span class="fmt-55">n</span><span class="fmt-55">c</span><span class="fmt-55">h</span><span class="fmt-55"> </span><span class="fmt-55">w</span><span class="fmt-55">i</span
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 18</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-60"><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:209.92pt;z-index:84;letter-spacing:.001em;">Branch instructions (2)</div></span><span style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.44pt;z-index:131;"><span class="fmt-59">*</span> When executing the instruction, the processor:</div></span><span class="fmt-59" style="white-space:pre;"><div style="position:absolute;top:183.69pt;left:137.32pt;z-index:210;letter-spacing:-.002em;">• shifts the offset left two bits, sign extends it to 32 bits, and adds it to PC.</div></span><span style="white-space:pre;"><div style="position:absolute;top:212.49pt;left:98.4389pt;z-index:280;"><span class="fmt-59">*</span> Execution then continues from the new PC, once the pipeline has been </div></span><span style="white-space:pre;"><div style="position:absolute;top:233.97pt;left:122.68pt;z-index:289;">refilled.</div></span><span style="white-space:pre;"><div style="position:absolute;top:262.65pt;left:98.4376pt;z-index:357;"><span class="fmt-59">*</span> The "Branch with link" instruction implements a subroutine call by </div></span><span style="white-space:pre;"><div style="position:absolute;top:284.13pt;left:122.68pt;z-index:403;">writing PC-4 into the LR of the current bank. </div></span><img style="position:absolute;left:723.82pt;top:560.22pt;width:5.6pt;height:5.6pt;z-index:60;" src="./target/ce6513985399c0e12fc064993de3a583.png" alt="__rendered_path__60" /><span class="fmt-59" style="white-space:pre;"><div style="position:absolute;top:312.81pt;left:137.32pt;z-index:476;letter-spacing:-.002em;">• i.e. the address of the next instruction following the branch with link </div></span><span class="fmt-59" style="white-space:pre;"><div style="position:absolute;top:334.29pt;left:156.76pt;z-index:504;">(allowing for the pipeline).</div></span><span style="white-space:pre;"><div style="position:absolute;top:362.97pt;left:98.4381pt;z-index:574;"><span class="fmt-59">*</span> To return from subroutine, simply need to restore the PC from the LR:</div></span><span class="fmt-26" style="white-space:pre;"><div style="position:absolute;top:390.33pt;left:137.32pt;z-index:585;letter-spacing:.001em;"><span class="fmt-59"></span> MOV pc, lr</div></span><span class="fmt-59" style="white-space:pre;"><div style="position:absolute;top:420.33pt;left:137.32pt;z-index:643;letter-spacing:-.002em;">• Again, pipeline has to refill before execution continues.</div></span><img style="position:absolute;left:43.12pt;top:14pt;width:755.8pt;height:567pt;z-index:801;" src="./target/0901647d626b9293db6430463286fe9d.png" alt="__rendered_path__801" /><span style="white-space:pre;"><div style="position:absolute;top:449.01pt;left:98.4383pt;z-index:688;"><span class="fmt-59">*</span> The "Branch" instruction does not affect LR.</div></span><span style="white-space:pre;"><div style="position:absolute;top:477.69pt;left:98.4394pt;z-index:754;"><span class="fmt-59">*</span> Note: Architecture 4T offers a further ARM branch instruction, BX</div></span>
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 19</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-61"><span class="fmt-62" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:693.64pt;z-index:158;">n</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:154.96pt;z-index:89;letter-spacing:.001em;">Data processing Instructions</div></span><span class="fmt-62" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.4391pt;z-index:157;"><span class="fmt-61">*</span> Largest family of ARM instructions, all sharing the same instructio</div></span><span class="fmt-62" style="white-space:pre;"><div style="position:absolute;top:176.49pt;left:122.68pt;z-index:166;">format.</div></span><span class="fmt-62" style="white-space:pre;"><div style="position:absolute;top:205.17pt;left:98.4378pt;z-index:176;letter-spacing:-.002em;"><span class="fmt-61">*</span> Contains:</div></span><span style="white-space:pre;"><div style="position:absolute;top:233.97pt;left:137.32pt;z-index:198;letter-spacing:-.005em;">• Arithmetic operations</div></span><span style="white-space:pre;"><div style="position:absolute;top:262.65pt;left:137.32pt;z-index:250;letter-spacing:-.002em;">• Comparisons (no results - just set condition codes) </div></span><span style="white-space:pre;"><div style="position:absolute;top:291.33pt;left:137.32pt;z-index:269;letter-spacing:-.006em;">• Logical operations</div></span><span style="white-space:pre;"><div style="position:absolute;top:320.01pt;left:137.32pt;z-index:301;letter-spacing:-.004em;">• Data movement between registers</div></span><span class="fmt-62" style="white-space:pre;"><div style="position:absolute;top:348.69pt;left:98.4391pt;z-index:347;letter-spacing:-.001em;"><span class="fmt-61">*</span> Remember, this is a load / store architecture</div></span><span style="white-space:pre;"><div style="position:absolute;top:377.37pt;left:137.32pt;z-index:401;letter-spacing:-.002em;">• These instruction only work on registers, <span class="fmt-63">N</span><span class="fmt-63">O</span><span class="fmt-63">T</span> memory.</div></span><span class="fmt-62" style="white-space:pre;"><div style="position:absolute;top:406.05pt;left:98.4399pt;z-index:464;"><span class="fmt-61">*</span> They each perform a specific operation on one or two operands.</div></span><span style="white-space:pre;"><div style="position:absolute;top:434.73pt;left:137.32pt;z-index:500;letter-spacing:-.003em;">• First operand always a register - Rn</div></span><span style="white-space:pre;"><div style="position:absolute;top:463.41pt;left:137.32pt;z-index:551;letter-spacing:-.003em;">• Second operand sent to the ALU via barrel shifter.</div></span><span class="fmt-62" style="white-space:pre;"><div style="position:absolute;top:492.21pt;left:98.4399pt;z-index:595;letter-spacing:-.001em;"><span class="fmt-61">*</span> We will examine the barrel shifter shortly.</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:93.5197pt;z-index:56;">RM Instruction Set - ARM University Program - V1.0</div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 20</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-64"><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:511.96pt;z-index:77;">a</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:546.64pt;z-index:79;letter-spacing:.001em;">i</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:581.08pt;z-index:81;letter-spacing:.001em;">n</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:218.68pt;z-index:76;letter-spacing:.001em;">Arithmetic Oper</div></span><span class="fmt-65" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.4391pt;z-index:98;letter-spacing:-.002em;"><span class="fmt-64">*</span> Operations are:</div></span><span style="white-space:pre;"><div style="position:absolute;top:183.69pt;left:137.32pt;z-index:121;letter-spacing:-.017em;">• ADD</div><div style="position:absolute;top:183.69pt;left:253.84pt;z-index:121;">operand1 + operand2</div></span><span style="white-space:pre;"><div style="position:absolute;top:212.49pt;left:137.32pt;z-index:152;letter-spacing:-.017em;">• ADC</div><div style="position:absolute;top:212.49pt;left:253.84pt;z-index:152;">operand1 + operand2 + carry</div></span><span style="white-space:pre;"><div style="position:absolute;top:241.17pt;left:137.32pt;z-index:174;letter-spacing:-.018em;">• SUB</div><div style="position:absolute;top:241.17pt;left:253.84pt;z-index:174;">operand1 - operand2</div></span><span style="white-space:pre;"><div style="position:absolute;top:269.85pt;left:137.32pt;z-index:208;letter-spacing:-.017em;">• SBC</div><div style="position:absolute;top:269.85pt;left:253.84pt;z-index:208;">operand1 - operand2 + carry -1 </div></span><span style="white-space:pre;"><div style="position:absolute;top:298.53pt;left:137.32pt;z-index:230;letter-spacing:-.017em;">• RSB</div><div style="position:absolute;top:298.53pt;left:253.84pt;z-index:230;">operand2 - operand1</div></span><span style="white-space:pre;"><div style="position:absolute;top:327.21pt;left:137.32pt;z-index:263;letter-spacing:-.017em;">• RSC</div><div style="position:absolute;top:327.21pt;left:253.84pt;z-index:263;">operand2 - operand1 + carry - 1</div></span><span class="fmt-65" style="white-space:pre;"><div style="position:absolute;top:355.89pt;left:98.4388pt;z-index:271;letter-spacing:-.002em;"><span class="fmt-64">*</span> Syntax:</div></span><span style="white-space:pre;"><div style="position:absolute;top:384.57pt;left:137.32pt;z-index:311;letter-spacing:-.003em;">&lt;Operation&gt;{&lt;cond&gt;}{S} Rd, Rn, Operand2</div></span><span class="fmt-65" style="white-space:pre;"><div style="position:absolute;top:413.25pt;left:98.439pt;z-index:320;letter-spacing:-.003em;"><span class="fmt-64">*</span> Examples</div></span><span style="white-space:pre;"><div style="position:absolute;top:441.93pt;left:137.32pt;z-index:335;letter-spacing:-.006em;">• ADD r0, r1, r2</div></span><span style="white-space:pre;"><div style="position:absolute;top:470.73pt;left:137.32pt;z-index:352;letter-spacing:-.006em;">• SUBGT r3, r3, #1</div></span><span style="white-space:pre;"><div style="position:absolute;top:499.41pt;left:137.32pt;z-index:370;letter-spacing:-.005em;">• RSBLES r4, r5, #5</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 21</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-66"><span style="white-space:pre;"><div style="position:absolute;top:183.69pt;left:639.16pt;z-index:164;">S</div></span><span style="white-space:pre;"><div style="position:absolute;top:183.69pt;left:655.24pt;z-index:166;">b</div></span><span style="white-space:pre;"><div style="position:absolute;top:183.69pt;left:670.72pt;z-index:168;letter-spacing:.001em;">t</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:298.48pt;z-index:72;letter-spacing:.001em;">Comparisons</div></span><span class="fmt-67" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.44pt;z-index:113;"><span class="fmt-66">*</span> The only effect of the comparisons is to</div></span><span class="fmt-63" style="white-space:pre;"><div style="position:absolute;top:183.69pt;left:137.32pt;z-index:163;letter-spacing:-.002em;"><span class="fmt-66"></span> UPDATE THE CONDITION FLAGS. <span class="fmt-66">T</span><span class="fmt-66">h</span><span class="fmt-66">u</span><span class="fmt-66">s</span><span class="fmt-66"> </span><span class="fmt-66">n</span><span class="fmt-66">o</span><span class="fmt-66"> </span><span class="fmt-66">n</span><span class="fmt-66">e</span><span class="fmt-66">e</span><span class="fmt-66">d</span><span class="fmt-66"> </span><span class="fmt-66">t</span><span class="fmt-66">o</span><span class="fmt-66"> </span><span class="fmt-66">s</span><span class="fmt-66">e</span><span class="fmt-66">t</span><span class="fmt-66"> </span></div></span><img style="position:absolute;left:156.76pt;top:202.76pt;width:313pt;height:3pt;z-index:141;" src="./target/eefb386a08b9fac6298b24be3d86ae7c.png" alt="__rendered_path__141" /><span class="fmt-67" style="white-space:pre;"><div style="position:absolute;top:212.49pt;left:98.4401pt;z-index:185;letter-spacing:-.002em;"><span class="fmt-66">*</span> Operations are:</div></span><span style="white-space:pre;"><div style="position:absolute;top:241.17pt;left:137.32pt;z-index:231;letter-spacing:-.017em;">• CMP</div><div style="position:absolute;top:241.17pt;left:253.84pt;z-index:231;">operand1 - operand2, but result not written</div></span><span style="white-space:pre;"><div style="position:absolute;top:269.85pt;left:137.32pt;z-index:278;letter-spacing:-.017em;">• CMN</div><div style="position:absolute;top:269.85pt;left:253.84pt;z-index:278;">operand1 + operand2, but result not written</div></span><span style="white-space:pre;"><div style="position:absolute;top:298.53pt;left:137.32pt;z-index:327;letter-spacing:-.017em;">• TST</div><div style="position:absolute;top:298.53pt;left:253.84pt;z-index:327;">operand1 AND operand2, but result not written</div></span><span style="white-space:pre;"><div style="position:absolute;top:327.21pt;left:137.32pt;z-index:376;letter-spacing:-.018em;">• TEQ</div><div style="position:absolute;top:327.21pt;left:253.84pt;z-index:376;">operand1 EOR operand2, but result not written</div></span><span class="fmt-67" style="white-space:pre;"><div style="position:absolute;top:355.89pt;left:98.4438pt;z-index:384;letter-spacing:-.002em;"><span class="fmt-66">*</span> Syntax:</div></span><span style="white-space:pre;"><div style="position:absolute;top:384.57pt;left:137.32pt;z-index:417;letter-spacing:-.003em;">&lt;Operation&gt;{&lt;cond&gt;} Rn, Operand2</div></span><span class="fmt-67" style="white-space:pre;"><div style="position:absolute;t
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 22</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-68"><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:246.64pt;z-index:79;letter-spacing:.001em;">Logical Operations</div></span><span class="fmt-69" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.44pt;z-index:95;letter-spacing:-.002em;"><span class="fmt-68">*</span> Operations are:</div></span><span style="white-space:pre;"><div style="position:absolute;top:183.69pt;left:137.32pt;z-index:120;letter-spacing:-.017em;">• AND</div><div style="position:absolute;top:183.69pt;left:253.84pt;z-index:120;">operand1 AND operand2</div></span><span style="white-space:pre;"><div style="position:absolute;top:212.49pt;left:137.32pt;z-index:145;letter-spacing:-.018em;">• EOR</div><div style="position:absolute;top:212.49pt;left:253.84pt;z-index:145;">operand1 EOR operand2</div></span><span style="white-space:pre;"><div style="position:absolute;top:241.17pt;left:137.32pt;z-index:169;letter-spacing:-.017em;">• ORR</div><div style="position:absolute;top:241.17pt;left:253.84pt;z-index:169;">operand1 OR operand2</div></span><span style="white-space:pre;"><div style="position:absolute;top:269.85pt;left:137.32pt;z-index:213;letter-spacing:-.017em;">• BIC</div><div style="position:absolute;top:269.85pt;left:253.84pt;z-index:213;">operand1 AND NOT operand2 [ie bit clear]</div></span><span class="fmt-69" style="white-space:pre;"><div style="position:absolute;top:298.53pt;left:98.4426pt;z-index:221;letter-spacing:-.002em;"><span class="fmt-68">*</span> Syntax:</div></span><img style="position:absolute;left:723.82pt;top:560.22pt;width:5.6pt;height:5.6pt;z-index:60;" src="./target/ce6513985399c0e12fc064993de3a583.png" alt="__rendered_path__60" /><span style="white-space:pre;"><div style="position:absolute;top:327.21pt;left:137.32pt;z-index:261;letter-spacing:-.003em;">&lt;Operation&gt;{&lt;cond&gt;}{S} Rd, Rn, Operand2</div></span><span class="fmt-69" style="white-space:pre;"><div style="position:absolute;top:355.89pt;left:98.4427pt;z-index:271;letter-spacing:-.002em;"><span class="fmt-68">*</span> Examples:</div></span><span style="white-space:pre;"><div style="position:absolute;top:384.57pt;left:137.32pt;z-index:285;letter-spacing:-.017em;">• AND</div><div style="position:absolute;top:384.57pt;left:253.84pt;z-index:285;letter-spacing:.001em;">r0, r1, r2</div></span><span style="white-space:pre;"><div style="position:absolute;top:413.25pt;left:137.32pt;z-index:301;letter-spacing:-.014em;">• BICEQ</div><div style="position:absolute;top:413.25pt;left:253.84pt;z-index:301;letter-spacing:.001em;">r2, r3, #7</div></span><span style="white-space:pre;"><div style="position:absolute;top:441.93pt;left:137.32pt;z-index:314;letter-spacing:-.015em;">• EORS</div><div style="position:absolute;top:441.93pt;left:253.84pt;z-index:314;">r1,r3,r0</div></span><img style="position:absolute;left:623.08pt;top:484.04pt;width:108pt;height:96pt;z-index:3;" src="./target/c6053f756b075808893b5298e38e1f84.png" alt="__rendered_path__3" /><img style="position:absolute;left:723.88pt;top:5
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 23</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-70"><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:473.32pt;z-index:71;">m</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:529.36pt;z-index:73;letter-spacing:.001em;">n</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:278.92pt;z-index:70;letter-spacing:.001em;">Data Move</div></span><span class="fmt-71" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.4391pt;z-index:90;letter-spacing:-.002em;"><span class="fmt-70">*</span> Operations are:</div></span><span style="white-space:pre;"><div style="position:absolute;top:183.69pt;left:137.32pt;z-index:102;letter-spacing:-.017em;">• MOV</div><div style="position:absolute;top:183.69pt;left:253.84pt;z-index:102;">operand2</div></span><span style="white-space:pre;"><div style="position:absolute;top:212.49pt;left:137.32pt;z-index:118;letter-spacing:-.017em;">• MVN</div><div style="position:absolute;top:212.49pt;left:253.84pt;z-index:118;letter-spacing:.001em;">NOT operand2</div></span><span class="fmt-71" style="white-space:pre;"><div style="position:absolute;top:241.17pt;left:122.68pt;z-index:158;letter-spacing:.001em;">Note that these make no use of operand1.</div></span><span class="fmt-71" style="white-space:pre;"><div style="position:absolute;top:269.85pt;left:98.4393pt;z-index:166;letter-spacing:-.002em;"><span class="fmt-70">*</span> Syntax:</div></span><span style="white-space:pre;"><div style="position:absolute;top:298.53pt;left:137.32pt;z-index:202;letter-spacing:-.003em;">&lt;Operation&gt;{&lt;cond&gt;}{S} Rd, Operand2</div></span><span class="fmt-71" style="white-space:pre;"><div style="position:absolute;top:327.21pt;left:98.4386pt;z-index:212;letter-spacing:-.002em;"><span class="fmt-70">*</span> Examples:</div></span><span style="white-space:pre;"><div style="position:absolute;top:355.89pt;left:137.32pt;z-index:222;letter-spacing:-.017em;">• MOV</div><div style="position:absolute;top:355.89pt;left:253.84pt;z-index:222;">r0, r1</div></span><span style="white-space:pre;"><div style="position:absolute;top:384.57pt;left:137.32pt;z-index:234;letter-spacing:-.015em;">• MOVS</div><div style="position:absolute;top:384.57pt;left:253.84pt;z-index:234;letter-spacing:.001em;">r2, #10</div></span><span style="white-space:pre;"><div style="position:absolute;top:413.25pt;left:137.32pt;z-index:245;letter-spacing:-.013em;">• MVNEQ</div><div style="position:absolute;top:413.25pt;left:253.84pt;z-index:245;">r1,#0</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:93.5197pt;z-index:56;">RM Instruction Set - ARM University Program - V1.0</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:507.76pt;z-index:72;">e</div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:553pt;z-index:74;">t</div></span><img style="position:absolute;left:623
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 24</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-74"><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:448.24pt;z-index:67;">#</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:301.96pt;z-index:42;">y</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:312.4pt;z-index:44;letter-spacing:.001em;">P</div></span><img style="position:absolute;left:64.3596pt;top:213.96pt;width:9pt;height:14pt;z-index:143;" src="./target/00ddb66eaafb5cd71cad19414d99c1ab.png" alt="__rendered_path__143" /><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><img style="position:absolute;left:66.3996pt;top:506.12pt;width:14pt;height:9pt;z-index:141;" src="./target/a450beae758d72e90185dce9587b8059.png" alt="__rendered_path__141" /><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-73" style="white-space:pre;"><div style="position:absolute;top:378pt;left:163.96pt;z-index:158;">Yes </div></span><img style="position:absolute;left:156.16pt;top:417.4pt;width:13pt;height:13pt;z-index:135;" src="./target/a40e3ab31f044c09621ce74ed171681c.png" alt="__rendered_path__135" /><span class="fmt-72" style="white-space:pre;"><div style="position:absolute;top:440.71pt;left:105.88pt;z-index:118;letter-spacing:.001em;">r0 = r0 - r1</div></span><img style="position:absolute;left:102.4pt;top:436.4pt;width:109pt;height:39pt;z-index:105;" src="./target/ad7eb9cb4c46b8e134b8457b270b4d87.png" alt="__rendered_path__105" /><img style="position:absolute;left:96.0396pt;top:430.16pt;width:109pt;height:39pt;z-index:106;" src="./target/408898fa44b818043175a8f0ff45e4fb.png" alt="__rendered_path__106" /><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:93.5197pt;z-index:28;letter-spacing:.001em;">RM Instruction Set -</div></span><span class="fmt-72" style="white-space:pre;"><div style="position:absolute;top:163.99pt;left:238.84pt;z-index:76;">Start</div></span><img style="position:absolute;left:256.12pt;top:230.16pt;width:9pt;height:14pt;z-index:132;" src="./target/e634a7f436cee227a3a2c034039142af.png" alt="__rendered_path__132" /><img style="position:absolute;left:249.16pt;top:210.56pt;width:14pt;height:9pt;z-index:145;" src="./target/ce3a717688e12fdf459b94df25b295ea.png" alt="__rendered_path__145" /><span class="fmt-72" style="white-space:pre;"><div style="position:absolute;top:259.03pt;left:232pt;z-index:92;letter-spacing:.001em;">r0 = r1</div></span><span class="fmt-72" style="white-space:pre;"><div style="position:absolute;top:279.55pt;left:254.8pt;z-index:93;letter-spacing:.001em;">?</div></span><img style="position:absolute;left:211.24pt;top:249.12pt;width:112pt;height:62pt;z-index:83;" src="./target/10955c6d5d14227513717ac9082f3afa.png" alt="__rendered_path__83" /><img style="position:absolute;left:204.88pt;top:242.88pt;width:112pt;height:62pt;z-index:84;" src="./target/dbb6c0565e9f27d57c99373748221c71.png" alt="__rendered_path__84" /><span class="fmt-73" style="white-space:pre;"><div style="position:absolute;top:315.12pt;left:271.6pt;z-index:161;letter-spacing:.002em;">No </div></span><img style="position:absolute;left:256.12pt;top:338.64pt;width:9pt;height:14pt;z-index:132;" src="./target/e634a7f436cee227a3a2c034039142af.png" alt="__rendered_path__132" /><span class="fmt-72" style="white-space:pre;"><div style="position:absolute;top:369.19pt;left:232pt;z-index:103;letter-spacing:.001em;">r0 &gt; r1</div></span><span class="fmt-72" style="white-space:pre;"><div style="positi
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 25</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-77"><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:626.2pt;z-index:85;letter-spacing:.001em;">n</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:102.64pt;z-index:10;">M</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:120.28pt;z-index:13;letter-spacing:.001em;">n</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:144.04pt;z-index:17;letter-spacing:.001em;">u</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:166.36pt;z-index:21;letter-spacing:.001em;">o</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:93.5197pt;z-index:9;">R</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:113.2pt;z-index:12;"> I</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:127.96pt;z-index:16;letter-spacing:-.001em;">str</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:151.72pt;z-index:20;letter-spacing:-.001em;">cti</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:173.56pt;z-index:84;letter-spacing:.001em;">Quiz #2 - Sample Solutio</div></span><span class="fmt-76" style="white-space:pre;"><div style="position:absolute;top:159.45pt;left:196.12pt;z-index:104;">“Normal” Assembler</div></span><img style="position:absolute;left:206.08pt;top:178.52pt;width:66pt;height:3pt;z-index:94;" src="./target/245ac031efcae8fd3fe1cc0f3e98e1fb.png" alt="__rendered_path__94" /><span style="white-space:pre;"><div style="position:absolute;top:207.24pt;left:196.12pt;z-index:145;">gcd cmp r0, r1 ;reached the end?</div></span><img style="position:absolute;left:281.32pt;top:178.52pt;width:95pt;height:3pt;z-index:105;" src="./target/2a8b7698247fce9323c10cb450a0234f.png" alt="__rendered_path__105" /><span style="white-space:pre;"><div style="position:absolute;top:228.36pt;left:257.44pt;z-index:162;">beq stop </div></span><span style="white-space:pre;"><div style="position:absolute;top:249.48pt;left:257.44pt;z-index:189;">blt less ;if r0 &gt; r1</div></span><span style="white-space:pre;"><div style="position:absolute;top:270.48pt;left:257.44pt;z-index:226;">sub r0, r0, r1 ;subtract r1 from r0 </div></span><span style="white-space:pre;"><div style="position:absolute;top:291.6pt;left:257.44pt;z-index:233;letter-spacing:.001em;">bal gcd</div></span><span style="white-space:pre;"><div style="position:absolute;top:312.72pt;left:196.12pt;z-index:277;">less sub r1, r1, r0 ;subtract r0 from r1 </div></span><span style="white-space:pre;"><div style="position:absolute;top:333.84pt;left:257.44pt;z-index:284;letter-spacing:.001em;">bal gcd</div></span><span style="white-space:pre;"><div style="position:absolute;top:354.84pt;left:196.12pt;z-index:288;letter-spacing:-.001em;">stop</div></span><span class="fmt-76" style="white-space:pre;"><div style="position:absolute;top:399.09pt;left:196.12pt;z-index:313;letter-spacing:.001em;">ARM Conditional Assembler</div></span><img style="position:absolute;left:196.12pt;top:418.16pt;width:48pt;height:3pt;z-index:292;" src="./target/2835fab57415b5
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 26</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-79"><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:259.6pt;z-index:79;letter-spacing:.001em;">The Barrel Shifter</div></span><span style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.44pt;z-index:127;"><span class="fmt-78">*</span> The ARM doesnt have actual shift instructions.</div></span><span style="white-space:pre;"><div style="position:absolute;top:212.49pt;left:98.4401pt;z-index:200;"><span class="fmt-78">*</span> Instead it has a barrel shifter which provides a mechanism to carry out </div></span><span style="white-space:pre;"><div style="position:absolute;top:233.97pt;left:122.68pt;z-index:237;">shifts as part of other instructions.</div></span><span style="white-space:pre;"><div style="position:absolute;top:291.33pt;left:98.4391pt;z-index:289;"><span class="fmt-78">*</span> So what operations does the barrel shifter support?</div></span><img style="position:absolute;left:641.92pt;top:505.04pt;width:72.5992pt;height:68.28pt;z-index:61;" src="./target/7411ebe8c009fe014a242380fa9c7f7d.png" alt="Image_280_0" /><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:56;">The ARM Instruction Set - ARM University Program - V1.0</div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><img style="position:absolute;left:623.08pt;top:484.04pt;width:108pt;height:96pt;z-index:3;" src="./target/c6053f756b075808893b5298e38e1f84.png" alt="__rendered_path__3" /><img style="position:absolute;left:723.88pt;top:559.76pt;width:6pt;height:6pt;z-index:59;" src="./target/58efb4d00cfdb6014dbb515b1afcaef7.png" alt="__rendered_path__59" /><img style="position:absolute;left:723.82pt;top:560.22pt;width:5.6pt;height:5.6pt;z-index:60;" src="./target/ce6513985399c0e12fc064993de3a583.png" alt="__rendered_path__60" /><img style="position:absolute;left:43.12pt;top:14pt;width:755.8pt;height:567pt;z-index:290;" src="./target/0901647d626b9293db6430463286fe9d.png" alt="__rendered_path__290" /><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:759.16pt;z-index:58;letter-spacing:-.002em;">26</div></span></div>
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 27</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-81"><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:198.16pt;z-index:182;letter-spacing:.001em;">Barrel Shifter - Left Shift</div></span><span style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.4396pt;z-index:133;"><span class="fmt-80">*</span> Shifts left by the specified amount (multiplies by powers of two) e.g. </div></span><span class="fmt-80" style="white-space:pre;"><div style="position:absolute;top:183.69pt;left:176.2pt;z-index:156;letter-spacing:.001em;">LSL #5 = multiply by 32</div></span><span style="white-space:pre;"><div style="position:absolute;top:333.69pt;left:315.52pt;z-index:206;">Logical Shift Left (LSL)</div></span><span class="fmt-82" style="white-space:pre;"><div style="position:absolute;top:412.41pt;left:192.04pt;z-index:225;letter-spacing:.001em;"><span class="fmt-81">C</span><span class="fmt-81">F</span></div><div style="position:absolute;top:412.41pt;left:390.4pt;z-index:225;letter-spacing:.002em;"><span style="position:relative;left:0pt;top:1pt;">D</span><span style="position:relative;left:0pt;top:1pt;">e</span><span style="position:relative;left:0pt;top:1pt;">s</span><span style="position:relative;left:0pt;top:1pt;">t</span><span style="position:relative;left:0pt;top:1pt;">i</span><span style="position:relative;left:0pt;top:1pt;">n</span><span style="position:relative;left:0pt;top:1pt;">a</span><span style="position:relative;left:0pt;top:1pt;">t</span><span style="position:relative;left:0pt;top:1pt;">i</span><span style="position:relative;left:0pt;top:1pt;">o</span><span style="position:relative;left:0pt;top:1pt;">n</span></div><div style="position:absolute;top:411.77pt;left:656.92pt;z-index:225;" class="fmt-83">0</div></span><img style="position:absolute;left:236.32pt;top:416.36pt;width:14pt;height:9pt;z-index:223;" src="./target/a450beae758d72e90185dce9587b8059.png" alt="__rendered_path__223" /><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:56;">The ARM Instruction Set - ARM University Program - V1.0</div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><img style="position:absolute;left:623.08pt;top:484.04pt;width:108pt;height:96pt;z-index:3;" src="./target/c6053f756b075808893b5298e38e1f84.png" alt="__rendered_path__3" /><img style="position:absolute;left:723.88pt;top:559.76pt;width:6pt;height:6pt;z-index:59;" src="./target/58efb4d00cfdb6014dbb515b1afcaef7.png" alt="__rendered_path__59" /><img style="position:absolute;left:723.82pt;top:560.22pt;width:5.6pt;height:5.6pt;z-index:60;" src="./target/ce6513985399c0e12fc064993de3a583.png" alt="__rendered_path__60" /><img style="position:absolute;left:641.92pt;top:505.04pt;width:72.5992pt;height:68.28pt;z-index:61;" src="./target/7411ebe8c009fe014a242380fa9c7f7d.png" alt="Image_290_0" /><img style="position:absolute;left:336.46pt;top:389.26pt;width:236.4pt;height:64.6pt;z-index:207;" src="./target/88502feb5561915f103845d9bf6ef707.png" alt="__rendered_path__207" /><img style="position:absolute;left:174.34pt;top:390.6pt;width:62.1pt;height:64.7pt;z-index:219;" src="./target/d8f33cdc316beac225cd674b5d4d81e4.png" alt="__rendered_path__219" /><img style="position:absolute;left:244.96pt;top:420.24pt;width:91.6pt;height:1.1pt;z-index:222;" src="./target/ec9d7b3f3c9f17c36c8750b12b8af948.png" alt="__rendered_path__222" /><img style="position:absolute;left:581.44pt;top:420.24pt;width:53.7pt;height:1.1pt;z-index:224;" src="./target/edbdd84a56ffcd5af27a317e19a1ee2e.png" alt="__rendered_path__224" /><img style="position:absolute;left:572.8pt;top:416.36pt;width:14pt;height:9pt;z-index:223;" src="./target/a450beae
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 28</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-84"><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3621pt;left:173.44pt;z-index:350;letter-spacing:.001em;">Barrel Shifter - Right Shifts</div></span><span style="white-space:pre;"><div style="position:absolute;top:157.77pt;left:90.3996pt;z-index:81;">Logical Shift Right </div></span><span style="white-space:pre;"><div style="position:absolute;top:172.77pt;left:452.32pt;z-index:404;">Logical Shift Right</div></span><img style="position:absolute;left:90.3996pt;top:176.84pt;width:162pt;height:3pt;z-index:82;" src="./target/75d0c916a2ba7809fedb55545e742c80.png" alt="__rendered_path__82" /><span style="white-space:pre;"><div style="position:absolute;top:186.33pt;left:90.3996pt;z-index:103;letter-spacing:-.007em;"><span class="fmt-85"></span> Shifts right by the </div></span><span style="white-space:pre;"><div style="position:absolute;top:207.81pt;left:98.6795pt;z-index:120;">specified amount </div></span><span style="white-space:pre;"><div style="position:absolute;top:229.29pt;left:98.6795pt;z-index:430;">(divides by powers of </div><div style="position:absolute;top:229.29pt;left:375.64pt;z-index:430;letter-spacing:.001em;"><span style="position:relative;left:0pt;top:1pt;">.</span><span style="position:relative;left:0pt;top:1pt;">.</span><span style="position:relative;left:0pt;top:1pt;">.</span><span style="position:relative;left:0pt;top:1pt;">0</span></div><div style="position:absolute;top:229.29pt;left:476.08pt;z-index:430;letter-spacing:.002em;"><span class="fmt-86" style="position:relative;left:0pt;top:1pt;">D</span><span class="fmt-86" style="position:relative;left:0pt;top:1pt;">e</span><span class="fmt-86" style="position:relative;left:0pt;top:1pt;">s</span><span class="fmt-86" style="position:relative;left:0pt;top:1pt;">t</span><span class="fmt-86" style="position:relative;left:0pt;top:1pt;">i</span><span class="fmt-86" style="position:relative;left:0pt;top:1pt;">n</span><span class="fmt-86" style="position:relative;left:0pt;top:1pt;">a</span><span class="fmt-86" style="position:relative;left:0pt;top:1pt;">t</span><span class="fmt-86" style="position:relative;left:0pt;top:1pt;">i</span><span class="fmt-86" style="position:relative;left:0pt;top:1pt;">o</span><span class="fmt-86" style="position:relative;left:0pt;top:1pt;">n</span></div></span><img style="position:absolute;left:442.6pt;top:233.48pt;width:14pt;height:9pt;z-index:367;" src="./target/8b0ca6b4488d5c5432d47bd7bf5e1390.png" alt="__rendered_path__367" /><span style="white-space:pre;"><div style="position:absolute;top:250.77pt;left:98.6795pt;z-index:152;letter-spacing:.001em;">two) e.g. </div></span><span style="white-space:pre;"><div style="position:absolute;top:282.09pt;left:98.6795pt;z-index:173;letter-spacing:.001em;">LSR #5 = divide by 32</div></span><span style="white-space:pre;"><div style="position:absolute;top:344.49pt;left:90.3994pt;z-index:426;letter-spacing:.001em;">Arithmetic Shift Right</div><div style="position:absolute;top:344.49pt;left:460pt;z-index:426;letter-spacing:.001em;"><span style="position:relative;left:0pt;top:-1pt;">A</span><span style="position:relative;left:0pt;top:-1pt;">r</span><span style="position:relative;left:0pt;top:-1pt;">i</span><span style="position:relative;left:0pt;top:-1pt;">t</span><span style="position:relative;left:0pt;top:-1pt;">h</span><span style="position:relative;left:0pt;top:-1pt;">m</span><span style="position:relative;left:0p
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 29</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-87"><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:630.4pt;z-index:86;">s</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:192.76pt;z-index:85;letter-spacing:.001em;">Barrel Shifter - Rotation</div></span><span style="white-space:pre;"><div style="position:absolute;top:130.65pt;left:79.5991pt;z-index:418;letter-spacing:.001em;">Rotate Right (ROR)</div><div style="position:absolute;top:130.65pt;left:449.2pt;z-index:418;letter-spacing:.001em;"><span style="position:relative;left:0pt;top:5pt;">R</span><span style="position:relative;left:0pt;top:5pt;">o</span><span style="position:relative;left:0pt;top:5pt;">t</span><span style="position:relative;left:0pt;top:5pt;">a</span><span style="position:relative;left:0pt;top:5pt;">t</span><span style="position:relative;left:0pt;top:5pt;">e</span><span style="position:relative;left:0pt;top:5pt;"> </span><span style="position:relative;left:0pt;top:5pt;">R</span><span style="position:relative;left:0pt;top:5pt;">i</span><span style="position:relative;left:0pt;top:5pt;">g</span><span style="position:relative;left:0pt;top:5pt;">h</span><span style="position:relative;left:0pt;top:5pt;">t</span></div></span><img style="position:absolute;left:79.5996pt;top:149.72pt;width:172pt;height:3pt;z-index:106;" src="./target/5e98f24f4f775c59cd67a03fd9be0ab9.png" alt="__rendered_path__106" /><span style="white-space:pre;"><div style="position:absolute;top:161.85pt;left:79.5996pt;z-index:133;letter-spacing:-.003em;">• Similar to an ASR but the </div></span><span style="white-space:pre;"><div style="position:absolute;top:182.85pt;left:89.4397pt;z-index:134;">b</div></span><span style="white-space:pre;"><div style="position:absolute;top:203.73pt;left:89.4397pt;z-index:159;letter-spacing:.001em;">l</div></span><span style="white-space:pre;"><div style="position:absolute;top:203.73pt;left:94.9597pt;z-index:160;letter-spacing:.001em;">e</div></span><span style="white-space:pre;"><div style="position:absolute;top:182.85pt;left:100.48pt;z-index:135;letter-spacing:.001em;">i</div></span><span style="white-space:pre;"><div style="position:absolute;top:182.85pt;left:106pt;z-index:136;">t</div></span><span style="white-space:pre;"><div style="position:absolute;top:203.73pt;left:103.84pt;z-index:161;">a</div></span><span style="white-space:pre;"><div style="position:absolute;top:182.85pt;left:112.6pt;z-index:137;">s</div></span><span style="white-space:pre;"><div style="position:absolute;top:203.73pt;left:113.8pt;z-index:162;">v</div></span><span style="white-space:pre;"><div style="position:absolute;top:182.85pt;left:120.4pt;z-index:138;"> </div></span><span style="white-space:pre;"><div style="position:absolute;top:182.85pt;left:125.44pt;z-index:139;">w</div></span><span style="white-space:pre;"><div style="position:absolute;top:203.73pt;left:132.52pt;z-index:164;"> </div></span><span style="white-space:pre;"><div style="position:absolute;top:203.73pt;left:123.64pt;z-index:163;letter-spacing:.001em;">e</div></span><span style="white-space:pre;"><div style="position:absolute;top:182.85pt;left:139.84pt;z-index:140;letter-spacing:.001em;">r</div></span><span style="white-space:pre;"><div style="position:absolute;top:203.73pt;left:144.16pt;z-index:166;">h</div></span><span style="white-space:pre;"><div style="position:absolute;top:203.73pt;left:137.56pt;z-index:165;">t</div></span><span style="white-space:pre;"><div style="position:absolute;top:182.85pt;left:148.72pt;z-index:141;">a</div></span><span style="white-space:pre;"><div style="position:absolute;top:182.85pt;left:158.68pt;z-index:142;">p</div></span><span style="white-space:pre;"><div style="position:absolute;top:203.73pt;left:155.2pt;z-index:167;letter-spacing:.001em;">e</div></span><span style="white-space:pre;"><div style="position:absolute;top:203.73pt;left:164.08pt;z-index:168;"> </div></span><span style="white-space:pre;"><div s
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 30</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-90"><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:49.3622pt;left:414.76pt;z-index:73;">a</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:49.3622pt;left:451.6pt;z-index:75;">r</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:49.3622pt;left:466.72pt;z-index:76;">e</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:91.242pt;left:423.64pt;z-index:96;letter-spacing:.001em;">d</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:91.242pt;left:447.4pt;z-index:97;letter-spacing:.001em;"> </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:91.242pt;left:458.2pt;z-index:98;letter-spacing:.001em;">O</div></span><span class="fmt-92" style="white-space:pre;"><div style="position:absolute;top:137.95pt;left:116.44pt;z-index:400;letter-spacing:.001em;">p</div></span><span class="fmt-92" style="white-space:pre;"><div style="position:absolute;top:137.95pt;left:169.72pt;z-index:404;letter-spacing:.001em;">n</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:120.28pt;z-index:13;letter-spacing:.001em;">n</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:174.16pt;z-index:22;letter-spacing:.001em;">n</div></span><span class="fmt-92" style="white-space:pre;"><div style="position:absolute;top:137.95pt;left:96.8793pt;z-index:399;letter-spacing:.001em;">O</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:12;letter-spacing:-.001em;">The ARM I</div></span><span class="fmt-92" style="white-space:pre;"><div style="position:absolute;top:137.95pt;left:131.8pt;z-index:403;letter-spacing:.001em;">era</div></span><span class="fmt-92" style="white-space:pre;"><div style="position:absolute;top:165.07pt;left:141.52pt;z-index:407;">1</div></span><img style="position:absolute;left:145.6pt;top:329.84pt;width:12pt;height:18pt;z-index:441;" src="./target/f12d339e39b1df90684c9d9eae3a79e0.png" alt="__rendered_path__441" /><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:127.96pt;z-index:21;letter-spacing:-.001em;">structio</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:49.3622pt;left:199.24pt;z-index:72;letter-spacing:.001em;">Using the B</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:91.242pt;left:227.44pt;z-index:95;letter-spacing:.001em;">The Secon</div></span><span class="fmt-92" style="white-space:pre;"><div style="position:absolute;top:137.95pt;left:185.08pt;z-index:453;letter-spacing:-.002em;">d </div><div style="position:absolute;top:137.95pt;left:244.72pt;z-index:453;">Operand </div></span><img style="position:absolute;left:358.96pt;top:144.44pt;width:18pt;height:12pt;z-index:456;" src="./target/6be8433141f5870db2f841a3557f24b3.png" alt="__rendered_path__456" /><span class="fmt-92" style="white-space:pre;"><div style="position:absolute;top:165.07pt;left:289.36pt;z-index:454;">2</div></span><img style="position:absolute;left:290.2pt;top:226.16pt;width:12pt;height:18pt;z-index:443;" src="./target/ea1346f21524e419d802a5ac088d97bc.png" alt="__rendered_path__443" /><img style="position:absolute;left:357.28pt;top:161.68pt;width:15pt;height:19pt;z-index:458;" src="./target/65d3df3667e55d17d79a5faa3e571fec.png" alt="__rendered_path__458" /><span class="fmt-92" style="white-space:pre;"><div style="position:absolute;top:251.47pt;left:261.4pt;z-index:431;letter-spacing:.001em;">Barrel </div></span><span class="fmt-92" style="white-space:pre;"><div style="position:absolute;top:278.59pt;left:257.92pt;z-index:438;">Shifter</div></span><img style="position:absolute;left:290.2pt;top:332.24pt;width:12pt;height:18pt;z-
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 31</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-93"><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:102.64pt;z-index:10;">M</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:93.5197pt;z-index:9;">R</div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:49.3622pt;left:255.4pt;z-index:77;letter-spacing:.001em;">Second Operand :</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:91.242pt;left:273.64pt;z-index:93;letter-spacing:.001em;">Shifted Register</div></span><span class="fmt-94" style="white-space:pre;"><div style="position:absolute;top:160.29pt;left:124pt;z-index:160;"><span class="fmt-93">*</span> The amount by which the register is to be shifted is contained in </div></span><span class="fmt-94" style="white-space:pre;"><div style="position:absolute;top:181.77pt;left:148.24pt;z-index:170;">either: </div></span><span style="white-space:pre;"><div style="position:absolute;top:210.45pt;left:162.88pt;z-index:226;letter-spacing:-.002em;">• the immediate 5-bit field in the instruction </div></span><span class="fmt-95" style="white-space:pre;"><div style="position:absolute;top:239.13pt;left:201.76pt;z-index:239;letter-spacing:-.001em;"><span class="fmt-93"></span> NO OVERHEAD </div></span><img style="position:absolute;left:221.2pt;top:258.2pt;width:137pt;height:3pt;z-index:240;" src="./target/b9243ae1fa5a76ba9e0521fec498b749.png" alt="__rendered_path__240" /><span style="white-space:pre;"><div style="position:absolute;top:267.81pt;left:201.76pt;z-index:290;letter-spacing:-.001em;"> Shift is done for free - executes in single cycle.</div></span><span style="white-space:pre;"><div style="position:absolute;top:296.49pt;left:162.88pt;z-index:329;letter-spacing:-.003em;">• the bottom byte of a register (not PC)</div></span><img style="position:absolute;left:723.82pt;top:560.22pt;width:5.6pt;height:5.6pt;z-index:60;" src="./target/ce6513985399c0e12fc064993de3a583.png" alt="__rendered_path__60" /><span style="white-space:pre;"><div style="position:absolute;top:325.29pt;left:201.76pt;z-index:363;letter-spacing:-.001em;"> Then takes extra cycle to execute</div></span><span style="white-space:pre;"><div style="position:absolute;top:353.97pt;left:201.76pt;z-index:422;letter-spacing:-.005em;"> ARM doesn t have enough read ports to read 3 registers at </div></span><span style="white-space:pre;"><div style="position:absolute;top:375.45pt;left:221.2pt;z-index:427;">once.</div></span><span style="white-space:pre;"><div style="position:absolute;top:404.13pt;left:201.76pt;z-index:475;letter-spacing:-.001em;"> Then same as on other processors where shift is</div></span><span style="white-space:pre;"><div style="position:absolute;top:425.61pt;left:221.2pt;z-index:496;letter-spacing:-.001em;">separate instruction.</div></span><img style="position:absolute;left:43.12pt;top:14pt;width:755.8pt;height:567pt;z-index:618;" src="./target/0901647d626b9293db6430463286fe9d.png" alt="__rendered_path__618"
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 32</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-97"><span style="white-space:pre;"><div style="position:absolute;top:226.77pt;left:729.28pt;z-index:358;">n</div></span><span class="fmt-96" style="white-space:pre;"><div style="position:absolute;top:276.93pt;left:728.68pt;z-index:474;">n</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:116.68pt;z-index:12;letter-spacing:.001em;">I</div></span><span class="fmt-96" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.439pt;z-index:102;">*</div></span><span class="fmt-96" style="white-space:pre;"><div style="position:absolute;top:226.77pt;left:98.4388pt;z-index:290;">*</div></span><span class="fmt-96" style="white-space:pre;"><div style="position:absolute;top:327.09pt;left:98.4387pt;z-index:486;">*</div></span><span class="fmt-96" style="white-space:pre;"><div style="position:absolute;top:405.93pt;left:98.4381pt;z-index:558;">*</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:11;letter-spacing:-.001em;">The ARM </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:49.3622pt;left:255.4pt;z-index:77;letter-spacing:.001em;">Second Operand :</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:91.242pt;left:198.16pt;z-index:101;letter-spacing:.001em;">Using a Shifted Register</div></span><span style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:122.68pt;z-index:175;letter-spacing:.001em;">Using a multiplication instruction to multiply by a constant means first </div></span><span style="white-space:pre;"><div style="position:absolute;top:176.49pt;left:122.68pt;z-index:241;letter-spacing:.001em;">loading the constant into a register and then waiting a number of </div></span><span style="white-space:pre;"><div style="position:absolute;top:197.97pt;left:122.68pt;z-index:289;">internal cycles for the instruction to complete.</div></span><span style="white-space:pre;"><div style="position:absolute;top:226.77pt;left:122.68pt;z-index:357;letter-spacing:.001em;">A more optimum solution can often be found by using some combinatio</div></span><span style="white-space:pre;"><div style="position:absolute;top:248.25pt;left:122.68pt;z-index:400;letter-spacing:.001em;">of MOVs, ADDs, SUBs and RSBs with shifts.</div></span><span class="fmt-96" style="white-space:pre;"><div style="position:absolute;top:276.93pt;left:137.32pt;z-index:473;letter-spacing:-.002em;">• Multiplications by a constant equal to a ((power of 2) 1) can be done i</div></span><img style="position:absolute;left:586.79pt;top:279.47pt;width:10pt;height:15pt;z-index:457;" src="./target/c80b41e8294f83f36063c1372cc0d8e4.png" alt="__rendered_path__457" /><span class="fmt-96" style="white-space:pre;"><div style="position:absolute;top:298.41pt;left:156.76pt;z-index:485;letter-spacing:-.001em;">one cycle.</div></span><span style="white-space:pre;"><div style="position:absolute;top:327.09pt;left:122.68pt;z-index:506;letter-spacing:.001em;">Example: r0 = r1 * 5</div></span><span class="fmt-96" style="white-space:pre;"><div style="position:absolute;top:348.57pt;left:122.68pt;z-index:534;letter-spacing:.001em;"><span class="fmt-97">E</span><span class="fmt-97">x</span><span class="fmt-97">a</span><span class="fmt-97">m</span><span class="fmt-97">p</span><span class="fmt-97">l</span><span class="fmt-97">e</span><span class="fmt-97">:</span><span class="fmt-97"> </span><span class="fmt-97">r</span><span class="fmt-97">0</span><span class="fmt-97"> </span>= r1 + (r1 * 4) </div></span><span style="white-space:pre;"><div style="position:absolute;top:377.73pt;left:253.84pt;z-index:557;">ï ADD r0, r1, r1, LSL #2</div></span><span style="white-space:pre;"><div style="position:absolute;top:405.93pt;left:122.68pt;z-index:580;letter-spacing:.001em;">Example: r2 = r3 * 105</div></span><span class="fmt-96" style="white-space:pre
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 33</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-99"><span style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:724.72pt;z-index:170;">n</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:49.3622pt;left:255.4pt;z-index:77;letter-spacing:.001em;">Second Operand :</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:91.242pt;left:240.28pt;z-index:96;letter-spacing:.001em;">Immediate Value (1)</div></span><span style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.4389pt;z-index:169;"><span class="fmt-98">*</span> There is no single instruction which will load a 32 bit immediate consta</div></span><span style="white-space:pre;"><div style="position:absolute;top:176.49pt;left:122.68pt;z-index:231;">into a register without performing a data load from memory.</div></span><span class="fmt-98" style="white-space:pre;"><div style="position:absolute;top:205.17pt;left:137.32pt;z-index:269;letter-spacing:-.003em;">• All ARM instructions are 32 bits long</div></span><span class="fmt-98" style="white-space:pre;"><div style="position:absolute;top:233.97pt;left:137.32pt;z-index:329;letter-spacing:-.002em;">• ARM instructions do not use the instruction stream as data.</div></span><span style="white-space:pre;"><div style="position:absolute;top:262.65pt;left:98.4373pt;z-index:394;"><span class="fmt-98">*</span> The data processing instruction format has 12 bits available for</div></span><span style="white-space:pre;"><div style="position:absolute;top:284.13pt;left:122.68pt;z-index:402;">operand2</div></span><span class="fmt-98" style="white-space:pre;"><div style="position:absolute;top:312.81pt;left:137.32pt;z-index:457;letter-spacing:-.002em;">• If used directly this would only give a range of 4096.</div></span><span style="white-space:pre;"><div style="position:absolute;top:341.49pt;left:98.4365pt;z-index:527;"><span class="fmt-98">*</span> Instead it is used to store 8 bit constants, giving a range of 0 - 255.</div></span><span style="white-space:pre;"><div style="position:absolute;top:370.17pt;left:98.4369pt;z-index:592;"><span class="fmt-98">*</span> These 8 bits can then be rotated right through an even number of</div></span><span style="white-space:pre;"><div style="position:absolute;top:391.65pt;left:122.68pt;z-index:628;">positions (ie RORs by 0, 2, 4,..30).</div></span><span class="fmt-98" style="white-space:pre;"><div style="position:absolute;top:420.33pt;left:137.32pt;z-index:701;letter-spacing:-.002em;">• This gives a much larger range of constants that can be directly loaded, </div></span><span class="fmt-98" style="white-space:pre;"><div style="position:absolute;top:441.81pt;left:156.76pt;z-index:752;">though some constants will still need to be loaded </div></span><span class="fmt-98" style="white-space:pre;"><div style="position:absolute;top:463.29pt;left:156.76pt;z-index:764;">from memory.</div></span><img style="position:absolute;left:641.92pt;top:505.04pt;width:72.5992pt;height:68.28pt;z-index:61;" src="./target/7411ebe8c009fe014a242380fa9c7f7d.png" alt="Image_355_0" /><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:93.5197pt;z-index:56;">RM Instruction Set - ARM University Program - V1.0</div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 34</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-101"><span class="fmt-102" style="white-space:pre;"><div style="position:absolute;top:265.29pt;left:720.04pt;z-index:315;">6</div></span><span class="fmt-100" style="white-space:pre;"><div style="position:absolute;top:400.29pt;left:724pt;z-index:566;">6</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:116.68pt;z-index:12;letter-spacing:.001em;">I</div></span><span class="fmt-100" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.4389pt;z-index:97;">*</div></span><span class="fmt-100" style="white-space:pre;"><div style="position:absolute;top:292.77pt;left:98.4381pt;z-index:317;">*</div></span><span class="fmt-100" style="white-space:pre;"><div style="position:absolute;top:350.13pt;left:98.4408pt;z-index:408;">*</div></span><span class="fmt-100" style="white-space:pre;"><div style="position:absolute;top:428.97pt;left:98.439pt;z-index:568;">*</div></span><span class="fmt-100" style="white-space:pre;"><div style="position:absolute;top:486.45pt;left:98.4397pt;z-index:668;">*</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:11;letter-spacing:-.001em;">The ARM </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:49.3622pt;left:255.4pt;z-index:77;letter-spacing:.001em;">Second Operand :</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:91.242pt;left:240.28pt;z-index:96;letter-spacing:.001em;">Immediate Value (2)</div></span><span style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:122.68pt;z-index:111;">This gives us:</div></span><span class="fmt-102" style="white-space:pre;"><div style="position:absolute;top:183.45pt;left:137.32pt;z-index:127;letter-spacing:-.006em;">• 0 - 255</div><div style="position:absolute;top:183.45pt;left:409.24pt;z-index:127;letter-spacing:.001em;">[0 - 0xff]</div></span><span class="fmt-102" style="white-space:pre;"><div style="position:absolute;top:210.81pt;left:137.32pt;z-index:186;letter-spacing:-.002em;">• 256,260,264,..,1020</div><div style="position:absolute;top:210.81pt;left:409.24pt;z-index:186;letter-spacing:.001em;">[0x100-0x3fc, step 4, 0x40-0xff ror 30]</div></span><span class="fmt-102" style="white-space:pre;"><div style="position:absolute;top:238.05pt;left:137.32pt;z-index:249;letter-spacing:-.002em;">• 1024,1040,1056,..,4080</div><div style="position:absolute;top:238.05pt;left:409.24pt;z-index:249;letter-spacing:.001em;">[0x400-0xff0, step 16, 0x40-0xff ror 28]</div></span><span class="fmt-102" style="white-space:pre;"><div style="position:absolute;top:265.29pt;left:137.32pt;z-index:314;letter-spacing:-.002em;">• 4096,4160, 4224,..,16320</div><div style="position:absolute;top:265.29pt;left:409.24pt;z-index:314;letter-spacing:.001em;">[0x1000-0x3fc0, step 64, 0x40-0xff ror 2</div></span><span style="white-space:pre;"><div style="position:absolute;top:292.77pt;left:122.68pt;z-index:356;">These can be loaded using, for example:</div></span><span class="fmt-100" style="white-space:pre;"><div style="position:absolute;top:321.45pt;left:137.32pt;z-index:407;letter-spacing:-.005em;">• MOV r0, #0x40, 26</div><div style="position:absolute;top:321.45pt;left:409.24pt;z-index:407;">; =&gt; MOV r0, #0x1000 (ie 4096)</div></span><span style="white-space:pre;"><div style="position:absolute;top:350.13pt;left:122.68pt;z-index:478;">To make this easier, the assembler will convert to this form for us if </div></span><span style="white-space:pre;"><div style="position:absolute;top:371.61pt;left:122.68pt;z-index:513;">simply given the required constant:</div></span><span class="fmt-100" style="white-space:pre;"><div style="position:absolute;top:400.29pt;left:137.32pt;z-index:565;letter-spacing:-.007em;">• MOV r0, #4096</div><div style="position:absolute;top:400.29pt;left:409.24pt;z-index:565;">; =&gt; MOV r0, #
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 35</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-104"><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:159.28pt;z-index:90;letter-spacing:.001em;">Loading full 32 bit constants</div></span><span style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.439pt;z-index:159;"><span class="fmt-103">*</span> Although the MOV/MVN mechansim will load a large range of constants </div></span><span style="white-space:pre;"><div style="position:absolute;top:176.49pt;left:122.68pt;z-index:232;">into a register, sometimes this mechansim will not generate the required </div></span><span style="white-space:pre;"><div style="position:absolute;top:197.97pt;left:122.68pt;z-index:241;">constant.</div></span><span style="white-space:pre;"><div style="position:absolute;top:226.77pt;left:98.4386pt;z-index:312;"><span class="fmt-103">*</span> Therefore, the assembler also provides a method which will load <span class="fmt-63">A</span><span class="fmt-63">N</span><span class="fmt-63">Y</span> 32 </div></span><span style="white-space:pre;"><div style="position:absolute;top:248.25pt;left:122.68pt;z-index:325;letter-spacing:.001em;">bit constant:</div></span><span class="fmt-26" style="white-space:pre;"><div style="position:absolute;top:275.61pt;left:137.32pt;z-index:350;"><span class="fmt-103"></span> LDR rd,=numeric constant</div></span><img style="position:absolute;left:723.82pt;top:560.22pt;width:5.6pt;height:5.6pt;z-index:60;" src="./target/ce6513985399c0e12fc064993de3a583.png" alt="__rendered_path__60" /><span style="white-space:pre;"><div style="position:absolute;top:305.61pt;left:98.4384pt;z-index:422;"><span class="fmt-103">*</span> If the constant can be constructed using either a MOV or MVN then this </div></span><span style="white-space:pre;"><div style="position:absolute;top:327.09pt;left:122.68pt;z-index:465;">will be the instruction actually generated.</div></span><span style="white-space:pre;"><div style="position:absolute;top:355.77pt;left:98.4384pt;z-index:533;"><span class="fmt-103">*</span> Otherwise, the assembler will produce an LDR instruction with a PC-</div></span><span style="white-space:pre;"><div style="position:absolute;top:377.25pt;left:122.68pt;z-index:591;">relative address to read the constant from a literal pool.</div></span><span class="fmt-106" style="white-space:pre;"><div style="position:absolute;top:403.43pt;left:137.32pt;z-index:628;letter-spacing:-.021em;"><span class="fmt-105"></span> LDR r0,=0x42</div><div style="position:absolute;top:403.43pt;left:331.6pt;z-index:628;">; generates MOV r0,#0x42</div></span><span class="fmt-106" style="white-space:pre;"><div style="position:absolute;top:426.11pt;left:137.32pt;z-index:689;letter-spacing:-.009em;"><span class="fmt-105"></span> LDR r0,=0x55555555 ; generate LDR r0,[pc, offset to lit pool]</div></span><img style="position:absolute;left:43.12pt;top:14pt;width:755.8pt;height:567pt;z-index:816;" src="./target/0901647d626b9293db6430463286fe9d.png" alt="__rendered_path__816" /><span style="white-space:pre;"><div style="position:absolute;top:451.29pt;le
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 36</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-107"><span style="white-space:pre;"><div style="position:absolute;top:355.89pt;left:674.32pt;z-index:402;letter-spacing:.001em;">e</div></span><span style="white-space:pre;"><div style="position:absolute;top:355.89pt;left:691.84pt;z-index:404;letter-spacing:.001em;">a</div></span><span style="white-space:pre;"><div style="position:absolute;top:355.89pt;left:710.56pt;z-index:406;">s</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:180.88pt;z-index:88;letter-spacing:.001em;">Multiplication Instructions</div></span><span class="fmt-108" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.439pt;z-index:144;"><span class="fmt-107">*</span> The Basic ARM provides two multiplication instructions.</div></span><span class="fmt-108" style="white-space:pre;"><div style="position:absolute;top:183.69pt;left:98.4399pt;z-index:153;letter-spacing:-.003em;"><span class="fmt-107">*</span> Multiply</div></span><span style="white-space:pre;"><div style="position:absolute;top:212.49pt;left:137.32pt;z-index:193;letter-spacing:-.004em;">• MUL{&lt;cond&gt;}{S} Rd, Rm, Rs</div><div style="position:absolute;top:212.49pt;left:487pt;z-index:193;">; Rd = Rm * Rs</div></span><span class="fmt-108" style="white-space:pre;"><div style="position:absolute;top:241.17pt;left:98.439pt;z-index:236;letter-spacing:-.001em;"><span class="fmt-107">*</span> Multiply Accumulate</div><div style="position:absolute;top:241.17pt;left:331.6pt;z-index:236;letter-spacing:.001em;">- does addition for free</div></span><span style="white-space:pre;"><div style="position:absolute;top:269.85pt;left:137.32pt;z-index:286;letter-spacing:-.003em;">• MLA{&lt;cond&gt;}{S} Rd, Rm, Rs,Rn</div><div style="position:absolute;top:269.85pt;left:487pt;z-index:286;">; Rd = (Rm * Rs) + Rn</div></span><span class="fmt-108" style="white-space:pre;"><div style="position:absolute;top:298.53pt;left:98.4392pt;z-index:307;letter-spacing:-.001em;"><span class="fmt-107">*</span> Restrictions on use:</div></span><span style="white-space:pre;"><div style="position:absolute;top:327.21pt;left:137.32pt;z-index:345;letter-spacing:-.004em;">• Rd and Rm cannot be the same register</div></span><span style="white-space:pre;"><div style="position:absolute;top:355.89pt;left:176.2pt;z-index:401;letter-spacing:-.001em;"> Can be avoid by swapping Rm and Rs around. This works b</div></span><span style="white-space:pre;"><div style="position:absolute;top:377.37pt;left:195.64pt;z-index:438;letter-spacing:-.001em;">multiplication is commutative.</div></span><span style="white-space:pre;"><div style="position:absolute;top:406.05pt;left:137.32pt;z-index:453;letter-spacing:-.007em;">• Cannot use PC.</div></span><span class="fmt-108" style="white-space:pre;"><div style="position:absolute;top:434.73pt;left:122.68pt;z-index:508;">These will be picked up by the assembler if overlooked.</div></span><span class="fmt-108" style="white-space:pre;"><div style="position:absolute;top:463.41pt;left:98.4378pt;z-index:554;"><span class="fmt-107">*</span> Operands can be considered signed or unsigned</div></span><span style="white-space:pre;"><div style="position:absolute;top:492.21pt;left:137.32pt;z-index:589;letter-spacing:-.003em;">• Up to user to interpret correctly.</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:93.519
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 37</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-110"><span class="fmt-109" style="white-space:pre;"><div style="position:absolute;top:262.65pt;left:700.84pt;z-index:360;letter-spacing:.001em;">i</div></span><span class="fmt-111" style="white-space:pre;"><div style="position:absolute;top:438.45pt;left:753.28pt;z-index:669;letter-spacing:.001em;">e</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:148.72pt;z-index:90;letter-spacing:.001em;">Multiplication Implementation</div></span><span style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.439pt;z-index:149;"><span class="fmt-109">*</span> The ARM makes use of Booths Algorithm to perform integer </div></span><span style="white-space:pre;"><div style="position:absolute;top:176.49pt;left:122.68pt;z-index:165;letter-spacing:.001em;">multiplication. </div></span><span style="white-space:pre;"><div style="position:absolute;top:205.17pt;left:98.4399pt;z-index:220;"><span class="fmt-109">*</span> On non-M ARMs this operates on 2 bits of Rs at a time.</div></span><span class="fmt-109" style="white-space:pre;"><div style="position:absolute;top:233.97pt;left:138.4pt;z-index:291;letter-spacing:-.002em;">• For each pair of bits this takes 1 cycle (plus 1 cycle to start with).</div></span><span class="fmt-109" style="white-space:pre;"><div style="position:absolute;top:262.65pt;left:138.4pt;z-index:359;letter-spacing:-.005em;">• However when there are no more 1 s left in Rs, the multiplication w</div></span><span class="fmt-109" style="white-space:pre;"><div style="position:absolute;top:284.13pt;left:157.84pt;z-index:380;">early-terminate. </div></span><span style="white-space:pre;"><div style="position:absolute;top:312.81pt;left:98.4391pt;z-index:423;"><span class="fmt-109">*</span> Example: Multiply 18 and -1 : Rd = Rm * Rs</div></span><span class="fmt-37" style="white-space:pre;"><div style="position:absolute;top:360.69pt;left:97.7187pt;z-index:676;letter-spacing:-.001em;"><span class="fmt-111">R</span><span class="fmt-111">m</span></div><div style="position:absolute;top:360.69pt;left:165.04pt;z-index:676;letter-spacing:.003em;"><span class="fmt-111" style="position:relative;left:0pt;top:2pt;">1</span><span class="fmt-111" style="position:relative;left:0pt;top:2pt;">8</span> <span style="position:relative;left:0pt;top:5pt;">0</span><span style="position:relative;left:0pt;top:5pt;"> </span><span style="position:relative;left:0pt;top:5pt;">0</span><span style="position:relative;left:0pt;top:5pt;"> </span><span style="position:relative;left:0pt;top:5pt;">0</span><span style="position:relative;left:0pt;top:5pt;"> </span><span style="position:relative;left:0pt;top:5pt;">0</span> <span style="position:relative;left:0pt;top:5pt;">0</span><span style="position:relative;left:0pt;top:5pt;"> </span><span style="position:relative;left:0pt;top:5pt;">0</span><span style="position:relative;left:0pt;top:5pt;"> </span><span style="position:relative;left:0pt;top:5pt;">0</span><span style="position:relative;left:0pt;top:5pt;"> </span><span style="position:relative;left:0pt;top:5pt;">0</span> <span style="position:relative;left:0pt;top:5pt;">0</span><span style="position:relative;left:0pt;top:5pt;"> </span><span style="position:relative;left:0pt;top:5pt;">0</span><span style="position:relative;left:0pt;top:5pt;"> </span><span style="position:relative;left:0pt;top:5pt;">0</span><span style="position:relative;left:0pt;top:5pt;"> </span><span style="position:relative;left:0pt;top:5pt;">0</span> <span style="position:relative;left:0pt;top:5pt;">0</span><span style="position:relative;left:0pt;top:5pt;"> </span><span style="position:relative;left:0pt;top:5pt;">0</span><span style="position:relative;left:0pt;top:5pt;"> </span><span style="position:relative;left:0pt;top:5pt;">0</span><span style="position:relative;left:0pt;top:5pt;"> </span><span style="position:relative;left:0pt;top:5pt;">0</span> <span style="position:relative;left:0p
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 38</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-112"><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:102.64pt;z-index:10;">M</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:93.5197pt;z-index:9;">R</div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:139.96pt;z-index:91;letter-spacing:.001em;">Extended Multiply Instructions</div></span><span class="fmt-113" style="white-space:pre;"><div style="position:absolute;top:159.45pt;left:123.76pt;z-index:148;"><span class="fmt-112">*</span> M variants of ARM cores contain extended multiplication </div></span><span class="fmt-113" style="white-space:pre;"><div style="position:absolute;top:180.93pt;left:148pt;z-index:191;">hardware. This provides three enhancements:</div></span><span class="fmt-114" style="white-space:pre;"><div style="position:absolute;top:209.73pt;left:162.64pt;z-index:226;letter-spacing:-.003em;"><span class="fmt-112"></span> <span class="fmt-112">A</span><span class="fmt-112">n</span><span class="fmt-112"> </span>8 bit Booths Algorithm <span class="fmt-112">i</span><span class="fmt-112">s</span><span class="fmt-112"> </span><span class="fmt-112">u</span><span class="fmt-112">s</span><span class="fmt-112">e</span><span class="fmt-112">d</span></div></span><span style="white-space:pre;"><div style="position:absolute;top:238.41pt;left:201.52pt;z-index:286;letter-spacing:-.001em;"> Multiplication is carried out faster (maximum for standard </div></span><span style="white-space:pre;"><div style="position:absolute;top:259.89pt;left:220.96pt;z-index:316;">instructions is now 5 cycles).</div></span><span class="fmt-114" style="white-space:pre;"><div style="position:absolute;top:288.57pt;left:162.64pt;z-index:373;letter-spacing:-.002em;"><span class="fmt-112"></span> Early termination method improved <span class="fmt-112">s</span><span class="fmt-112">o</span><span class="fmt-112"> </span><span class="fmt-112">t</span><span class="fmt-112">h</span><span class="fmt-112">a</span><span class="fmt-112">t</span><span class="fmt-112"> </span><span class="fmt-112">n</span><span class="fmt-112">o</span><span class="fmt-112">w</span><span class="fmt-112"> </span><span class="fmt-112">c</span><span class="fmt-112">o</span><span class="fmt-112">m</span><span class="fmt-112">p</span><span class="fmt-112">l</span><span class="fmt-112">e</span><span class="fmt-112">t</span><span class="fmt-112">e</span><span class="fmt-112">s</span><span class="fmt-112"> </span></div></span><img style="position:absolute;left:723.82pt;top:560.22pt;width:5.6pt;height:5.6pt;z-index:60;" src="./target/ce6513985399c0e12fc064993de3a583.png" alt="__rendered_path__60" /><span style="white-space:pre;"><div style="position:absolute;top:310.05pt;left:182.08pt;z-index:424;letter-spacing:-.001em;">multiplication when all remaining bit sets contain </div></span><span style="white-space:pre;"><div style="position:absolute;top:338.73pt;left:201.52pt;z-index:460;letter-spacing:-.001em;"> all zeroes (as with non
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 39</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-115"><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:49.3622pt;left:255.4pt;z-index:78;letter-spacing:.001em;">Multiply-Long and</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:91.242pt;left:179.8pt;z-index:102;letter-spacing:.001em;">Multiply-Accumulate Long</div></span><span class="fmt-116" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.4388pt;z-index:119;letter-spacing:-.001em;"><span class="fmt-115">*</span> Instructions are</div></span><span style="white-space:pre;"><div style="position:absolute;top:183.69pt;left:137.32pt;z-index:167;letter-spacing:-.002em;">• MULL which gives RdHi,RdLo:=Rm*Rs </div></span><span style="white-space:pre;"><div style="position:absolute;top:212.49pt;left:137.32pt;z-index:213;letter-spacing:-.002em;">• MLAL which gives RdHi,RdLo:=(Rm*Rs)+RdHi,RdLo</div></span><span class="fmt-116" style="white-space:pre;"><div style="position:absolute;top:241.17pt;left:98.439pt;z-index:280;"><span class="fmt-115">*</span> However the full 64 bit of the result now matter (lower precision </div></span><span class="fmt-116" style="white-space:pre;"><div style="position:absolute;top:262.65pt;left:122.68pt;z-index:332;letter-spacing:.001em;">multiply instructions simply throws top 32bits away)</div></span><span style="white-space:pre;"><div style="position:absolute;top:291.33pt;left:137.32pt;z-index:388;letter-spacing:-.002em;">• Need to specify whether operands are signed or unsigned</div></span><img style="position:absolute;left:723.82pt;top:560.22pt;width:5.6pt;height:5.6pt;z-index:60;" src="./target/ce6513985399c0e12fc064993de3a583.png" alt="__rendered_path__60" /><span class="fmt-116" style="white-space:pre;"><div style="position:absolute;top:320.01pt;left:98.4402pt;z-index:430;letter-spacing:-.001em;"><span class="fmt-115">*</span> Therefore syntax of new instructions are:</div></span><span style="white-space:pre;"><div style="position:absolute;top:348.69pt;left:137.32pt;z-index:463;letter-spacing:-.003em;">• UMULL{&lt;cond&gt;}{S} RdLo,RdHi,Rm,Rs</div></span><span style="white-space:pre;"><div style="position:absolute;top:377.37pt;left:137.32pt;z-index:496;letter-spacing:-.003em;">• UMLAL{&lt;cond&gt;}{S} RdLo,RdHi,Rm,Rs</div></span><span style="white-space:pre;"><div style="position:absolute;top:406.05pt;left:137.32pt;z-index:532;letter-spacing:-.003em;">• SMULL{&lt;cond&gt;}{S} RdLo, RdHi, Rm, Rs</div></span><span style="white-space:pre;"><div style="position:absolute;top:434.73pt;left:137.32pt;z-index:568;letter-spacing:-.003em;">• SMLAL{&lt;cond&gt;}{S} RdLo, RdHi, Rm, Rs</div></span><img style="position:absolute;left:43.12pt;top:14pt;width:755.8pt;height:567pt;z-index:638;" src="./target/0901647d626b9293db6430463286fe9d.png" alt="__rendered_path__638" /><span class="fmt-116" style="white-space:pre;"><div style="position:absolute;top:463.41pt;left:98.4391pt;z-index:599;letter-spacing:-.001em;"><span class="fmt-115">*</span> Not generated by the compiler.</div></span><
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 40</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-119"><span style="white-space:pre;"><div style="position:absolute;top:285.45pt;left:610.84pt;z-index:290;">#</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:353.44pt;z-index:68;letter-spacing:.001em;">Quiz #3</div></span><span class="fmt-118" style="white-space:pre;"><div style="position:absolute;top:129.45pt;left:100.96pt;z-index:127;letter-spacing:.001em;">1. Specify instructions which will implement the following:</div></span><span style="white-space:pre;"><div style="position:absolute;top:160.65pt;left:140.32pt;z-index:153;letter-spacing:.001em;">a) r0 = 16</div><div style="position:absolute;top:160.65pt;left:493.48pt;z-index:153;letter-spacing:.001em;">b) r1 = r0 * 4 </div></span><span style="white-space:pre;"><div style="position:absolute;top:191.85pt;left:140.32pt;z-index:205;">c) r0 = r1 / 16 ( r1 signed 2's comp.)</div><div style="position:absolute;top:191.85pt;left:493.48pt;z-index:205;letter-spacing:.001em;">d) r1 = r2 * 7</div></span><span class="fmt-118" style="white-space:pre;"><div style="position:absolute;top:254.25pt;left:100.96pt;z-index:248;letter-spacing:.001em;">2. What will the following instructions do?</div></span><span style="white-space:pre;"><div style="position:absolute;top:285.45pt;left:140.32pt;z-index:289;letter-spacing:.001em;">a) ADDS r0, r1, r1, LSL #2</div><div style="position:absolute;top:285.45pt;left:493.48pt;z-index:289;letter-spacing:.001em;">b) RSB r2, r1, </div></span><span class="fmt-118" style="white-space:pre;"><div style="position:absolute;top:342.69pt;left:100.96pt;z-index:342;letter-spacing:.001em;">3. What does the following instruction sequence do?</div></span><span style="white-space:pre;"><div style="position:absolute;top:371.37pt;left:140.32pt;z-index:364;letter-spacing:.001em;">ADD r0, r1, r1, LSL #1</div></span><span style="white-space:pre;"><div style="position:absolute;top:400.05pt;left:140.32pt;z-index:386;">SUB r0, r0, r1, LSL #4</div></span><span style="white-space:pre;"><div style="position:absolute;top:428.73pt;left:140.32pt;z-index:408;letter-spacing:.001em;">ADD r0, r0, r1, LSL #7</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:93.5197pt;z-index:56;">RM Instruction Set - ARM University Program - V1.0</div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><span style="white-space:pre;"><div style="position:absolute;top:285.45pt;left:620.8pt;z-index:291;">0</div></span><img style="position:absolute;left:623.08pt;top:484.04pt;width:108pt;height:96pt;z-index:3;" src="./target/c6053f756b075808893b5298e38e1f84.png" alt="__rendered_path__3" /><img style="position:absolute;left:723.88pt;top:559.76pt;width:6pt;height:6pt;z-index:59;" src="./target/58efb4d00cfdb6014dbb515b1afcaef7.png" alt="__rendered_path__59" /><img style="position:absolute;left:723.82pt;top:560.22pt;width:5.6pt;height:5.6pt;z-index:60;" src="./target/ce6513985399c0e12fc064993de3a583.png" alt="__rendered_path__60" /><img style="position:absolute;left:641.92pt;top:505.04pt;width:72.5992pt;height:68.28pt;z-index:61;" src="./target/7411ebe8c009fe014a
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 41</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-120"><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:102.64pt;z-index:10;">M</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:93.5197pt;z-index:9;">R</div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:193.84pt;z-index:86;letter-spacing:.001em;">Load / Store Instructions</div></span><span class="fmt-121" style="white-space:pre;"><div style="position:absolute;top:153.09pt;left:122.08pt;z-index:126;letter-spacing:-.001em;"><span class="fmt-120">*</span> The ARM is a Load / Store Architecture:</div></span><span style="white-space:pre;"><div style="position:absolute;top:181.77pt;left:160.96pt;z-index:188;letter-spacing:-.002em;">• Does not support memory to memory data processing operations.</div></span><span style="white-space:pre;"><div style="position:absolute;top:210.45pt;left:160.96pt;z-index:244;letter-spacing:-.003em;">• Must move data values into registers before using them.</div></span><span class="fmt-121" style="white-space:pre;"><div style="position:absolute;top:239.13pt;left:122.08pt;z-index:297;"><span class="fmt-120">*</span> This might sound inefficient, but in practice isnt:</div></span><span style="white-space:pre;"><div style="position:absolute;top:267.81pt;left:160.96pt;z-index:342;letter-spacing:-.003em;">• Load data values from memory into registers.</div></span><span style="white-space:pre;"><div style="position:absolute;top:296.49pt;left:160.96pt;z-index:403;letter-spacing:-.002em;">• Process data in registers using a number of data processing </div></span><img style="position:absolute;left:723.82pt;top:560.22pt;width:5.6pt;height:5.6pt;z-index:60;" src="./target/ce6513985399c0e12fc064993de3a583.png" alt="__rendered_path__60" /><span style="white-space:pre;"><div style="position:absolute;top:318.09pt;left:180.4pt;z-index:459;">instructions which are not slowed down by memory access.</div></span><span style="white-space:pre;"><div style="position:absolute;top:346.77pt;left:160.96pt;z-index:503;letter-spacing:-.003em;">• Store results from registers out to memory.</div></span><span class="fmt-121" style="white-space:pre;"><div style="position:absolute;top:375.45pt;left:122.08pt;z-index:568;"><span class="fmt-120">*</span> The ARM has three sets of instructions which interact with main </div></span><span class="fmt-121" style="white-space:pre;"><div style="position:absolute;top:396.93pt;left:146.32pt;z-index:586;">memory. These are:</div></span><span style="white-space:pre;"><div style="position:absolute;top:425.61pt;left:160.96pt;z-index:629;letter-spacing:-.003em;">• Single register data transfer (LDR / STR).</div></span><img style="position:absolute;left:43.12pt;top:14pt;width:755.8pt;height:567pt;z-index:685;" src="./target/0901647d626b9293db6430463286fe9d.png" alt="__rendered_path__685" /><span style="white-space:pre;"><div style="position:absolute;top:454.29pt;left:160.96pt;z-index:660;letter-spacing:-.004em;">• Block data transfe
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 42</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-123"><span style="white-space:pre;"><div style="position:absolute;top:241.17pt;left:730.36pt;z-index:255;">d</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:164.68pt;z-index:90;letter-spacing:.001em;">Single register data transfer</div></span><span style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.4389pt;z-index:133;"><span class="fmt-122">*</span> The basic load and store instructions are:</div></span><span class="fmt-122" style="white-space:pre;"><div style="position:absolute;top:183.69pt;left:137.32pt;z-index:161;letter-spacing:-.004em;">• Load and Store Word or Byte</div></span><span class="fmt-122" style="white-space:pre;"><div style="position:absolute;top:212.49pt;left:176.2pt;z-index:185;"> LDR / STR / LDRB / STRB</div></span><span style="white-space:pre;"><div style="position:absolute;top:241.17pt;left:98.439pt;z-index:254;"><span class="fmt-122">*</span> ARM Architecture Version 4 also adds support for halfwords and signe</div></span><span style="white-space:pre;"><div style="position:absolute;top:262.65pt;left:122.68pt;z-index:261;letter-spacing:.001em;">data.</div></span><span class="fmt-122" style="white-space:pre;"><div style="position:absolute;top:291.33pt;left:137.32pt;z-index:285;letter-spacing:-.005em;">• Load and Store Halfword</div></span><span class="fmt-122" style="white-space:pre;"><div style="position:absolute;top:320.01pt;left:176.2pt;z-index:297;letter-spacing:-.001em;"> LDRH / STRH</div></span><span class="fmt-122" style="white-space:pre;"><div style="position:absolute;top:348.69pt;left:137.32pt;z-index:369;letter-spacing:-.002em;">• Load Signed Byte or Halfword - load value and sign extend it to 32 bits.</div></span><span class="fmt-122" style="white-space:pre;"><div style="position:absolute;top:377.37pt;left:176.2pt;z-index:383;letter-spacing:-.001em;"> LDRSB / LDRSH</div></span><span style="white-space:pre;"><div style="position:absolute;top:406.05pt;left:98.441pt;z-index:457;"><span class="fmt-122">*</span> All of these instructions can be conditionally executed by inserting the </div></span><span style="white-space:pre;"><div style="position:absolute;top:427.53pt;left:122.68pt;z-index:500;">appropriate condition code after STR / LDR.</div></span><span class="fmt-122" style="white-space:pre;"><div style="position:absolute;top:456.21pt;left:137.32pt;z-index:512;letter-spacing:-.008em;">• e.g. LDREQB</div></span><span style="white-space:pre;"><div style="position:absolute;top:485.01pt;left:98.443pt;z-index:520;letter-spacing:-.002em;"><span class="fmt-122">*</span> Syntax:</div></span><img style="position:absolute;left:641.92pt;top:505.04pt;width:72.5992pt;height:68.28pt;z-index:61;" src="./target/7411ebe8c009fe014a242380fa9c7f7d.png" alt="Image_447_0" /><span class="fmt-122" style="white-space:pre;"><div style="position:absolute;top:513.69pt;left:137.32pt;z-index:560;letter-spacing:-.002em;">&lt;LDR|STR&gt;{&lt;cond&gt;}{&lt;size&gt;} Rd, &lt;address&gt;</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:93.5197pt;z-index:56;">RM Instruction Set - ARM University Program - V1.0</div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="po
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 43</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-124">
<img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" />
<img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" />
<img style="position:absolute;left:158.5pt;top:448.38pt;width:73.8pt;height:26pt;z-index:330;" src="./target/0b1ab203ddc2d22f13517a3c3821d8c7.png" alt="__rendered_path__330" />
<img style="position:absolute;left:152.14pt;top:442.14pt;width:73.8pt;height:26pt;z-index:330;" src="./target/0b1ab203ddc2d22f13517a3c3821d8c7.png" alt="__rendered_path__330" />
<img style="position:absolute;left:241pt;top:458.88pt;width:40.1pt;height:1.1pt;z-index:351;" src="./target/b3ce8721cd80678151245d8f497864da.png" alt="__rendered_path__351" />
<img style="position:absolute;left:356.5pt;top:321.8pt;width:74pt;height:56.7pt;z-index:359;" src="./target/7ccf74abdb652e7e38d227b3bb6e7cd9.png" alt="__rendered_path__359" />
<img style="position:absolute;left:392.5pt;top:326.54pt;width:2.1pt;height:44.1pt;z-index:360;" src="./target/6dd2d0f915f577851c90921933741208.png" alt="__rendered_path__360" />
<img style="position:absolute;left:202.9pt;top:329.7pt;width:73.8pt;height:26pt;z-index:330;" src="./target/0b1ab203ddc2d22f13517a3c3821d8c7.png" alt="__rendered_path__330" />
<img style="position:absolute;left:196.54pt;top:323.54pt;width:74pt;height:25.8pt;z-index:373;" src="./target/ede8d93913f22b0dbc0c64b79efc8ac3.png" alt="__rendered_path__373" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:49.3622pt;left:147.64pt;z-index:89;letter-spacing:.001em;">Load and Store Word or Byte:</div></span><img style="position:absolute;left:356.5pt;top:401.9pt;width:74pt;height:23.4pt;z-index:361;" src="./target/4db345ae3000b1c829da26bc7a315efe.png" alt="__rendered_path__361" /><img style="position:absolute;left:356.5pt;top:378.42pt;width:74pt;height:23.6pt;z-index:362;" src="./target/fa308fa4d6a57eee8712d480012be93d.png" alt="__rendered_path__362" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:91.242pt;left:298.36pt;z-index:102;letter-spacing:.001em;">Base Register</div></span><img style="position:absolute;left:356.5pt;top:448.7pt;width:74pt;height:23.4pt;z-index:361;" src="./target/4db345ae3000b1c829da26bc7a315efe.png" alt="__rendered_path__361" /><img style="position:absolute;left:356.5pt;top:425.3pt;width:74pt;height:23.4pt;z-index:361;" src="./target/4db345ae3000b1c829da26bc7a315efe.png" alt="__rendered_path__361" /><span class="fmt-125" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.4389pt;z-index:164;letter-spacing:-.001em;"><span class="fmt-124">*</span> The memory location to be accessed is held in a base register</div></span><img style="position:absolute;left:356.5pt;top:471.96pt;width:74pt;height:59.9pt;z-index:363;" src="./target/27a99e98408de0e228456768a5ccf904.png" alt="__rendered_path__363" /><img style="position:absolute;left:392.5pt;top:483.02pt;width:2.1pt;height:44.1pt;z-index:360;" src="./target/6dd2d0f915f577851c90921933741208.png" alt="__rendered_path__360" /><img style="position:absolute;left:280.23pt;top:356.67pt;width:63.7pt;height:93.5pt;z-index:400;" src="./target/a3822f165c6f8d93c5037dbbd0e31bee.png" alt="__rendered_path__400" /><span style="white-space:pre;"><div style="position:absolute;top:183.69pt;left:137.32pt;z-index:222;letter-spacing:-.007em;">• STR r0, [r1]</div><div style="position:absolute;top:183.69pt;left:331.6pt;z-index:222;">; Store contents of r0 to location pointed to</div></span><img style="position:absolute;left:529.9pt;top:453.26pt;width:74.8pt;height:25.8pt;z-index:403;" src="./target/0f229202853e714e5e956ea75269f4ec.png" alt="__rendered_path__403" /><img style="position:absolute;left:523.54pt;top:446.82pt;width:74.8pt;height:26pt;z-index:405;" src="./target/70712761d459b8cf143f2f1ccd929ada.png" alt="__rendered_path__405" /><img style="position:absolute;left:443.8pt;top:461.48pt;width:57.3pt;height:2.1pt;z-index:437;" src="./target/b7b57bc42bf7df8b94249869d878c623.png" alt="__rendered_path__437" /><span style="white-space:pre;"><div style="position:absolute;top:205.17pt;left:331.6pt;z-index:242;">; by contents of r1.</div></span><span style="white-space:pre;"><div style="position:absolute;top:233.97pt;left:137.32pt;z-index:297;letter-spacing:-.007em;">• LDR r2, [r1]</div><div style="position:absolute;top:233.97pt;left:331.6pt;z-index:297;">; Load r2 with contents of memory location</div></span><span style="white-space:pre;"><div style="position:absolute;top:255.45pt;left:331.6pt;z-index:328;">; pointed to by contents of r1.</div></span><span class="fmt-73" style="white-space:pre;"><div style="position:absolute;top:300.96pt;left:227.08pt;z-index:375;letter-spacing:-.002em;">r0</div><div style="position:absolute;top:300.96pt;left:362.2pt;z-index:375;"><span style="position:relative;left:0pt;top:-2pt;">M</span><span style="position:relative;left:0pt;top:-2pt;">e</span><span style="position:relative;left:0pt;top:-2pt;">m</span><span style="position:relative;left:0pt;top:-2pt;">o</span><span style="position:relative;left:0pt;top:-2pt;">r</span><span style="position:relative;left:0pt;top:-2pt;">y</span></div></span><img style="position:absolute;left:723.82pt;top:560.22pt;width:5.6pt;height:5.6pt;z-index:60;" src="./target/ce6513985399c0e12fc064993de
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 44</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-127"><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:139.12pt;z-index:16;">r</div></span><span style="white-space:pre;"><div style="position:absolute;top:154.29pt;left:120.52pt;z-index:120;">*</div></span><span style="white-space:pre;"><div style="position:absolute;top:225.93pt;left:120.52pt;z-index:273;">*</div></span><span style="white-space:pre;"><div style="position:absolute;top:311.97pt;left:120.52pt;z-index:399;">*</div></span><span style="white-space:pre;"><div style="position:absolute;top:369.45pt;left:120.52pt;z-index:524;">*</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:15;">The ARM Inst</div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:49.3622pt;left:147.64pt;z-index:89;letter-spacing:.001em;">Load and Store Word or Byte:</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:91.242pt;left:143.08pt;z-index:119;letter-spacing:.001em;">Offsets from the Base Register</div></span><span class="fmt-128" style="white-space:pre;"><div style="position:absolute;top:154.29pt;left:144.76pt;z-index:193;">As well as accessing the actual location contained in the base register, </div></span><span class="fmt-128" style="white-space:pre;"><div style="position:absolute;top:175.77pt;left:144.76pt;z-index:264;">these instructions can access a location offset from the base register </div></span><span class="fmt-128" style="white-space:pre;"><div style="position:absolute;top:197.25pt;left:144.76pt;z-index:272;letter-spacing:.001em;">pointer.</div></span><span class="fmt-128" style="white-space:pre;"><div style="position:absolute;top:225.93pt;left:144.76pt;z-index:291;">This offset can be</div></span><span style="white-space:pre;"><div style="position:absolute;top:254.61pt;left:159.4pt;z-index:345;letter-spacing:-.002em;">• An unsigned 12bit immediate value (ie 0 - 4095 bytes).</div></span><span style="white-space:pre;"><div style="position:absolute;top:283.29pt;left:159.4pt;z-index:398;letter-spacing:-.003em;">• A register, optionally shifted by an immediate value</div></span><img style="position:absolute;left:723.82pt;top:560.22pt;width:5.6pt;height:5.6pt;z-index:60;" src="./target/ce6513985399c0e12fc064993de3a583.png" alt="__rendered_path__60" /><span class="fmt-128" style="white-space:pre;"><div style="position:absolute;top:311.97pt;left:144.76pt;z-index:461;">This can be either added or subtracted from the base register:</div></span><span style="white-space:pre;"><div style="position:absolute;top:340.65pt;left:159.4pt;z-index:523;letter-spacing:-.009em;">• Prefix the offset value or register with <span class="fmt-128">+</span> (default) or <span class="fmt-128">-</span> .</div></span><span class="fmt-128" style="white-space:pre;"><div style="position:absolute;top:369.45pt;left:144.76pt;z-index:551;">This offset can be applied:</div></span><span style="white-space:pre;"><div style="position:absolute;top:398.13pt;left:159.4pt;z-index:603;letter-spacing:-.003em;">• before the transfer is made: <span class="fmt-63">P</span><span class="fmt-63">r</span><span class="fmt-63">e</span><span class="fmt-63">-</span><span class="fmt-63">i</span><span class="fmt-63">n</span><span class="fmt-63">d</span><span class="fmt-63">e</span><span class="fmt-63">x</span><span class="fmt-63">e</span><span class="fmt-63">d</span><span class="fmt-63"> </span><span class="fmt-63">a</span><span class="fmt-63">d</span><span class="fmt-63">d</span><span class="fmt-63">r</span><sp
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 45</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-131"><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:49.3622pt;left:662.8pt;z-index:88;">e</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:49.3622pt;left:147.64pt;z-index:87;letter-spacing:.001em;">Load and Store Word or Byt</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:91.242pt;left:199.24pt;z-index:111;letter-spacing:.001em;">Pre-indexed Addressing</div></span><span class="fmt-130" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.4389pt;z-index:390;letter-spacing:-.001em;">* <span class="fmt-131">E</span><span class="fmt-131">x</span><span class="fmt-131">a</span><span class="fmt-131">m</span><span class="fmt-131">p</span><span class="fmt-131">l</span><span class="fmt-131">e</span><span class="fmt-131">:</span><span class="fmt-131"> </span>STR r0, [r1,#12]</div><div style="position:absolute;top:155.01pt;left:464.32pt;z-index:390;"><span class="fmt-73">M</span><span class="fmt-73">e</span><span class="fmt-73">m</span><span class="fmt-73">o</span><span class="fmt-73">r</span><span class="fmt-73">y</span></div><div style="position:absolute;top:155.01pt;left:638.2pt;z-index:390;letter-spacing:-.001em;"><span class="fmt-73" style="position:relative;left:0pt;top:-12pt;">r</span><span class="fmt-73" style="position:relative;left:0pt;top:-12pt;">0</span></div></span><span class="fmt-73" style="white-space:pre;"><div style="position:absolute;top:172.8pt;left:631.12pt;z-index:393;letter-spacing:.001em;">0x5</div></span><span class="fmt-73" style="white-space:pre;"><div style="position:absolute;top:211.32pt;left:270.76pt;z-index:422;letter-spacing:.002em;">Offset</div></span><span class="fmt-73" style="white-space:pre;"><div style="position:absolute;top:238.92pt;left:287.8pt;z-index:429;letter-spacing:.001em;">12</div><div style="position:absolute;top:238.92pt;left:400.36pt;z-index:429;letter-spacing:-.001em;"><span class="fmt-126" style="position:relative;left:0pt;top:-1pt;">0</span><span class="fmt-126" style="position:relative;left:0pt;top:-1pt;">x</span><span class="fmt-126" style="position:relative;left:0pt;top:-1pt;">2</span><span class="fmt-126" style="position:relative;left:0pt;top:-1pt;">0</span><span class="fmt-126" style="position:relative;left:0pt;top:-1pt;">c</span></div><div style="position:absolute;top:238.92pt;left:481.36pt;z-index:429;letter-spacing:.001em;"><span>0</span><span>x</span><span>5</span></div></span><img style="position:absolute;left:537.28pt;top:227.88pt;width:17pt;height:17pt;z-index:416;" src="./target/d00b598c88984941a5f9390a07affc65.png" alt="__rendered_path__416" /><span class="fmt-73" style="white-space:pre;"><div style="position:absolute;top:275.04pt;left:188.92pt;z-index:346;letter-spacing:-.002em;">r1</div></span><img style="position:absolute;left:265.6pt;top:241.04pt;width:72pt;height:24pt;z-index:342;" src="./target/c03c41f04babeae71510fd976a2e9818.png" alt="__rendered_path__342" /><img style="position:absolute;left:259.36pt;top:234.8pt;width:72pt;height:24pt;z-index:344;" src="./target/cbbc926574abfd0d381749aadab337f6.png" alt="__rendered_path__344" /><img style="position:absolute;left:384.28pt;top:244.4pt;width:14pt;height:9pt;z-index:433;" src="./target/ce3a717688e12fdf459b94df25b295ea.png" alt="__rendered_path__433" /><span class="fmt-73" style="white-space:pre;"><div style="position:absolute;top:309.72pt;left:79.12pt;z-index:356;">R</div></span><span class="fmt-73" style="white-space:pre;"><div style="position:absolute;top:291.6pt;left:92.6799pt;z-index:352;">B</div></span><span class="fmt-73" style="white-space:pre;"><div style="position:absolute;top:309.72pt;left:91.24pt;z-index:357;">e</div></span><span class="fmt-73" style="white-space:pre;"><div style="position:absolute;top:291.6pt;left:104.8pt;z-index:353;">a</div></span><span class="fmt-73" style="white-space:pre;"><div style="position:absolute;top:309.72pt;lef
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 46</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-133"><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><img style="position:absolute;left:169.42pt;top:345.12pt;width:74.6pt;height:26.9pt;z-index:335;" src="./target/389cbd4255406a19d33e9b72bc5d4105.png" alt="__rendered_path__335" /><img style="position:absolute;left:163.18pt;top:338.78pt;width:74.6pt;height:27pt;z-index:337;" src="./target/fbcf18440beafb79728d1aee5130966e.png" alt="__rendered_path__337" /><img style="position:absolute;left:327.4pt;top:311.88pt;width:59.7pt;height:1.1pt;z-index:365;" src="./target/a7c7f3d0388c780fc3118f4e659e0256.png" alt="__rendered_path__365" /><img style="position:absolute;left:459.46pt;top:167.24pt;width:74.7pt;height:59.1pt;z-index:373;" src="./target/c97a2af89325a355139c9757789a78cf.png" alt="__rendered_path__373" /><img style="position:absolute;left:495.82pt;top:172.22pt;width:2.1pt;height:45.9pt;z-index:374;" src="./target/775a345d6b75f7a9d3b9f05b0ebc7aba.png" alt="__rendered_path__374" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:49.3622pt;left:147.64pt;z-index:89;letter-spacing:.001em;">Load and Store Word or Byte:</div></span><img style="position:absolute;left:459.46pt;top:250.78pt;width:74.7pt;height:24.4pt;z-index:375;" src="./target/0e64c353fd27a70377025fd99809ed65.png" alt="__rendered_path__375" /><img style="position:absolute;left:459.46pt;top:226.34pt;width:74.7pt;height:24.6pt;z-index:376;" src="./target/7914e82d6887ffc039cf3218e7476540.png" alt="__rendered_path__376" /><img style="position:absolute;left:602.98pt;top:222.48pt;width:74.7pt;height:26.9pt;z-index:389;" src="./target/27a7d6c6443da3500ed9ac795f75b889.png" alt="__rendered_path__389" /><img style="position:absolute;left:253.48pt;top:240.36pt;width:30.4pt;height:1.1pt;z-index:465;" src="./target/592e267a8dbaafa51edcea4cb21acde8.png" alt="__rendered_path__465" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:91.242pt;left:188.44pt;z-index:112;letter-spacing:.001em;">Post-indexed Addressing</div></span><img style="position:absolute;left:459.46pt;top:299.62pt;width:74.7pt;height:24.4pt;z-index:375;" src="./target/0e64c353fd27a70377025fd99809ed65.png" alt="__rendered_path__375" /><img style="position:absolute;left:459.46pt;top:275.06pt;width:74.7pt;height:24.6pt;z-index:376;" src="./target/7914e82d6887ffc039cf3218e7476540.png" alt="__rendered_path__376" /><img style="position:absolute;left:609.22pt;top:228.74pt;width:74.7pt;height:27pt;z-index:387;" src="./target/798f15de211882bcea89fedc4a8b2643.png" alt="__rendered_path__387" /><img style="position:absolute;left:163.9pt;top:224.7pt;width:74.7pt;height:27.2pt;z-index:437;" src="./target/444bb3fde59a138ad178846dddee1d56.png" alt="__rendered_path__437" /><span class="fmt-132" style="white-space:pre;"><div style="position:absolute;top:153.21pt;left:98.4399pt;z-index:372;letter-spacing:-.001em;">* <span class="fmt-133">E</span><span class="fmt-133">x</span><span class="fmt-133">a</span><span class="fmt-133">m</span><span class="fmt-133">p</span><span class="fmt-133">l</span><span class="fmt-133">e</span><span class="fmt-133">:</span><span class="fmt-133"> </span>STR r0, [r1], #12</div><div style="position:absolute;top:153.21pt;left:466.24pt;z-index:372;"><span class="fmt-73" style="position:relative;left:0pt;top:-9pt;">M</span><span class="fmt-73" style="position:relative;left:0pt;top:-9pt;">e</span><span class="fmt-73" style="position:rel
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 47</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-135"><span class="fmt-136" style="white-space:pre;"><div style="position:absolute;top:291.33pt;left:688.84pt;z-index:302;">m</div></span><span class="fmt-136" style="white-space:pre;"><div style="position:absolute;top:291.33pt;left:715.36pt;z-index:304;">d</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:49.3622pt;left:270.4pt;z-index:76;letter-spacing:.001em;">Load and Stores</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:91.242pt;left:192.76pt;z-index:100;letter-spacing:.001em;">with User Mode Privilege</div></span><span class="fmt-136" style="white-space:pre;"><div style="position:absolute;top:183.69pt;left:98.4389pt;z-index:164;"><span class="fmt-135">*</span> When using post-indexed addressing, there is a further form of </div></span><span class="fmt-136" style="white-space:pre;"><div style="position:absolute;top:205.17pt;left:122.68pt;z-index:185;">Load/Store Word/Byte:</div></span><span style="white-space:pre;"><div style="position:absolute;top:233.97pt;left:137.32pt;z-index:233;letter-spacing:-.002em;">&lt;LDR|STR&gt;{&lt;cond&gt;}{B}<span class="fmt-136">T</span> Rd, &lt;post_indexed_address&gt;</div></span><span class="fmt-136" style="white-space:pre;"><div style="position:absolute;top:291.33pt;left:98.4401pt;z-index:301;"><span class="fmt-135">*</span> When used in a privileged mode, this does the load/store with user </div></span><span class="fmt-136" style="white-space:pre;"><div style="position:absolute;top:312.81pt;left:122.68pt;z-index:316;letter-spacing:-.001em;">privilege.</div></span><span style="white-space:pre;"><div style="position:absolute;top:341.49pt;left:137.32pt;z-index:381;letter-spacing:-.002em;">• Normally used by an exception handler that is emulating a memory</div></span><span style="white-space:pre;"><div style="position:absolute;top:362.97pt;left:156.76pt;z-index:441;letter-spacing:-.001em;">access instruction that would normally execute in user mode.</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:93.5197pt;z-index:56;">RM Instruction Set - ARM University Program - V1.0</div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><span class="fmt-136" style="white-space:pre;"><div style="position:absolute;top:291.33pt;left:705.4pt;z-index:303;">o</div></span><span class="fmt-136" style="white-space:pre;"><div style="position:absolute;top:291.33pt;left:726.52pt;z-index:306;letter-spacing:.001em;">e </div></span><img style="position:absolute;left:623.08pt;top:484.04pt;width:108pt;height:96pt;z-index:3;" src="./target/c6053f756b075808893b5298e38e1f84.png" alt="__rendered_path__3" /><img style="position:absolute;left:723.88pt;top:559.76pt;width:6pt;height:6pt;z-index:59;" src="./target/58efb4d00cfdb6014dbb515b1afcaef7.png" alt="__rendered_path__59" /><img style="position:absolute;left:723.82pt;top:560.22pt;width:5.6pt;height:5.6pt;z-index:60;" src="./target/ce6513985399c0e12fc064993de3a583.png" alt="__rendered_path__60" /><img style="position:absolute;left:641.92pt;top:505.04pt;width:72.5992pt;height:68.
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 48</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-138"><span style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:705.04pt;z-index:165;letter-spacing:.001em;">e</div></span><span class="fmt-126" style="white-space:pre;"><div style="position:absolute;top:194.67pt;left:745.84pt;z-index:671;">o</div></span><span class="fmt-126" style="white-space:pre;"><div style="position:absolute;top:210.51pt;left:746.92pt;z-index:679;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:116.68pt;z-index:12;letter-spacing:.001em;">I</div></span><span class="fmt-137" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.4398pt;z-index:94;">*</div></span><span class="fmt-137" style="white-space:pre;"><div style="position:absolute;top:205.17pt;left:98.4383pt;z-index:176;">*</div></span><span class="fmt-137" style="white-space:pre;"><div style="position:absolute;top:334.29pt;left:98.4385pt;z-index:306;">*</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:11;letter-spacing:-.001em;">The ARM </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:49.3622pt;left:255.28pt;z-index:77;letter-spacing:.001em;">Example Usage of</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:91.242pt;left:248.8pt;z-index:93;letter-spacing:.001em;">Addressing Modes</div></span><span style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:122.68pt;z-index:164;">Imagine an array, the first element of which is pointed to by the cont</div></span><span style="white-space:pre;"><div style="position:absolute;top:176.49pt;left:122.68pt;z-index:175;letter-spacing:.001em;">of r0.</div></span><span style="white-space:pre;"><div style="position:absolute;top:205.17pt;left:122.68pt;z-index:662;">If we want to access a particular element,</div><div style="position:absolute;top:205.17pt;left:590.08pt;z-index:662;letter-spacing:.001em;"><span class="fmt-126" style="position:relative;left:0pt;top:-3pt;">e</span><span class="fmt-126" style="position:relative;left:0pt;top:-3pt;">l</span><span class="fmt-126" style="position:relative;left:0pt;top:-3pt;">e</span><span class="fmt-126" style="position:relative;left:0pt;top:-3pt;">m</span><span class="fmt-126" style="position:relative;left:0pt;top:-3pt;">e</span><span class="fmt-126" style="position:relative;left:0pt;top:-3pt;">n</span><span class="fmt-126" style="position:relative;left:0pt;top:-3pt;">t</span></div></span><span style="white-space:pre;"><div style="position:absolute;top:226.77pt;left:122.68pt;z-index:257;">then we can use pre-indexed addressing:</div></span><span class="fmt-137" style="white-space:pre;"><div style="position:absolute;top:255.45pt;left:137.32pt;z-index:280;letter-spacing:-.005em;">• r1 is element we want.</div></span><span class="fmt-137" style="white-space:pre;"><div style="position:absolute;top:284.13pt;left:137.32pt;z-index:655;letter-spacing:-.004em;">• LDR r2, [r0, r1, LSL #2]</div><div style="position:absolute;top:287.43pt;left:611.44pt;z-index:655;" class="fmt-126">3</div></span><span class="fmt-126" style="white-space:pre;"><div style="position:absolute;top:311.07pt;left:487.72pt;z-index:693;letter-spacing:.001em;">Pointer to </div><div style="position:absolute;top:311.07pt;left:612.16pt;z-index:693;">2</div></span><span style="white-space:pre;"><div style="position:absolute;top:334.29pt;left:122.68pt;z-index:707;letter-spacing:.001em;">If we want to step through every</div><div style="position:absolute;top:334.29pt;left:478.12pt;z-index:707;"><span class="fmt-126" style="position:relative;left:0pt;top:-12pt;">s</span><span class="fmt-126" style="position:relative;left:0pt;top:-12pt;">t</span><span class="fmt-126" style="position:relative;left:0pt;top:-12pt;">a</span><span class="fmt-126" style="position:relative;left:0pt;top:-12pt;">r</span><span class="fmt-126" sty
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 49</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-140"><span style="white-space:pre;"><div style="position:absolute;top:176.49pt;left:715.12pt;z-index:245;">h</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:49.3622pt;left:196pt;z-index:86;letter-spacing:.001em;">Offsets for Halfword and </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:91.242pt;left:137.8pt;z-index:115;letter-spacing:.001em;">Signed Halfword / Byte Access</div></span><span style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.439pt;z-index:177;"><span class="fmt-139">*</span> The Load and Store Halfword and Load Signed Byte or Halfword </div></span><span style="white-space:pre;"><div style="position:absolute;top:176.49pt;left:122.68pt;z-index:244;">instructions can make use of pre- and post-indexed addressing in muc</div></span><span style="white-space:pre;"><div style="position:absolute;top:197.97pt;left:122.68pt;z-index:300;">the same way as the basic load and store instructions.</div></span><span style="white-space:pre;"><div style="position:absolute;top:226.77pt;left:98.4371pt;z-index:356;"><span class="fmt-139">*</span> However the actual offset formats are more constrained:</div></span><span class="fmt-139" style="white-space:pre;"><div style="position:absolute;top:255.45pt;left:137.32pt;z-index:430;letter-spacing:-.002em;">• The immediate value is limited to 8 bits (rather than 12 bits) giving an </div></span><span class="fmt-139" style="white-space:pre;"><div style="position:absolute;top:276.93pt;left:156.76pt;z-index:452;">offset of 0-255 bytes.</div></span><span class="fmt-139" style="white-space:pre;"><div style="position:absolute;top:305.61pt;left:137.32pt;z-index:505;letter-spacing:-.002em;">• The register form cannot have a shift applied to it.</div></span><img style="position:absolute;left:641.92pt;top:505.04pt;width:72.5992pt;height:68.28pt;z-index:61;" src="./target/7411ebe8c009fe014a242380fa9c7f7d.png" alt="Image_520_0" /><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:93.5197pt;z-index:56;">RM Instruction Set - ARM University Program - V1.0</div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><span style="white-space:pre;"><div style="position:absolute;top:176.49pt;left:726.16pt;z-index:246;"> </div></span><img style="position:absolute;left:623.08pt;top:484.04pt;width:108pt;height:96pt;z-index:3;" src="./target/c6053f756b075808893b5298e38e1f84.png" alt="__rendered_path__3" /><img style="position:absolute;left:723.88pt;top:559.76pt;width:6pt;height:6pt;z-index:59;" src="./target/58efb4d00cfdb6014dbb515b1afcaef7.png" alt="__rendered_path__59" /><img style="position:absolute;left:723.82pt;top:560.22pt;width:5.6pt;height:5.6pt;z-index:60;" src="./target/ce6513985399c0e12fc064993de3a583.png" alt="__rendered_path__60" /><img style="position:absolute;left:43.12pt;top:14pt;width:755.8pt;height:567pt;z-index:506;" src="./target/0901647d626b9293db6430463286fe9d.png" alt="__rendered_path__506" /><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:759.16pt
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 50</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-142"><span class="fmt-141" style="white-space:pre;"><div style="position:absolute;top:236.85pt;left:709.24pt;z-index:246;">d</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:102.64pt;z-index:10;">M</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:93.5197pt;z-index:9;">R</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:244.36pt;z-index:80;letter-spacing:.001em;">Effect of endianess</div></span><span style="white-space:pre;"><div style="position:absolute;top:157.89pt;left:122.08pt;z-index:145;"><span class="fmt-141">*</span> The ARM can be set up to access its data in either little or big</div></span><span style="white-space:pre;"><div style="position:absolute;top:179.37pt;left:146.32pt;z-index:160;letter-spacing:.001em;">endian format. </div></span><span style="white-space:pre;"><div style="position:absolute;top:208.17pt;left:122.08pt;z-index:175;letter-spacing:-.002em;"><span class="fmt-141">*</span> Little endian:</div></span><span class="fmt-141" style="white-space:pre;"><div style="position:absolute;top:236.85pt;left:160.96pt;z-index:245;letter-spacing:-.002em;">• Least significant byte of a word is stored in <span class="fmt-63">b</span><span class="fmt-63">i</span><span class="fmt-63">t</span><span class="fmt-63">s</span><span class="fmt-63"> </span><span class="fmt-63">0</span><span class="fmt-63">-</span><span class="fmt-63">7</span><span class="fmt-63"> </span>of an addresse</div></span><span class="fmt-141" style="white-space:pre;"><div style="position:absolute;top:258.33pt;left:180.4pt;z-index:252;">word.</div></span><span style="white-space:pre;"><div style="position:absolute;top:287.01pt;left:122.08pt;z-index:264;letter-spacing:-.002em;"><span class="fmt-141">*</span> Big endian:</div></span><span class="fmt-141" style="white-space:pre;"><div style="position:absolute;top:315.69pt;left:160.96pt;z-index:328;letter-spacing:-.002em;">• Least significant byte of a word is stored in <span class="fmt-63">b</span><span class="fmt-63">i</span><span class="fmt-63">t</span><span class="fmt-63">s</span><span class="fmt-63"> </span><span class="fmt-63">2</span><span class="fmt-63">4</span><span class="fmt-63">-</span><span class="fmt-63">3</span><span class="fmt-63">1</span><span class="fmt-63"> </span>of an </div></span><span class="fmt-141" style="white-space:pre;"><div style="position:absolute;top:337.17pt;left:180.4pt;z-index:343;">addressed word.</div></span><span style="white-space:pre;"><div style="position:absolute;top:365.85pt;left:122.08pt;z-index:411;"><span class="fmt-141">*</span> This has no real relevance unless data is stored as words and then </div></span><span style="white-space:pre;"><div style="position:absolute;top:387.33pt;left:146.32pt;z-index:469;">accessed in smaller sized quantities (halfwords or bytes).</div></span><span class="fmt-141" style="white-space:pre;"><div style="position:absolute;top:416.01pt;left:160.96pt;z-index:536;letter-spacing:-.002em;">• Which byte / halfword is accessed will depend on the endianess of </div></span><span class="fmt-141" style="white-space:pre;"><div style="position:absolute;top:437.49pt;left:180.4pt;z-index:556;">the system involved.</div></span><img style="position:absolute;left:641.92pt;top:505.04pt;width:72.5992pt;height:68.28pt;
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 51</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-146"><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:470.92pt;z-index:73;">x</div></span><span class="fmt-143" style="white-space:pre;"><div style="position:absolute;top:411.33pt;left:717.88pt;z-index:85;">d</div></span><span class="fmt-143" style="white-space:pre;"><div style="position:absolute;top:411.33pt;left:734.44pt;z-index:87;">a</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:240.16pt;z-index:72;letter-spacing:.001em;">Endianess E</div></span><span class="fmt-145" style="white-space:pre;"><div style="position:absolute;top:149.01pt;left:338.8pt;z-index:130;">r0 = 0x11223344</div></span><span style="white-space:pre;"><div style="position:absolute;top:178.94pt;left:334.36pt;z-index:173;letter-spacing:.001em;">31 24 23 16 15 8 7 0</div></span><span class="fmt-144" style="white-space:pre;"><div style="position:absolute;top:201.61pt;left:345.28pt;z-index:204;letter-spacing:-.001em;">11 22 33 44</div></span><span class="fmt-147" style="white-space:pre;"><div style="position:absolute;top:281.77pt;left:363.76pt;z-index:549;">STR r0, [r1]</div></span><img style="position:absolute;left:357.88pt;top:269.48pt;width:107pt;height:51pt;z-index:535;" src="./target/d90d0aff76b8f441531dd62679e2b9f7.png" alt="__rendered_path__535" /><img style="position:absolute;left:351.64pt;top:263.24pt;width:107pt;height:51pt;z-index:536;" src="./target/fa5d383401b70925f5dc3e031f11c39c.png" alt="__rendered_path__536" /><span style="white-space:pre;"><div style="position:absolute;top:353.78pt;left:186.52pt;z-index:253;letter-spacing:.001em;">31 24 23 16 15 8 7 0</div></span><img style="position:absolute;left:259.84pt;top:330.4pt;width:18pt;height:16pt;z-index:567;" src="./target/2e4cb95af291a6038152af655cfda4a7.png" alt="__rendered_path__567" /><span class="fmt-144" style="white-space:pre;"><div style="position:absolute;top:374.17pt;left:120.88pt;z-index:585;letter-spacing:.001em;">r1 = 0x100</div><div style="position:absolute;top:374.17pt;left:198.28pt;z-index:585;letter-spacing:-.001em;">11 22 33 44</div><div style="position:absolute;top:374.17pt;left:374.8pt;z-index:585;letter-spacing:-.002em;"><span class="fmt-145" style="position:relative;left:0pt;top:-1pt;">M</span><span class="fmt-145" style="position:relative;left:0pt;top:-1pt;">e</span><span class="fmt-145" style="position:relative;left:0pt;top:-1pt;">m</span><span class="fmt-145" style="position:relative;left:0pt;top:-1pt;">o</span><span class="fmt-145" style="position:relative;left:0pt;top:-1pt;">r</span><span class="fmt-145" style="position:relative;left:0pt;top:-1pt;">y</span></div></span><span class="fmt-143" style="white-space:pre;"><div style="position:absolute;top:413.25pt;left:64.7198pt;z-index:565;">Little-endian</div><div style="position:absolute;top:413.25pt;left:357.28pt;z-index:565;letter-spacing:.001em;"><span class="fmt-147" style="position:relative;left:0pt;top:2pt;">L</span><span class="fmt-147" style="position:relative;left:0pt;top:2pt;">D</span><span class="fmt-147" style="position:relative;left:0pt;top:2pt;">R</span><span class="fmt-147" style="position:relative;left:0pt;top:2pt;">B</span><span class="fmt-147" style="position:relative;left:0pt;top:2pt;"> </span><span class="fmt-147" style="position:relative;left:0pt;top:2pt;">r</span><span class="fmt-147" style="position:relative;left:0pt;top:2pt;">2</span><span class="fmt-147" style="position:relative;left:0pt;top:2pt;">,</span><span class="fmt-147" style="position:relative;left:0pt;top:2pt;"> </span><span class="fmt-147" style="position:relative;left:0pt;top:2pt;">[</span><span class="fmt-147" style="position:relative;left:0pt;top:2pt;">r</span><span class="fmt-147" style="position:relative;left:0pt;top:2pt;">1</span><span class="fmt-147" style="position:relative;left:0pt;top:2pt;">]</span></div></span><img
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 52</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-149"><span style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:655.96pt;z-index:132;">)</div></span><span style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:667.6pt;z-index:134;">o</div></span><span style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:689.2pt;z-index:137;">a</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:353.44pt;z-index:68;letter-spacing:.001em;">Quiz #4</div></span><span style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.44pt;z-index:131;"><span class="fmt-148">*</span> Write a segment of code that add together elements x to x+(n-1</div></span><span style="white-space:pre;"><div style="position:absolute;top:176.49pt;left:122.68pt;z-index:202;">array, where the element x=0 is the first element of the array.</div></span><span style="white-space:pre;"><div style="position:absolute;top:205.17pt;left:98.4397pt;z-index:257;letter-spacing:-.001em;"><span class="fmt-148">*</span> Each element of the array is word sized (ie. 32 bits).</div></span><span style="white-space:pre;"><div style="position:absolute;top:233.97pt;left:98.4395pt;z-index:305;"><span class="fmt-148">*</span> The segment should use post-indexed addressing.</div></span><span style="white-space:pre;"><div style="position:absolute;top:262.65pt;left:98.4404pt;z-index:360;"><span class="fmt-148">*</span> At the start of your segments, you should assume that:</div></span><span class="fmt-148" style="white-space:pre;"><div style="position:absolute;top:291.33pt;left:137.32pt;z-index:455;letter-spacing:-.003em;">• r0 points to the start of the array.</div><div style="position:absolute;top:291.33pt;left:559.84pt;z-index:455;"><span class="fmt-73" style="position:relative;left:0pt;top:10pt;">E</span><span class="fmt-73" style="position:relative;left:0pt;top:10pt;">l</span><span class="fmt-73" style="position:relative;left:0pt;top:10pt;">e</span><span class="fmt-73" style="position:relative;left:0pt;top:10pt;">m</span><span class="fmt-73" style="position:relative;left:0pt;top:10pt;">e</span><span class="fmt-73" style="position:relative;left:0pt;top:10pt;">n</span><span class="fmt-73" style="position:relative;left:0pt;top:10pt;">t</span><span class="fmt-73" style="position:relative;left:0pt;top:10pt;">s</span></div></span><img style="position:absolute;left:559.84pt;top:319.88pt;width:75pt;height:3pt;z-index:456;" src="./target/3df4d8326c1d0c14e59ae34be7bd74b5.png" alt="__rendered_path__456" /><span class="fmt-148" style="white-space:pre;"><div style="position:absolute;top:320.01pt;left:137.32pt;z-index:404;letter-spacing:-.012em;">• r1 = x</div></span><span class="fmt-148" style="white-space:pre;"><div style="position:absolute;top:348.69pt;left:137.32pt;z-index:411;letter-spacing:-.012em;">• r2 = n</div></span><span class="fmt-150" style="white-space:pre;"><div style="position:absolute;top:367.59pt;left:585.76pt;z-index:445;">x + (n - 1)</div></span><span class="fmt-150" style="white-space:pre;"><div style="position:absolute;top:403.83pt;left:357.28pt;z-index:458;letter-spacing:.001em;">n</div></span><span class="fmt-150" style="white-space:pre;"><div style="position:absolute;top:403.83pt;left:366.28pt;z-index:459;letter-spacing:.001em;"> </div></span><span class="fmt-150" style="white-space:pre;"><div style="position:absolute;top:403.83pt;left:3
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 53</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-152"><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:184.36pt;z-index:85;letter-spacing:.001em;">Quiz #4 - Sample Solution</div></span><span style="white-space:pre;"><div style="position:absolute;top:178.93pt;left:112.6pt;z-index:139;">ADD r0, r0, r1, LSL#2</div><div style="position:absolute;top:178.93pt;left:399.16pt;z-index:139;">; Set r0 to address of element x</div></span><img style="position:absolute;left:88.3596pt;top:195.56pt;width:25pt;height:3pt;z-index:86;" src="./target/b4ef5d4cdaab4caa212e5a9a9018a96b.png" alt="__rendered_path__86" /><span style="white-space:pre;"><div style="position:absolute;top:203.89pt;left:112.6pt;z-index:194;">ADD r2, r0, r2, LSL#2</div><div style="position:absolute;top:203.89pt;left:399.16pt;z-index:194;">; Set r2 to address of element n+1</div></span><span style="white-space:pre;"><div style="position:absolute;top:228.01pt;left:112.6pt;z-index:224;">MOV r1, #0</div><div style="position:absolute;top:228.01pt;left:399.16pt;z-index:224;">; Initialise counter</div></span><span style="white-space:pre;"><div style="position:absolute;top:252.13pt;left:88.359pt;z-index:228;">loop</div></span><span style="white-space:pre;"><div style="position:absolute;top:276.25pt;left:112.6pt;z-index:277;">LDR r3, [r0], #4</div><div style="position:absolute;top:276.25pt;left:399.16pt;z-index:277;">; Access element and move to next</div></span><img style="position:absolute;left:723.82pt;top:560.22pt;width:5.6pt;height:5.6pt;z-index:60;" src="./target/ce6513985399c0e12fc064993de3a583.png" alt="__rendered_path__60" /><span style="white-space:pre;"><div style="position:absolute;top:300.25pt;left:112.6pt;z-index:316;letter-spacing:.001em;">ADD r1, r1, r3</div><div style="position:absolute;top:300.25pt;left:399.16pt;z-index:316;letter-spacing:.001em;">; Add contents to counter</div></span><span style="white-space:pre;"><div style="position:absolute;top:324.37pt;left:112.6pt;z-index:356;">CMP r0, r2</div><div style="position:absolute;top:324.37pt;left:399.16pt;z-index:356;">; Have we reached element x+n?</div></span><span style="white-space:pre;"><div style="position:absolute;top:348.49pt;left:112.6pt;z-index:385;">BLT loop</div><div style="position:absolute;top:348.49pt;left:399.15pt;z-index:385;">; If not - repeat for </div></span><span style="white-space:pre;"><div style="position:absolute;top:370.69pt;left:399.16pt;z-index:399;">; </div><div style="position:absolute;top:370.69pt;left:487pt;z-index:399;letter-spacing:.001em;">next element</div></span><span style="white-space:pre;"><div style="position:absolute;top:392.77pt;left:112.6pt;z-index:428;">; on exit sum contained in r1</div></span><img style="position:absolute;left:623.08pt;top:484.04pt;width:108pt;height:96pt;z-index:3;" src="./target/c6053f756b075808893b5298e38e1f84.png" alt="__rendered_path__3" /><img style="position:absolute;left:723.88pt;top:559.76pt;width:6pt;height:6pt;z-index:59;" src="./target/58efb4d00cfdb6014dbb515b1afcaef7.png" alt="__rendered_path__59" /><img style="position:absolute;left:641.92pt;top:505.04pt;width:72.5992pt;height:68.28pt;z-index:61;" src="./target/7411ebe8c009fe014a242380fa9c7f7d.png" alt="Image_560_0" /><img style="position:absolute;left:43.12pt;top:14pt;width:755.8pt;height:567pt;z-index:429;" src="./target/0901647d626b9293db6430463286fe9d.png" alt="__rendered_pat
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 54</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-155">
<img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" />
<img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" />
<img style="position:absolute;left:484.66pt;top:399.66pt;width:217.7pt;height:84.2pt;z-index:63;" src="./target/d99bf86aa40df52f7046eeed6f9b3b6f.png" alt="__rendered_path__63" />
<img style="position:absolute;left:478.42pt;top:393.5pt;width:217.7pt;height:84pt;z-index:65;" src="./target/c9ed28bb2514b03d2ba5125a43298c38.png" alt="__rendered_path__65" />
<img style="position:absolute;left:274.18pt;top:367.5pt;width:1.1pt;height:98.3pt;z-index:89;" src="./target/96b29a9e6408735963d0f88dc289872b.png" alt="__rendered_path__89" />
<img style="position:absolute;left:145.3pt;top:333.94pt;width:547.6pt;height:30.4pt;z-index:90;" src="./target/76da33667fc6e73d0e027b4492f84220.png" alt="__rendered_path__90" />
<img style="position:absolute;left:282.7pt;top:334.6pt;width:1.1pt;height:8.8pt;z-index:91;" src="./target/0bf2e127158831f678c2119babce0c8c.png" alt="__rendered_path__91" />
<img style="position:absolute;left:334.18pt;top:333.5pt;width:1.1pt;height:8.7pt;z-index:92;" src="./target/bfc0ec4f45fa5d691e048c7e88fbbab4.png" alt="__rendered_path__92" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:209.8pt;z-index:88;letter-spacing:.001em;">Block Data Transfer (1)</div></span><img style="position:absolute;left:351.1pt;top:333.5pt;width:1.1pt;height:8.7pt;z-index:92;" src="./target/bfc0ec4f45fa5d691e048c7e88fbbab4.png" alt="__rendered_path__92" /><span class="fmt-157" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.4396pt;z-index:888;"><span class="fmt-156">*</span> The Load and Store Multiple instructions (LDM / STM) allow betweeen </div></span><img style="position:absolute;left:299.74pt;top:334.74pt;width:2.1pt;height:29.3pt;z-index:93;" src="./target/ee182755860c150710d601d7defc937f.png" alt="__rendered_path__93" /><img style="position:absolute;left:317.02pt;top:334.38pt;width:2.1pt;height:29.3pt;z-index:93;" src="./target/ee182755860c150710d601d7defc937f.png" alt="__rendered_path__93" /><img style="position:absolute;left:369.46pt;top:334.6pt;width:1.1pt;height:8.8pt;z-index:91;" src="./target/0bf2e127158831f678c2119babce0c8c.png" alt="__rendered_path__91" /><img style="position:absolute;left:145.18pt;top:333.5pt;width:1.1pt;height:8.7pt;z-index:92;" src="./target/bfc0ec4f45fa5d691e048c7e88fbbab4.png" alt="__rendered_path__92" /><span class="fmt-157" style="white-space:pre;"><div style="position:absolute;top:176.49pt;left:122.68pt;z-index:943;">1 and 16 registers to be transferred to or from memory.</div></span><img style="position:absolute;left:387.94pt;top:334.6pt;width:1.1pt;height:8.8pt;z-index:91;" src="./target/0bf2e127158831f678c2119babce0c8c.png" alt="__rendered_path__91" /><img style="position:absolute;left:247.06pt;top:333.5pt;width:1.1pt;height:8.7pt;z-index:92;" src="./target/bfc0ec4f45fa5d691e048c7e88fbbab4.png" alt="__rendered_path__92" /><span class="fmt-157" style="white-space:pre;"><div style="position:absolute;top:205.17pt;left:98.4409pt;z-index:984;letter-spacing:-.001em;"><span class="fmt-156">*</span> The transferred registers can be either:</div></span><img style="position:absolute;left:404.14pt;top:334.6pt;width:1.1pt;height:8.8pt;z-index:91;" src="./target/0bf2e127158831f678c2119babce0c8c.png" alt="__rendered_path__91" /><img style="position:absolute;left:264.34pt;top:333.5pt;width:1.1pt;height:8.7pt;z-index:92;" src="./target/bfc0ec4f45fa5d691e048c7e88fbbab4.png" alt="__rendered_path__92" /><span class="fmt-156" style="white-space:pre;"><div style="position:absolute;top:233.97pt;left:137.32pt;z-index:1039;letter-spacing:-.002em;">• Any subset of the current bank of registers (default).</div></span><img style="position:absolute;left:441.1pt;top:334.6pt;width:1.1pt;height:8.8pt;z-index:91;" src="./target/0bf2e127158831f678c2119babce0c8c.png" alt="__rendered_path__91" /><span class="fmt-156" style="white-space:pre;"><div style="position:absolute;top:262.65pt;left:137.32pt;z-index:1108;letter-spacing:-.002em;">• Any subset of the user mode bank of registers when in a priviledged </div></span><img style="position:absolute;left:458.38pt;top:334.6pt;width:1.1pt;height:8.8pt;z-index:91;" src="./target/0bf2e127158831f678c2119babce0c8c.png" alt="__rendered_path__91" /><span class="fmt-156" style="white-space:pre;"><div style="position:absolute;top:284.13pt;left:156.76pt;z-index:1146;letter-spacing:-.007em;">mode (postfix instruction with a <span class="fmt-157">^</span> ).</div></span><img style="position:absolute;left:723.82pt;top:560.22pt;width:5.6pt;height:5.6pt;z-index:60;" src="./target/ce6513985399c0e12fc064993de3a583.png" alt="__rendered_path__60" /><img style="position:absolute;left:475.78pt;top:334.6pt;width:1.1pt;height:8.8pt;z-index:91;" src="./target/0bf2e127158831f678c2119babce0c8c.png" alt="__rendered_path__91" /><span style="white-space:pre;"><div style="position:absolute;top:320.42pt;left:149.56pt;z-index:605;letter-spacing:.003em;">31</div><div style="position:ab
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 55</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-158"><span style="white-space:pre;"><div style="position:absolute;top:183.69pt;left:733.6pt;z-index:222;">r</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:209.8pt;z-index:84;letter-spacing:.001em;">Block Data Transfer (2)</div></span><span class="fmt-159" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.439pt;z-index:150;letter-spacing:-.001em;"><span class="fmt-158">*</span> Base register used to determine where memory access should occur.</div></span><span style="white-space:pre;"><div style="position:absolute;top:183.69pt;left:137.32pt;z-index:221;letter-spacing:-.002em;">• 4 different addressing modes allow increment and decrement inclusive o</div></span><span style="white-space:pre;"><div style="position:absolute;top:205.17pt;left:156.76pt;z-index:263;letter-spacing:-.001em;">exclusive of the base register location.</div></span><span style="white-space:pre;"><div style="position:absolute;top:233.97pt;left:137.32pt;z-index:331;letter-spacing:-.002em;">• Base register can be optionally updated following the transfer (by </div></span><span style="white-space:pre;"><div style="position:absolute;top:255.45pt;left:156.76pt;z-index:356;letter-spacing:-.01em;">appending it with an <span class="fmt-159">!</span> .</div></span><span style="white-space:pre;"><div style="position:absolute;top:284.13pt;left:137.32pt;z-index:424;letter-spacing:-.002em;">• Lowest register number is always transferred to/from lowest memory </div></span><span style="white-space:pre;"><div style="position:absolute;top:305.61pt;left:156.76pt;z-index:442;letter-spacing:-.001em;">location accessed.</div></span><span class="fmt-159" style="white-space:pre;"><div style="position:absolute;top:334.29pt;left:98.436pt;z-index:484;letter-spacing:-.001em;"><span class="fmt-158">*</span> These instructions are very efficient for</div></span><span style="white-space:pre;"><div style="position:absolute;top:362.97pt;left:137.32pt;z-index:513;letter-spacing:-.004em;">• Saving and restoring context</div></span><span style="white-space:pre;"><div style="position:absolute;top:391.65pt;left:176.2pt;z-index:556;letter-spacing:-.001em;"> For this useful to view memory as a stack.</div></span><span style="white-space:pre;"><div style="position:absolute;top:420.33pt;left:137.32pt;z-index:598;letter-spacing:-.003em;">• Moving large blocks of data around memory</div></span><span style="white-space:pre;"><div style="position:absolute;top:449.01pt;left:176.2pt;z-index:671;"> For this useful to directly represent functionality of the instructions.</div></span><img style="position:absolute;left:641.92pt;top:505.04pt;width:72.5992pt;height:68.28pt;z-index:61;" src="./target/7411ebe8c009fe014a242380fa9c7f7d.png" alt="Image_578_0" /><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:93.5197pt;z-index:56;">RM Instruction Set - ARM University Program - V1.0</div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><span style="white-space:pre;"><div style="position:absolute;top:183.69pt
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 56</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-161"><span class="fmt-77" style="white-space:pre;"><div style="position:absolute;top:413.88pt;left:737.68pt;z-index:444;">f</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:359.8pt;z-index:67;letter-spacing:.001em;">Stacks</div></span><span style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.44pt;z-index:137;"><span class="fmt-160">*</span> A stack is an area of memory which grows as new data is “pushed” onto </div></span><span style="white-space:pre;"><div style="position:absolute;top:176.49pt;left:122.68pt;z-index:196;letter-spacing:.001em;">the “top” of it, and shrinks as data is “popped” off the top.</div></span><span style="white-space:pre;"><div style="position:absolute;top:205.17pt;left:98.4409pt;z-index:249;"><span class="fmt-160">*</span> Two pointers define the current limits of the stack.</div></span><span class="fmt-160" style="white-space:pre;"><div style="position:absolute;top:233.97pt;left:137.32pt;z-index:265;letter-spacing:-.007em;">• A base pointer </div></span><span class="fmt-160" style="white-space:pre;"><div style="position:absolute;top:262.65pt;left:176.2pt;z-index:329;letter-spacing:-.001em;"> used to point to the “bottom” of the stack (the first location).</div></span><span class="fmt-160" style="white-space:pre;"><div style="position:absolute;top:291.33pt;left:137.32pt;z-index:345;letter-spacing:-.007em;">• A stack pointer</div></span><span class="fmt-160" style="white-space:pre;"><div style="position:absolute;top:320.01pt;left:176.2pt;z-index:391;letter-spacing:-.001em;"> used to point the current “top” of the stack. </div></span><span class="fmt-152" style="white-space:pre;"><div style="position:absolute;top:358.21pt;left:278.92pt;z-index:408;">PUSH </div></span><span class="fmt-152" style="white-space:pre;"><div style="position:absolute;top:376.45pt;left:263.8pt;z-index:432;">{1,2,3}</div><div style="position:absolute;top:376.45pt;left:476.56pt;z-index:432;"><span style="position:relative;left:0pt;top:-2pt;">P</span><span style="position:relative;left:0pt;top:-2pt;">O</span><span style="position:relative;left:0pt;top:-2pt;">P</span></div></span><img style="position:absolute;left:326.2pt;top:392.84pt;width:18pt;height:12pt;z-index:417;" src="./target/d00f30b999cf2af12d0fdf2e19ed13e8.png" alt="__rendered_path__417" /><img style="position:absolute;left:518.8pt;top:392pt;width:18pt;height:12pt;z-index:433;" src="./target/7e24468bbde3db98cfa05ac07fd71c59.png" alt="__rendered_path__433" /><span class="fmt-77" style="white-space:pre;"><div style="position:absolute;top:409.32pt;left:295.24pt;z-index:443;letter-spacing:-.001em;">SP</div><div style="position:absolute;top:407.52pt;left:391.36pt;z-index:443;">3</div><div style="position:absolute;top:409.32pt;left:667.6pt;z-index:443;letter-spacing:-.001em;"><span style="position:relative;left:0pt;top:5pt;">R</span><span style="position:relative;left:0pt;top:5pt;">e</span><span style="position:relative;left:0pt;top:5pt;">s</span><span style="position:relative;left:0pt;top:5pt;">u</span><span style="position:relative;left:0pt;top:5pt;">l</span><span style="position:relative;left:0pt;top:5pt;">t</span><span style="position:relative;left:0pt;top:5pt;"> </span><span style="position:relative;left:0pt;top:5pt;">o</span></div></span><img style="position:absolute;left:358.6pt;top:405.12pt;width:73pt;height:23pt;z-index:418;" src="./target/619818270154ee204acffea43407267a.png" alt="__rendered_path__418" /><img style="position:absolute;left:338.68pt;top:412.52pt;width:14pt;height:9pt;z-index:429;" src="./target/8b0ca6b4488d5c5432d47bd7bf5e1390.png" alt="__rendered_path__429
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 57</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-163"><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:273.64pt;z-index:76;letter-spacing:.001em;">Stack Operation</div></span><span style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.4391pt;z-index:144;letter-spacing:-.006em;"><span class="fmt-162">*</span> Traditionally, a stack grows down in memory, with the last “ pushed”</div></span><span style="white-space:pre;"><div style="position:absolute;top:176.49pt;left:122.68pt;z-index:213;">value at the lowest address. The ARM also supports ascending stacks, </div></span><span style="white-space:pre;"><div style="position:absolute;top:197.97pt;left:122.68pt;z-index:264;">where the stack structure grows up through memory. </div></span><span style="white-space:pre;"><div style="position:absolute;top:226.77pt;left:98.4389pt;z-index:307;"><span class="fmt-162">*</span> The value of the stack pointer can either:</div></span><span class="fmt-162" style="white-space:pre;"><div style="position:absolute;top:255.45pt;left:137.32pt;z-index:355;letter-spacing:-.003em;">• Point to the last occupied address (Full stack)</div></span><span class="fmt-162" style="white-space:pre;"><div style="position:absolute;top:284.13pt;left:176.2pt;z-index:406;letter-spacing:-.001em;"> and so needs pre-decrementing (ie before the push)</div></span><img style="position:absolute;left:723.82pt;top:560.22pt;width:5.6pt;height:5.6pt;z-index:60;" src="./target/ce6513985399c0e12fc064993de3a583.png" alt="__rendered_path__60" /><span class="fmt-162" style="white-space:pre;"><div style="position:absolute;top:312.81pt;left:137.32pt;z-index:455;letter-spacing:-.003em;">• Point to the next occupied address (Empty stack)</div></span><span class="fmt-162" style="white-space:pre;"><div style="position:absolute;top:341.49pt;left:176.2pt;z-index:506;letter-spacing:-.001em;"> and so needs post-decrementing (ie after the push)</div></span><span style="white-space:pre;"><div style="position:absolute;top:370.17pt;left:98.4416pt;z-index:576;"><span class="fmt-162">*</span> The stack type to be used is given by the postfix to the instruction:</div></span><span class="fmt-162" style="white-space:pre;"><div style="position:absolute;top:398.85pt;left:137.32pt;z-index:614;letter-spacing:-.003em;">• STMFD / LDMFD : Full Descending stack</div></span><span class="fmt-162" style="white-space:pre;"><div style="position:absolute;top:427.53pt;left:137.32pt;z-index:652;letter-spacing:-.003em;">• STMFA / LDMFA : Full Ascending stack.</div></span><img style="position:absolute;left:43.12pt;top:14pt;width:755.8pt;height:567pt;z-index:790;" src="./target/0901647d626b9293db6430463286fe9d.png" alt="__rendered_path__790" /><span class="fmt-162" style="white-space:pre;"><div style="position:absolute;top:456.21pt;left:137.32pt;z-index:691;letter-spacing:-.003em;">• STMED / LDMED : Empty Descending stack</div></span><span class="fmt-162" style="white-space:pre;"><div style="position:absolute;top:485.01pt;left:137.32pt;z-index:729;letter-spacing:-.003em;">• ST
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 58</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-77"><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:389.08pt;z-index:68;letter-spacing:.001em;">E</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:436.48pt;z-index:70;">a</div></span><span style="white-space:pre;"><div style="position:absolute;top:143.52pt;left:120.88pt;z-index:86;">{</div></span><span style="white-space:pre;"><div style="position:absolute;top:143.52pt;left:226.12pt;z-index:98;">}</div></span><span style="white-space:pre;"><div style="position:absolute;top:143.52pt;left:717.04pt;z-index:252;">5</div></span><span class="fmt-164" style="white-space:pre;"><div style="position:absolute;top:194.99pt;left:594.4pt;z-index:266;letter-spacing:.001em;">P</div></span><span class="fmt-126" style="white-space:pre;"><div style="position:absolute;top:314.07pt;left:94.1196pt;z-index:127;letter-spacing:.001em;">P</div></span><span class="fmt-126" style="white-space:pre;"><div style="position:absolute;top:314.79pt;left:404.68pt;z-index:210;letter-spacing:.001em;">O</div></span><span class="fmt-126" style="white-space:pre;"><div style="position:absolute;top:314.07pt;left:581.2pt;z-index:269;">d</div></span><span class="fmt-126" style="white-space:pre;"><div style="position:absolute;top:314.07pt;left:593.44pt;z-index:271;letter-spacing:.001em;">S</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:93.5197pt;z-index:9;">R</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:120.28pt;z-index:13;letter-spacing:.001em;">n</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:225.04pt;z-index:30;">R</div></span><span class="fmt-126" style="white-space:pre;"><div style="position:absolute;top:314.07pt;left:57.3996pt;z-index:126;letter-spacing:.001em;">Old S</div></span><span class="fmt-164" style="white-space:pre;"><div style="position:absolute;top:429.23pt;left:72.7596pt;z-index:119;letter-spacing:.001em;">SP</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:8;letter-spacing:.003em;">The A</div></span><img style="position:absolute;left:73.8396pt;top:428.72pt;width:34pt;height:30pt;z-index:115;" src="./target/9e2f7a95abbb505afe53b87138550b8d.png" alt="__rendered_path__115" /><img style="position:absolute;left:67.5996pt;top:422.48pt;width:34pt;height:30pt;z-index:116;" src="./target/fd723976591713e5664682f1b7901107.png" alt="__rendered_path__116" /><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:102.64pt;z-index:12;letter-spacing:.002em;">M I</div></span><span style="white-space:pre;"><div style="position:absolute;top:127.68pt;left:134.08pt;z-index:85;letter-spacing:-.001em;">STMFD sp!,</div></span><span style="white-space:pre;"><div style="position:absolute;top:143.52pt;left:129.64pt;z-index:97;letter-spacing:-.001em;">r0,r1,r3-r5</div></span><img style="position:absolute;left:138.64pt;top:215.28pt;width:73pt;height:23pt;z-index:99;" src="./target/ef5584e3a56ec5ab29a43d3a3ad1ff7a.png" alt="__rendered_path__99" /><img style="position:absolute;left:138.64pt;top:192pt;width:73pt;height:23pt;z-index:101;" src="./target/b9def07abaf06e350192f13f57fba234.png" alt="__rendered_path__101" /><img style="position:absolute;left:138.64pt;top:168.48pt;width:73pt;height:23pt;z-index:103;" src="./target/619818270154ee204acffea43407267a.png" alt="__rendered_path__103" /><span class="fmt-73" style="white-space:pre;"><div style="position:absolute;top:335.4pt;left:166.12pt;z-index:106;letter-spacing:-.002em;">r5</div></span><img style="position:absolute;left:138.64pt;top:262.08pt;width:73pt;height:23pt;z-index:103;" src="./target/619818270154ee204acffea43407267a.png" alt="__rendered_path__103" /><img style="position:absolute;left:138.64pt;top:238.8pt;width:73pt;heig
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 59</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-166">
<img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" />
<img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:201.28pt;z-index:83;letter-spacing:.001em;">Stacks and Subroutines</div></span><span style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.4401pt;z-index:148;letter-spacing:-.001em;"><span class="fmt-165">*</span> One use of stacks is to create temporary register workspace for </div></span><span style="white-space:pre;"><div style="position:absolute;top:176.49pt;left:122.68pt;z-index:220;">subroutines. Any registers that are needed can be pushed onto the stack </div></span><span style="white-space:pre;"><div style="position:absolute;top:197.97pt;left:122.68pt;z-index:292;letter-spacing:.001em;">at the start of the subroutine and popped off again at the end so as to </div></span><span style="white-space:pre;"><div style="position:absolute;top:219.45pt;left:122.68pt;z-index:334;">restore them before return to the caller :</div></span><span class="fmt-167" style="white-space:pre;"><div style="position:absolute;top:247.09pt;left:98.4387pt;z-index:377;">STMFD sp!,{r0-r12, lr}</div><div style="position:absolute;top:247.09pt;left:409.24pt;z-index:377;">; stack all registers</div></span><span class="fmt-167" style="white-space:pre;"><div style="position:absolute;top:271.33pt;left:98.4391pt;z-index:409;">........</div><div style="position:absolute;top:271.33pt;left:409.24pt;z-index:409;">; and the return address</div></span><span class="fmt-167" style="white-space:pre;"><div style="position:absolute;top:295.57pt;left:98.4396pt;z-index:417;">........</div></span><img style="position:absolute;left:723.82pt;top:560.22pt;width:5.6pt;height:5.6pt;z-index:60;" src="./target/ce6513985399c0e12fc064993de3a583.png" alt="__rendered_path__60" /><span class="fmt-167" style="white-space:pre;"><div style="position:absolute;top:319.81pt;left:98.4396pt;z-index:463;">LDMFD sp!,{r0-r12, pc}</div><div style="position:absolute;top:319.81pt;left:409.24pt;z-index:463;">; load all the registers</div></span><span class="fmt-167" style="white-space:pre;"><div style="position:absolute;top:344.05pt;left:409.24pt;z-index:489;letter-spacing:.001em;">; and return automatically</div></span><span style="white-space:pre;"><div style="position:absolute;top:369.45pt;left:98.4392pt;z-index:552;"><span class="fmt-165">*</span> See the chapter on the ARM Procedure Call Standard in the SDT </div></span><span style="white-space:pre;"><div style="position:absolute;top:390.93pt;left:122.68pt;z-index:614;">Reference Manual for further details of register usage within </div></span><span style="white-space:pre;"><div style="position:absolute;top:412.41pt;left:122.68pt;z-index:626;letter-spacing:.001em;">subroutines.</div></span><span style="white-space:pre;"><div style="position:absolute;top:441.09pt;left:98.4387pt;z-index:704;"><span class="fmt-165">*</span> If the pop instruction also had the S bit set (using ^) then the transfer </div></span><img style="position:absolute;left:43.12pt;top:14pt;width:755.8pt;height:567pt;z-index:827;" src="./target/0901647d626b9293db6430463286fe9d.png" alt="__rendered_path__827" /><span style="white-space:pre;"><div style="position:absolute;top:462.57pt;left:122.68pt;z-index:773;letter-spacing:.001em;">of the PC when in a priviledged mode would also cause the SPSR to be </div></span><span style="white-space:pre;"><div style="position:absolute;top:484.05pt;left:122.68pt;z-index:826;letter-spacing:.001em;">copied into the CPSR (see exception handling module).</div></span><img style="position:absolute;left:623.08pt;top:484.04pt;width:108pt;height:96pt;z-index:3;" src="./target/c6053f756b075808893b5298e38e1f84.png" alt="__rendered_path__3" /><img style="position:absolute;left:723.88pt;top:559.76pt;width:6pt;height:6pt;z-index:59;" src="./target/58efb4d00cfdb6014dbb515b1afcaef7.png" alt="__rendered_path__59" /><img style="position:abso
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 60</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-168"><span class="fmt-169" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:735.16pt;z-index:175;">o</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:49.3622pt;left:222.88pt;z-index:84;letter-spacing:.001em;">Direct functionality of</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:91.242pt;left:238.96pt;z-index:103;letter-spacing:.001em;">Block Data Transfer</div></span><span class="fmt-169" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.4389pt;z-index:174;"><span class="fmt-168">*</span> When LDM / STM are not being used to implement stacks, it is clearer t</div></span><span class="fmt-169" style="white-space:pre;"><div style="position:absolute;top:176.49pt;left:122.68pt;z-index:233;">specify exactly what functionality of the instruction is:</div></span><span style="white-space:pre;"><div style="position:absolute;top:205.17pt;left:137.32pt;z-index:308;letter-spacing:-.002em;">• i.e. specify whether to increment / decrement the base pointer, before or </div></span><span style="white-space:pre;"><div style="position:absolute;top:226.77pt;left:156.76pt;z-index:332;letter-spacing:-.001em;">after the memory access.</div></span><span class="fmt-169" style="white-space:pre;"><div style="position:absolute;top:255.45pt;left:98.4366pt;z-index:404;"><span class="fmt-168">*</span> In order to do this, LDM / STM support a further syntax in addition to </div></span><span class="fmt-169" style="white-space:pre;"><div style="position:absolute;top:276.93pt;left:122.68pt;z-index:419;">the stack one: </div></span><span style="white-space:pre;"><div style="position:absolute;top:305.61pt;left:137.32pt;z-index:451;letter-spacing:-.003em;">• STMIA / LDMIA : Increment After</div></span><span style="white-space:pre;"><div style="position:absolute;top:334.29pt;left:137.32pt;z-index:484;letter-spacing:-.003em;">• STMIB / LDMIB : Increment Before</div></span><span style="white-space:pre;"><div style="position:absolute;top:362.97pt;left:137.32pt;z-index:516;letter-spacing:-.003em;">• STMDA / LDMDA : Decrement After</div></span><span style="white-space:pre;"><div style="position:absolute;top:391.65pt;left:137.32pt;z-index:549;letter-spacing:-.003em;">• STMDB / LDMDB : Decrement Before</div></span><img style="position:absolute;left:641.92pt;top:505.04pt;width:72.5992pt;height:68.28pt;z-index:61;" src="./target/7411ebe8c009fe014a242380fa9c7f7d.png" alt="Image_627_0" /><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:93.5197pt;z-index:56;">RM Instruction Set - ARM University Program - V1.0</div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><span class="fmt-169" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:745pt;z-index:176;"> </div></span><img style="position:absolute;left:623.08pt;top:484.04pt;width:108pt;height:96pt;z-index:3;" src="./target/c6053f756b075808893b5298e38e1f84.png" alt="__rendered_path__3" /><img style="position:absolute;left:723.88pt;top:559.76pt;width:6pt;height:6
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 61</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-167"><span class="fmt-170" style="white-space:pre;"><div style="position:absolute;top:183.33pt;left:690.76pt;z-index:223;">4</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:224.08pt;z-index:80;letter-spacing:.001em;">Example: Block Copy</div></span><span class="fmt-170" style="white-space:pre;"><div style="position:absolute;top:161.85pt;left:106pt;z-index:149;letter-spacing:-.002em;">• Copy a block of memory, which is an exact multiple of 12 words long </div></span><span class="fmt-170" style="white-space:pre;"><div style="position:absolute;top:183.33pt;left:125.44pt;z-index:222;">from the location pointed to by r12 to the location pointed to by r13. r1</div></span><span class="fmt-170" style="white-space:pre;"><div style="position:absolute;top:204.81pt;left:125.44pt;z-index:264;">points to the end of block to be copied.</div></span><span style="white-space:pre;"><div style="position:absolute;top:256.69pt;left:67.1193pt;z-index:308;">; r12 points to the start of the source data</div></span><span style="white-space:pre;"><div style="position:absolute;top:280.93pt;left:67.119pt;z-index:350;letter-spacing:.001em;">; r14 points to the end of the source data</div></span><span style="white-space:pre;"><div style="position:absolute;top:305.17pt;left:67.1188pt;z-index:399;letter-spacing:.001em;">; r13 points to the start of the destination data</div></span><span style="white-space:pre;"><div style="position:absolute;top:329.41pt;left:67.1185pt;z-index:613;letter-spacing:-.002em;">loop LDMIA r12!, {r0-r11} ; load 48 bytes</div><div style="position:absolute;top:329.41pt;left:587.92pt;z-index:613;letter-spacing:.002em;"><span class="fmt-171" style="position:relative;left:0pt;top:-9pt;">r</span><span class="fmt-171" style="position:relative;left:0pt;top:-9pt;">1</span><span class="fmt-171" style="position:relative;left:0pt;top:-9pt;">3</span></div></span><img style="position:absolute;left:625.84pt;top:325.52pt;width:14pt;height:9pt;z-index:610;" src="./target/cd9671188018a98ac51bd815ec2a0097.png" alt="__rendered_path__610" /><span style="white-space:pre;"><div style="position:absolute;top:353.65pt;left:144.88pt;z-index:616;letter-spacing:.002em;">STMIA r13!, {r0-r11} ; and store them</div><div style="position:absolute;top:353.65pt;left:587.92pt;z-index:616;letter-spacing:.002em;"><span class="fmt-171" style="position:relative;left:0pt;top:3pt;">r</span><span class="fmt-171" style="position:relative;left:0pt;top:3pt;">1</span><span class="fmt-171" style="position:relative;left:0pt;top:3pt;">4</span></div></span><img style="position:absolute;left:625.84pt;top:362.84pt;width:14pt;height:9pt;z-index:620;" src="./target/e9e7ac0c3099686888c76186a805f76f.png" alt="__rendered_path__620" /><span style="white-space:pre;"><div style="position:absolute;top:377.89pt;left:144.88pt;z-index:502;">CMP</div><div style="position:absolute;top:377.89pt;left:222.52pt;z-index:502;">r12, r14</div><div style="position:absolute;top:377.89pt;left:377.92pt;z-index:502;">; check for the end</div></span><span style="white-space:pre;"><div style="position:absolute;top:402.13pt;left:144.88pt;z-index:530;">BNE</div><div style="position:absolute;top:402.13pt;left:222.52pt;z-index:530;">loop</div><div style="position:absolute;top:402.13pt;left:377.92pt;z-index:530;">; and loop until done</div></span><span class="fmt-170" style="white-space:pre;"><div style="position:absolute;top:457.65pt;left:106pt;z-index:619;letter-spacing:-.003em;">• This loop transfers 48 bytes in 31 cycles</div><div style="position:absolute;top:457.65pt;left:589.48pt;z-index:619;letter-spacing:.002em;"><span class="fmt-171" style="position:relative;left:0pt;top:-13pt;">r</span><span class="fmt-171" style="position:relative;left:0pt;top:-13pt;">1</span><span class="fmt-171" style="position:relative;left:0pt;top:-13pt;">2</span></div></span><img style="position:absolute;left:625.24pt;top:454.16pt;width:14
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 62</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-173"><span style="white-space:pre;"><div style="position:absolute;top:384.57pt;left:688.84pt;z-index:323;">t</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:353.44pt;z-index:68;letter-spacing:.001em;">Quiz #5</div></span><span style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.44pt;z-index:135;"><span class="fmt-172">*</span> The contents of registers r0 to r6 need to be swapped around thus:</div></span><span class="fmt-172" style="white-space:pre;"><div style="position:absolute;top:183.69pt;left:137.32pt;z-index:152;letter-spacing:-.006em;">• r0 moved into r3</div></span><span class="fmt-172" style="white-space:pre;"><div style="position:absolute;top:212.49pt;left:137.32pt;z-index:169;letter-spacing:-.006em;">• r1 moved into r4</div></span><span class="fmt-172" style="white-space:pre;"><div style="position:absolute;top:241.17pt;left:137.32pt;z-index:186;letter-spacing:-.006em;">• r2 moved into r6</div></span><span class="fmt-172" style="white-space:pre;"><div style="position:absolute;top:269.85pt;left:137.32pt;z-index:203;letter-spacing:-.006em;">• r3 moved into r5</div></span><span class="fmt-172" style="white-space:pre;"><div style="position:absolute;top:298.53pt;left:137.32pt;z-index:220;letter-spacing:-.006em;">• r4 moved into r0</div></span><span class="fmt-172" style="white-space:pre;"><div style="position:absolute;top:327.21pt;left:137.32pt;z-index:237;letter-spacing:-.006em;">• r5 moved into r1</div></span><span class="fmt-172" style="white-space:pre;"><div style="position:absolute;top:355.89pt;left:137.32pt;z-index:254;letter-spacing:-.006em;">• r6 moved into r2</div></span><span style="white-space:pre;"><div style="position:absolute;top:384.57pt;left:98.4397pt;z-index:322;"><span class="fmt-172">*</span> Write a segment of code that uses full descending stack operations </div></span><span style="white-space:pre;"><div style="position:absolute;top:406.05pt;left:122.68pt;z-index:393;">carry this out, and hence requires no use of any other registers for </div></span><span style="white-space:pre;"><div style="position:absolute;top:427.53pt;left:122.68pt;z-index:411;">temporary storage.</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:93.5197pt;z-index:56;">RM Instruction Set - ARM University Program - V1.0</div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><span style="white-space:pre;"><div style="position:absolute;top:384.57pt;left:695.44pt;z-index:325;">o </div></span><img style="position:absolute;left:623.08pt;top:484.04pt;width:108pt;height:96pt;z-index:3;" src="./target/c6053f756b075808893b5298e38e1f84.png" alt="__rendered_path__3" /><img style="position:absolute;left:723.88pt;top:559.76pt;width:6pt;height:6pt;z-index:59;" src="./target/58efb4d00cfdb6014dbb515b1afcaef7.png" alt="__rendered_path__59" /><img style="position:absolute;left:723.82pt;top:560.22pt;width:5.6pt;height:5.6pt;z-index:60;" src="./target/ce6513985399c0e12fc064993de3a583.png" alt="__rendered_path__60" /><img style="position:abso
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 63</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-77"><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:404.32pt;z-index:73;">m</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:438.76pt;z-index:74;letter-spacing:.001em;">p</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:531.4pt;z-index:79;letter-spacing:.001em;">o</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:565.84pt;z-index:81;letter-spacing:.001em;">u</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:602.44pt;z-index:83;letter-spacing:.001em;">i</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:120.28pt;z-index:13;letter-spacing:.001em;">n</div></span><span class="fmt-174" style="white-space:pre;"><div style="position:absolute;top:225.69pt;left:79.12pt;z-index:208;letter-spacing:.001em;">Old SP</div></span><span class="fmt-176" style="white-space:pre;"><div style="position:absolute;top:354.13pt;left:93.5197pt;z-index:229;letter-spacing:-.001em;">SP</div></span><img style="position:absolute;left:89.9197pt;top:348.68pt;width:27pt;height:24pt;z-index:226;" src="./target/c7f914e15db553fe181e44ce06049131.png" alt="__rendered_path__226" /><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:12;letter-spacing:-.001em;">The ARM I</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:184.36pt;z-index:72;letter-spacing:.001em;">Quiz #5 - Sa</div></span><span style="white-space:pre;"><div style="position:absolute;top:174.12pt;left:132.04pt;z-index:112;letter-spacing:-.001em;">STMFD sp!,</div><div style="position:absolute;top:174.12pt;left:285.16pt;z-index:112;letter-spacing:-.001em;">LDMFD sp!,</div></span><span style="white-space:pre;"><div style="position:absolute;top:189.96pt;left:145.24pt;z-index:122;letter-spacing:-.001em;">{r0-r6}</div><div style="position:absolute;top:189.96pt;left:285.16pt;z-index:122;letter-spacing:-.001em;">{r3,r4,r6}</div></span><img style="position:absolute;left:145.6pt;top:221.6pt;width:58pt;height:18pt;z-index:209;" src="./target/90f11b2ea0d28d15347a24d0471bbb4e.png" alt="__rendered_path__209" /><img style="position:absolute;left:124.84pt;top:225.44pt;width:14pt;height:9pt;z-index:231;" src="./target/ce3a717688e12fdf459b94df25b295ea.png" alt="__rendered_path__231" /><span class="fmt-175" style="white-space:pre;"><div style="position:absolute;top:242.22pt;left:167.92pt;z-index:254;letter-spacing:-.002em;">r6</div><div style="position:absolute;top:242.22pt;left:322.12pt;z-index:254;letter-spacing:-.002em;">r6</div></span><img style="position:absolute;left:145.6pt;top:240.32pt;width:58pt;height:18pt;z-index:209;" src="./target/90f11b2ea0d28d15347a24d0471bbb4e.png" alt="__rendered_path__209" /><img style="position:absolute;left:299.8pt;top:221.6pt;width:59pt;height:18pt;z-index:237;" src="./target/21ee112d2e0dee2376bd25a73de1e5f3.png" alt="__rendered_path__237" /><span class="fmt-175" style="white-space:pre;"><div style="position:absolute;top:261.06pt;left:167.32pt;z-index:243;letter-spacing:-.002em;">r5</div><div style="position:absolute;top:261.06pt;left:321.52pt;z-index:243;letter-spacing:-.002em;">r5</div></span><img style="position:absolute;left:145.6pt;top:259.04pt;width:58pt;height:18pt;z-index:209;" src="./target/90f11b2ea0d28d15347a24d0471bbb4e.png" alt="__rendered_path__209" /><img style="position:absolute;left:299.8pt;top:240.32pt;width:59pt;height:18pt;z-index:237;" src="./target/21ee112d2e0dee2376bd25a73de1e5f3.png" alt="__rendered_path__237" /><span class="fmt-175" style="white-space:pre;"><div style="position:absolute;top:281.22pt;left:167.32pt;z-index:245;letter-spacing:-.002em;">r4</div><div style="position:absolute;top:281.22pt;left:
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 64</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-178"><span style="white-space:pre;"><div style="position:absolute;top:162.21pt;left:703.84pt;z-index:121;">t</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:102.64pt;z-index:10;">M</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:120.28pt;z-index:13;letter-spacing:.001em;">n</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:93.5197pt;z-index:9;">R</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:113.2pt;z-index:12;"> I</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:49.3629pt;left:228.4pt;z-index:349;letter-spacing:.001em;">Swap and Swap Byte </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:91.2427pt;left:311.32pt;z-index:361;letter-spacing:.001em;">Instructions</div></span><span style="white-space:pre;"><div style="position:absolute;top:162.21pt;left:147.28pt;z-index:120;"><span class="fmt-177">*</span> Atomic operation of a memory read followed by a memory wri</div></span><span style="white-space:pre;"><div style="position:absolute;top:183.69pt;left:171.52pt;z-index:181;">which moves byte or word quantities between registers and </div></span><span style="white-space:pre;"><div style="position:absolute;top:205.17pt;left:171.52pt;z-index:189;letter-spacing:.001em;">memory. </div></span><span style="white-space:pre;"><div style="position:absolute;top:233.97pt;left:147.28pt;z-index:197;letter-spacing:-.002em;"><span class="fmt-177">*</span> Syntax:</div></span><span class="fmt-177" style="white-space:pre;"><div style="position:absolute;top:262.65pt;left:186.16pt;z-index:225;letter-spacing:-.004em;">• SWP{&lt;cond&gt;}{B} Rd, Rm, [Rn]</div></span><span class="fmt-73" style="white-space:pre;"><div style="position:absolute;top:323.88pt;left:465.76pt;z-index:390;">1</div></span><span class="fmt-73" style="white-space:pre;"><div style="position:absolute;top:335.28pt;left:210.52pt;z-index:394;">Rn</div><div style="position:absolute;top:335.28pt;left:577.12pt;z-index:394;"><span style="position:relative;left:0pt;top:11pt;">t</span><span style="position:relative;left:0pt;top:11pt;">e</span><span style="position:relative;left:0pt;top:11pt;">m</span><span style="position:relative;left:0pt;top:11pt;">p</span></div></span><img style="position:absolute;left:378.28pt;top:341.16pt;width:60pt;height:23pt;z-index:363;" src="./target/ccf8d3d9389bea169cc7a0785e35b849.png" alt="__rendered_path__363" /><img style="position:absolute;left:249.64pt;top:338.16pt;width:60pt;height:23pt;z-index:374;" src="./target/a95ec123fc08b515676f98741755490b.png" alt="__rendered_path__374" /><img style="position:absolute;left:243.28pt;top:331.92pt;width:60pt;height:23pt;z-index:375;" src="./target/1f79bd6c875b2d8510e5c384a0a98b97.png" alt="__rendered_path__375" /><img style="position:absolute;left:353.68pt;top:343.04pt;width:14pt;height:9pt;z-index:379;" src="./target/9c0fac81e27e20013588546ae64a9fd6.png" alt="__rendered_path__379" /><span class="fmt-73" style="white-space:pre;"><div style="position:absolute;top:382.68pt;left:301.48pt;z-index:388;">2</div><div style="position:absolute;top:385.08pt;left:575.92pt;z-index:388;">3</div></span><img style="position:absolute;left:352.24pt;top:359.04pt;width:17pt;he
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 65</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-180"><span style="white-space:pre;"><div style="position:absolute;top:334.05pt;left:734.8pt;z-index:279;">g</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:200.32pt;z-index:85;letter-spacing:.001em;">Software Interrupt (SWI)</div></span><span class="fmt-181" style="white-space:pre;"><div style="position:absolute;top:150.74pt;left:135.76pt;z-index:732;letter-spacing:.003em;">31</div><div style="position:absolute;top:150.74pt;left:195.4pt;z-index:732;letter-spacing:.004em;">28 27</div><div style="position:absolute;top:150.74pt;left:261.52pt;z-index:732;letter-spacing:-.011em;">24 23</div><div style="position:absolute;top:147.5pt;left:676.48pt;z-index:732;">0</div></span><span class="fmt-182" style="white-space:pre;"><div style="position:absolute;top:177.13pt;left:154.96pt;z-index:711;letter-spacing:-.001em;">Cond 1 1 1 1</div><div style="position:absolute;top:177.13pt;left:368.8pt;z-index:711;letter-spacing:.001em;"><span style="position:relative;left:0pt;top:-2pt;">C</span><span style="position:relative;left:0pt;top:-2pt;">o</span><span style="position:relative;left:0pt;top:-2pt;">m</span><span style="position:relative;left:0pt;top:-2pt;">m</span><span style="position:relative;left:0pt;top:-2pt;">e</span><span style="position:relative;left:0pt;top:-2pt;">n</span><span style="position:relative;left:0pt;top:-2pt;">t</span><span style="position:relative;left:0pt;top:-2pt;"> </span><span style="position:relative;left:0pt;top:-2pt;">f</span><span style="position:relative;left:0pt;top:-2pt;">i</span><span style="position:relative;left:0pt;top:-2pt;">e</span><span style="position:relative;left:0pt;top:-2pt;">l</span><span style="position:relative;left:0pt;top:-2pt;">d</span><span style="position:relative;left:0pt;top:-2pt;"> </span><span style="position:relative;left:0pt;top:-2pt;">(</span><span style="position:relative;left:0pt;top:-2pt;">i</span><span style="position:relative;left:0pt;top:-2pt;">g</span><span style="position:relative;left:0pt;top:-2pt;">n</span><span style="position:relative;left:0pt;top:-2pt;">o</span><span style="position:relative;left:0pt;top:-2pt;">r</span><span style="position:relative;left:0pt;top:-2pt;">e</span><span style="position:relative;left:0pt;top:-2pt;">d</span><span style="position:relative;left:0pt;top:-2pt;"> </span><span style="position:relative;left:0pt;top:-2pt;">b</span><span style="position:relative;left:0pt;top:-2pt;">y</span><span style="position:relative;left:0pt;top:-2pt;"> </span><span style="position:relative;left:0pt;top:-2pt;">P</span><span style="position:relative;left:0pt;top:-2pt;">r</span><span style="position:relative;left:0pt;top:-2pt;">o</span><span style="position:relative;left:0pt;top:-2pt;">c</span><span style="position:relative;left:0pt;top:-2pt;">e</span><span style="position:relative;left:0pt;top:-2pt;">s</span><span style="position:relative;left:0pt;top:-2pt;">s</span><span style="position:relative;left:0pt;top:-2pt;">o</span><span style="position:relative;left:0pt;top:-2pt;">r</span><span style="position:relative;left:0pt;top:-2pt;">)</span></div></span><span style="white-space:pre;"><div style="position:absolute;top:236.01pt;left:234.4pt;z-index:730;letter-spacing:.001em;">Condition Field</div></span><span style="white-space:pre;"><div style="position:absolute;top:283.89pt;left:98.439pt;z-index:133;"><span class="fmt-179">*</span> In effect,
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 66</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-26"><span class="fmt-184" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:666.76pt;z-index:146;">f</div></span><span class="fmt-184" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:682.24pt;z-index:148;">o</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:183.04pt;z-index:86;letter-spacing:.001em;">PSR Transfer Instructions</div></span><span class="fmt-184" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.439pt;z-index:145;"><span class="fmt-183">*</span> MRS and MSR allow contents of CPSR/SPSR to be transferred </div></span><span class="fmt-184" style="white-space:pre;"><div style="position:absolute;top:176.49pt;left:122.68pt;z-index:208;">appropriate status register to a general purpose register.</div></span><span class="fmt-183" style="white-space:pre;"><div style="position:absolute;top:205.17pt;left:137.32pt;z-index:271;letter-spacing:-.002em;">• All of status register, or just the flags, can be transferred.</div></span><span class="fmt-184" style="white-space:pre;"><div style="position:absolute;top:233.97pt;left:98.4381pt;z-index:279;letter-spacing:-.002em;"><span class="fmt-183">*</span> Syntax:</div></span><span style="white-space:pre;"><div style="position:absolute;top:261.33pt;left:137.32pt;z-index:312;"><span class="fmt-183"></span> MRS{&lt;cond&gt;} Rd,&lt;psr&gt;</div><div style="position:absolute;top:261.33pt;left:487pt;z-index:312;letter-spacing:-.001em;">; Rd = &lt;psr&gt;</div></span><span style="white-space:pre;"><div style="position:absolute;top:290.01pt;left:137.32pt;z-index:345;"><span class="fmt-183"></span> MSR{&lt;cond&gt;} &lt;psr&gt;,Rm</div><div style="position:absolute;top:290.01pt;left:487pt;z-index:345;letter-spacing:-.001em;">; &lt;psr&gt; = Rm</div></span><span style="white-space:pre;"><div style="position:absolute;top:318.69pt;left:137.32pt;z-index:380;"><span class="fmt-183"></span> MSR{&lt;cond&gt;} &lt;psrf&gt;,Rm</div><div style="position:absolute;top:318.69pt;left:487pt;z-index:380;letter-spacing:-.001em;">; &lt;psrf&gt; = Rm</div></span><span class="fmt-184" style="white-space:pre;"><div style="position:absolute;top:348.69pt;left:122.68pt;z-index:385;">where</div></span><span style="white-space:pre;"><div style="position:absolute;top:376.05pt;left:137.32pt;z-index:427;letter-spacing:-.001em;"><span class="fmt-183"></span> &lt;psr&gt; = CPSR, CPSR_all, SPSR or SPSR_all</div></span><span style="white-space:pre;"><div style="position:absolute;top:404.73pt;left:137.32pt;z-index:457;"><span class="fmt-183"></span> &lt;psrf&gt; = CPSR_flg or SPSR_flg</div></span><span class="fmt-184" style="white-space:pre;"><div style="position:absolute;top:434.73pt;left:98.4374pt;z-index:480;letter-spacing:-.001em;"><span class="fmt-183">*</span> Also an immediate form</div></span><span style="white-space:pre;"><div style="position:absolute;top:462.09pt;left:137.32pt;z-index:510;"><span class="fmt-183"></span> MSR{&lt;cond&gt;} &lt;psrf&gt;,#Immediate</div></span><span class="fmt-183" style="white-space:pre;"><div style="position:absolute;top:492.21pt;left:137.32pt;z-index:569;letter-spacing:-.002em;">• This immediate must be a 32-bit immediate, of which the 4 </div></span><span class="fmt-183" style="white-space:pre;"><div style="position:absolute;top:513.69pt;left:156.76pt;z-index:620;">most si
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 67</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-185"><span class="fmt-186" style="white-space:pre;"><div style="position:absolute;top:327.21pt;left:706.36pt;z-index:315;">n</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:231.76pt;z-index:78;letter-spacing:.001em;">Using MRS and MSR</div></span><span class="fmt-186" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.44pt;z-index:137;"><span class="fmt-185">*</span> Currently reserved bits, may be used in future, therefore:</div></span><span style="white-space:pre;"><div style="position:absolute;top:183.69pt;left:138.4pt;z-index:178;letter-spacing:-.003em;">• they must be preserved when altering PSR</div></span><span style="white-space:pre;"><div style="position:absolute;top:212.49pt;left:138.4pt;z-index:248;letter-spacing:-.002em;">• the value they return must not be relied upon when testing other bits.</div></span><span class="fmt-188" style="white-space:pre;"><div style="position:absolute;top:254.78pt;left:134.32pt;z-index:528;letter-spacing:.003em;">31</div><div style="position:absolute;top:254.78pt;left:194.92pt;z-index:528;letter-spacing:.003em;"><span style="position:relative;left:0pt;top:-1pt;">2</span><span style="position:relative;left:0pt;top:-1pt;">8</span></div><div style="position:absolute;top:254.78pt;left:544pt;z-index:528;">8</div><div style="position:absolute;top:253.7pt;left:610.12pt;z-index:528;">4</div><div style="position:absolute;top:253.7pt;left:675.16pt;z-index:528;">0</div></span><span class="fmt-187" style="white-space:pre;"><div style="position:absolute;top:280.91pt;left:131.68pt;z-index:535;letter-spacing:.019em;">N <span>Z</span> <span>C</span> <span>V</span></div><div style="position:absolute;top:280.91pt;left:561.04pt;z-index:535;letter-spacing:.001em;"><span>I</span><span> </span><span> </span><span>F</span><span> </span><span> </span><span>T</span></div><div style="position:absolute;top:280.91pt;left:626.92pt;z-index:535;letter-spacing:.002em;"><span>M</span><span>o</span><span>d</span><span>e</span></div></span><span class="fmt-186" style="white-space:pre;"><div style="position:absolute;top:327.21pt;left:98.441pt;z-index:314;"><span class="fmt-185">*</span> Thus read-modify-write strategy must be followed when modifying a</div></span><span class="fmt-186" style="white-space:pre;"><div style="position:absolute;top:348.69pt;left:122.68pt;z-index:321;letter-spacing:.001em;">PSR:</div></span><span style="white-space:pre;"><div style="position:absolute;top:377.37pt;left:138.4pt;z-index:356;letter-spacing:-.003em;">• Transfer PSR to register using MRS</div></span><span style="white-space:pre;"><div style="position:absolute;top:406.05pt;left:138.4pt;z-index:377;letter-spacing:-.005em;">• Modify relevant bits</div></span><span style="white-space:pre;"><div style="position:absolute;top:434.73pt;left:138.4pt;z-index:422;letter-spacing:-.003em;">• Transfer updated value back to PSR using MSR</div></span><span class="fmt-186" style="white-space:pre;"><div style="position:absolute;top:463.41pt;left:98.4441pt;z-index:428;letter-spacing:-.003em;"><span class="fmt-185">*</span> Note:</div></span><span style="white-space:pre;"><div style="position:absolute;top:492.21pt;left:138.4pt;z-index:491;letter-spacing:-.002em;">• In User Mode, all bits can be read but only the flag bits can </div></span><span style="white-space:pre;"><div style="positio
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 68</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-190"><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:291.88pt;z-index:73;letter-spacing:.001em;">Coprocessors</div></span><span style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.44pt;z-index:119;letter-spacing:-.001em;"><span class="fmt-189">*</span> The ARM architecture supports 16 coprocessors</div></span><span style="white-space:pre;"><div style="position:absolute;top:183.69pt;left:98.4402pt;z-index:190;"><span class="fmt-189">*</span> Each coprocessor instruction set occupies part of the ARM instruction </div></span><span style="white-space:pre;"><div style="position:absolute;top:205.17pt;left:122.68pt;z-index:194;letter-spacing:.001em;">set.</div></span><span style="white-space:pre;"><div style="position:absolute;top:233.97pt;left:98.4409pt;z-index:243;letter-spacing:-.001em;"><span class="fmt-189">*</span> There are three types of coprocessor instruction</div></span><span class="fmt-189" style="white-space:pre;"><div style="position:absolute;top:262.65pt;left:137.32pt;z-index:271;letter-spacing:-.004em;">• Coprocessor data processing</div></span><span class="fmt-189" style="white-space:pre;"><div style="position:absolute;top:291.33pt;left:137.32pt;z-index:316;letter-spacing:-.003em;">• Coprocessor (to/from ARM) register transfers</div></span><img style="position:absolute;left:723.82pt;top:560.22pt;width:5.6pt;height:5.6pt;z-index:60;" src="./target/ce6513985399c0e12fc064993de3a583.png" alt="__rendered_path__60" /><span class="fmt-189" style="white-space:pre;"><div style="position:absolute;top:320.01pt;left:137.32pt;z-index:377;letter-spacing:-.002em;">• Coprocessor memory transfers (load and store to/from memory)</div></span><span style="white-space:pre;"><div style="position:absolute;top:348.69pt;left:98.4419pt;z-index:439;"><span class="fmt-189">*</span> Assembler macros can be used to transform custom coprocessor </div></span><span style="white-space:pre;"><div style="position:absolute;top:370.17pt;left:122.68pt;z-index:506;letter-spacing:.001em;">mneumonics into the generic mneumonics understood by the processor.</div></span><span style="white-space:pre;"><div style="position:absolute;top:398.85pt;left:98.4431pt;z-index:540;letter-spacing:-.001em;"><span class="fmt-189">*</span> A coprocessor may be implemented </div></span><span class="fmt-189" style="white-space:pre;"><div style="position:absolute;top:427.53pt;left:137.32pt;z-index:552;letter-spacing:-.008em;">• in hardware</div></span><img style="position:absolute;left:43.12pt;top:14pt;width:755.8pt;height:567pt;z-index:664;" src="./target/0901647d626b9293db6430463286fe9d.png" alt="__rendered_path__664" /><span class="fmt-189" style="white-space:pre;"><div style="position:absolute;top:456.21pt;left:137.32pt;z-index:606;letter-spacing:-.002em;">• in software (via the undefined instruction exception)</div></span><span class="fmt-189" style="white-space:pre;"><div style="position:absolute;top:485.01pt;left:137.32pt;z-index:663;letter-spacing:-.002em;">• in both (common cases
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 69</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-191"><span style="white-space:pre;"><div style="position:absolute;top:212.49pt;left:724.48pt;z-index:274;">f</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:145.24pt;z-index:88;letter-spacing:.001em;">Coprocessor Data Processing</div></span><span class="fmt-192" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.439pt;z-index:139;letter-spacing:-.001em;"><span class="fmt-191">*</span> This instruction initiates a coprocessor operation</div></span><span class="fmt-192" style="white-space:pre;"><div style="position:absolute;top:183.69pt;left:98.439pt;z-index:201;"><span class="fmt-191">*</span> The operation is performed only on internal coprocessor state</div></span><span style="white-space:pre;"><div style="position:absolute;top:212.49pt;left:138.4pt;z-index:273;letter-spacing:-.002em;">• For example, a Floating point multiply, which multiplies the contents o</div></span><span style="white-space:pre;"><div style="position:absolute;top:233.97pt;left:157.84pt;z-index:330;">two registers and stores the result in a third register</div></span><span class="fmt-192" style="white-space:pre;"><div style="position:absolute;top:262.65pt;left:98.4394pt;z-index:338;letter-spacing:-.002em;"><span class="fmt-191">*</span> Syntax:</div></span><span class="fmt-194" style="white-space:pre;"><div style="position:absolute;top:289.65pt;left:138.4pt;z-index:389;"><span class="fmt-193"></span> CDP{&lt;cond&gt;} &lt;cp_num&gt;,&lt;opc_1&gt;,CRd,CRn,CRm,{&lt;opc_2&gt;}</div></span><span class="fmt-195" style="white-space:pre;"><div style="position:absolute;top:364.86pt;left:119.08pt;z-index:488;">31 28 27 26 25 24 23 20 19 16 15 12 11 8 7 5 4 3 0 </div></span><span class="fmt-197" style="white-space:pre;"><div style="position:absolute;top:383.32pt;left:133.72pt;z-index:635;">Cond 1 1 1 0 opc_1 CRn CRd cp_num opc_2 0 CRm</div></span><img style="position:absolute;left:626.56pt;top:378.68pt;width:19pt;height:27pt;z-index:390;" src="./target/cbd68f3bbe976ab89589c973324e31fc.png" alt="__rendered_path__390" /><span class="fmt-196" style="white-space:pre;"><div style="position:absolute;top:427.62pt;left:435.04pt;z-index:539;letter-spacing:.001em;">Destination Register</div><div style="position:absolute;top:427.62pt;left:587.8pt;z-index:539;letter-spacing:.001em;">Opcode</div></span><img style="position:absolute;left:118pt;top:378.68pt;width:76pt;height:27pt;z-index:490;" src="./target/0cc8ae9e00ec207f13847b6276141d3a.png" alt="__rendered_path__490" /><span class="fmt-196" style="white-space:pre;"><div style="position:absolute;top:446.34pt;left:482.08pt;z-index:532;letter-spacing:.001em;">Source Registers</div></span><img style="position:absolute;left:268.72pt;top:378.68pt;width:76pt;height:27pt;z-index:490;" src="./target/0cc8ae9e00ec207f13847b6276141d3a.png" alt="__rendered_path__490" /><span class="fmt-196" style="white-space:pre;"><div style="position:absolute;top:456.66pt;left:293.92pt;z-index:575;letter-spacing:.001em;">Opcode</div></span><img style="position:absolute;left:419.32pt;top:378.68pt;width:76pt;height:27pt;z-index:490;" src="./target/0cc8ae9e00ec207f13847b6276141d3a.png" alt="__rendered_path__490" /><span class="fmt-196" style="white-space:pre;"><div style="position:absolute;top:471.3pt;left:143.2pt;z-index:564;letter-spacing:.001em;">Co
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 70</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-198"><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:113.2pt;z-index:11;letter-spacing:.001em;"> </div></span><span style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.439pt;z-index:92;">*</div></span><span style="white-space:pre;"><div style="position:absolute;top:262.65pt;left:98.4391pt;z-index:253;">*</div></span><span style="white-space:pre;"><div style="position:absolute;top:362.97pt;left:98.4377pt;z-index:503;">*</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:10;letter-spacing:-.002em;">The ARM</div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><img style="position:absolute;left:626.98pt;top:428.24pt;width:19pt;height:27.3pt;z-index:565;" src="./target/dc4bcff0387dea9b9cf5f8fbb90054a8.png" alt="__rendered_path__565" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:49.3622pt;left:219.64pt;z-index:82;letter-spacing:.001em;">Coprocessor Register </div></span><img style="position:absolute;left:626.02pt;top:427.3pt;width:20.9pt;height:29.2pt;z-index:566;" src="./target/5313b3ec5b75a8db3c035840ac8c2998.png" alt="__rendered_path__566" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:91.242pt;left:334pt;z-index:91;letter-spacing:.001em;">Transfers</div></span><img style="position:absolute;left:118.54pt;top:428.24pt;width:75.5pt;height:27.3pt;z-index:659;" src="./target/74019247673c69e50e3b53a28d92f3f7.png" alt="__rendered_path__659" /><span class="fmt-199" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:122.68pt;z-index:151;">These two instructions move data between ARM registers and </div></span><img style="position:absolute;left:117.58pt;top:427.3pt;width:77.4pt;height:29.2pt;z-index:660;" src="./target/c8a6a766f7d7e530aa1968f880928af2.png" alt="__rendered_path__660" /><span class="fmt-199" style="white-space:pre;"><div style="position:absolute;top:176.49pt;left:122.68pt;z-index:172;letter-spacing:-.001em;">coprocessor registers</div></span><img style="position:absolute;left:269.14pt;top:428.24pt;width:56.8pt;height:27.3pt;z-index:662;" src="./target/c27ef27ed9e8a4f3aaaf116582e582fb.png" alt="__rendered_path__662" /><span style="white-space:pre;"><div style="position:absolute;top:205.17pt;left:137.32pt;z-index:212;letter-spacing:-.003em;">• MRC : Move to Register from Coprocessor</div></span><img style="position:absolute;left:268.18pt;top:427.3pt;width:58.7pt;height:29.2pt;z-index:663;" src="./target/9ff9f70b04ab367eff9f363a15d8ab5b.png" alt="__rendered_path__663" /><span style="white-space:pre;"><div style="position:absolute;top:233.97pt;left:137.32pt;z-index:252;letter-spacing:-.003em;">• MCR : Move to Coprocessor from Register</div></span><img style="position:absolute;left:419.86pt;top:428.24pt;width:75.5pt;height:27.3pt;z-index:659;" src="./target/74019247673c69e50e3b53a28d92f3f7.png" alt="__rendered_path__659" /><span class="fmt-199" style="white-space:pre;"><div style="position:absolute;top:262.65pt;left:122.68pt;z-index:320;">An operation may also be performed on the data as it is transferred</div></span><img style="position:absolute;left:418.9pt;top:427.3pt;width:77.4pt;height:29.2pt;z-index:660;" src="./target/c8a6a766f7d7e530aa1968f880928af2.png" alt="__rendered_path__660" /><span style="white-space:pre;"><div style="position:absolute;top:291.33pt;left:137.32pt;z-index:388;letter-spacing:-.002em;">• For example a Floating Point Convert to Integer instruction can be </div></span><img style="position:absolute;left:723.82pt;top:560.22pt;width:5.6pt;height:
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 71</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-203"><span class="fmt-202" style="white-space:pre;"><div style="position:absolute;top:265.1pt;left:679.36pt;z-index:282;"> </div></span><span class="fmt-202" style="white-space:pre;"><div style="position:absolute;top:265.1pt;left:691.96pt;z-index:284;"> </div></span><span class="fmt-202" style="white-space:pre;"><div style="position:absolute;top:265.1pt;left:704.56pt;z-index:286;">0</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:49.3622pt;left:223pt;z-index:80;letter-spacing:.001em;">Coprocessor Memory </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:91.242pt;left:304.84pt;z-index:93;letter-spacing:.001em;">Transfers (1)</div></span><span class="fmt-206" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.439pt;z-index:135;letter-spacing:-.001em;"><span class="fmt-205">*</span> Load from memory to coprocessor registers</div></span><span class="fmt-206" style="white-space:pre;"><div style="position:absolute;top:183.69pt;left:98.4381pt;z-index:179;letter-spacing:-.001em;"><span class="fmt-205">*</span> Store to memory from coprocessor registers.</div></span><span class="fmt-202" style="white-space:pre;"><div style="position:absolute;top:265.1pt;left:113.32pt;z-index:281;letter-spacing:.002em;">31 28 27 26 25 24 23 22 21 20 19 16 15 12 11 </div><div style="position:absolute;top:265.1pt;left:553.6pt;z-index:281;letter-spacing:.002em;">8 7 </div></span><span class="fmt-204" style="white-space:pre;"><div style="position:absolute;top:282.31pt;left:125.92pt;z-index:522;">Cond 1 1 0 P U N W L Rn CRd cp_num Offset</div></span><img style="position:absolute;left:111.28pt;top:278.2pt;width:76pt;height:28pt;z-index:288;" src="./target/7bbd773eaea31cad5234f5ef0a47ed4e.png" alt="__rendered_path__288" /><span style="white-space:pre;"><div style="position:absolute;top:328.04pt;left:414.52pt;z-index:465;letter-spacing:-.002em;">Source/Dest Register</div><div style="position:absolute;top:328.04pt;left:594.52pt;z-index:465;"><span style="position:relative;left:0pt;top:1pt;">A</span><span style="position:relative;left:0pt;top:1pt;">d</span><span style="position:relative;left:0pt;top:1pt;">d</span><span style="position:relative;left:0pt;top:1pt;">r</span><span style="position:relative;left:0pt;top:1pt;">e</span><span style="position:relative;left:0pt;top:1pt;">s</span><span style="position:relative;left:0pt;top:1pt;">s</span><span style="position:relative;left:0pt;top:1pt;"> </span><span style="position:relative;left:0pt;top:1pt;">O</span><span style="position:relative;left:0pt;top:1pt;">f</span><span style="position:relative;left:0pt;top:1pt;">f</span><span style="position:relative;left:0pt;top:1pt;">s</span><span style="position:relative;left:0pt;top:1pt;">e</span><span style="position:relative;left:0pt;top:1pt;">t</span></div></span><img style="position:absolute;left:412.6pt;top:278.2pt;width:76pt;height:28pt;z-index:288;" src="./target/7bbd773eaea31cad5234f5ef0a47ed4e.png" alt="__rendered_path__288" /><span style="white-space:pre;"><div style="position:absolute;top:345.56pt;left:361.36pt;z-index:346;letter-spacing:-.002em;">Base Register</div></span><img style="position:absolute;left:337.24pt;top:278.2pt;width:76pt;height:28pt;z-index:288;" src="./target/7bbd773eaea31cad5234f5ef0a47ed4e.png" alt="__rendered_path__288" /><span style="white-space:pre;"><div style="position:absolute;top:360.2pt;left:316.48pt;z-index:359;letter-spacing:-.002em;">Load/Store</div></span><img style="position:absolute;left:447.04pt;top:305.56pt;width:7pt;height:10pt;z-index:313;" src="./target/b9958965a237293a885455e1fb4221b1.pn
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 72</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-207"><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:49.3622pt;left:223pt;z-index:80;letter-spacing:.001em;">Coprocessor Memory </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:91.242pt;left:304.84pt;z-index:93;letter-spacing:.001em;">Transfers (2)</div></span><span class="fmt-208" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.439pt;z-index:162;"><span class="fmt-207">*</span> Syntax of these is similar to word transfers between ARM and memory:</div></span><span class="fmt-201" style="white-space:pre;"><div style="position:absolute;top:189.7pt;left:137.32pt;z-index:208;letter-spacing:.008em;"><span class="fmt-209"></span> &lt;LDC|STC&gt;{&lt;cond&gt;}{&lt;L&gt;} &lt;cp_num&gt;,CRd,&lt;address&gt;</div></span><span style="white-space:pre;"><div style="position:absolute;top:220.05pt;left:176.2pt;z-index:272;letter-spacing:-.001em;"> PC relative offset generated if possible, else causes an error.</div></span><span class="fmt-201" style="white-space:pre;"><div style="position:absolute;top:254.62pt;left:137.32pt;z-index:325;letter-spacing:.007em;"><span class="fmt-209"></span> &lt;LDC|STC&gt;{&lt;cond&gt;}{&lt;L&gt;} &lt;cp_num&gt;,CRd,&lt;[Rn,offset]{!}&gt;</div></span><span style="white-space:pre;"><div style="position:absolute;top:284.97pt;left:176.2pt;z-index:388;"> Pre-indexed form, with optional writeback of the base register</div></span><img style="position:absolute;left:723.82pt;top:560.22pt;width:5.6pt;height:5.6pt;z-index:60;" src="./target/ce6513985399c0e12fc064993de3a583.png" alt="__rendered_path__60" /><span class="fmt-201" style="white-space:pre;"><div style="position:absolute;top:319.66pt;left:137.32pt;z-index:438;letter-spacing:.008em;"><span class="fmt-209"></span> &lt;LDC|STC&gt;{&lt;cond&gt;}{&lt;L&gt;} &lt;cp_num&gt;,CRd,&lt;[Rn],offset&gt;</div></span><span style="white-space:pre;"><div style="position:absolute;top:350.01pt;left:176.2pt;z-index:456;letter-spacing:-.001em;"> Post-indexed form</div></span><span class="fmt-208" style="white-space:pre;"><div style="position:absolute;top:378.69pt;left:122.68pt;z-index:461;">where</div></span><span style="white-space:pre;"><div style="position:absolute;top:407.37pt;left:137.32pt;z-index:530;letter-spacing:-.008em;">&lt;L&gt; when present causes a “ long” transfer to be performed (N=1) else </div></span><span style="white-space:pre;"><div style="position:absolute;top:428.85pt;left:156.76pt;z-index:577;letter-spacing:-.01em;">causes a “ short” transfer to be performed (N=0).</div></span><span style="white-space:pre;"><div style="position:absolute;top:457.53pt;left:176.2pt;z-index:618;letter-spacing:-.001em;"> Effect of this is coprocessor dependant.</div></span><img style="position:absolute;left:623.08pt;top:484.04pt;width:108pt;height:96pt;z-index:3;" src="./target/c6053f756b075808893b5298e38e1f84.png" alt="__rendered_path__3" /><img style="position:absolute;left:723.88pt;top:559.76pt;width:6pt;height:6pt;z-index:59;" src="./target/58ef
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 73</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-210"><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><img style="position:absolute;left:584.62pt;top:461.1pt;width:12.2pt;height:26pt;z-index:576;" src="./target/d80e21267e6ba1b9f19fe6041dd89f66.png" alt="__rendered_path__576" /><img style="position:absolute;left:140.14pt;top:459.5pt;width:76pt;height:27pt;z-index:577;" src="./target/ab30029c4c81c6bb04eb07dea32e55ce.png" alt="__rendered_path__577" /><img style="position:absolute;left:617.26pt;top:458.82pt;width:75.4pt;height:26.6pt;z-index:578;" src="./target/7ca95cddde3d0d513fdb4fb0b3f48510.png" alt="__rendered_path__578" /><img style="position:absolute;left:249.22pt;top:457.84pt;width:1.1pt;height:7.6pt;z-index:580;" src="./target/20e877dbe9395a40af5cd4982269f149.png" alt="__rendered_path__580" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:353.44pt;z-index:68;letter-spacing:.001em;">Quiz #6</div></span><img style="position:absolute;left:563.98pt;top:458.9pt;width:34.8pt;height:27pt;z-index:579;" src="./target/de365f9055daea4ab2627a77580fd8b4.png" alt="__rendered_path__579" /><img style="position:absolute;left:266.38pt;top:457.82pt;width:1.1pt;height:8.7pt;z-index:581;" src="./target/bfc0ec4f45fa5d691e048c7e88fbbab4.png" alt="__rendered_path__581" /><span class="fmt-211" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.44pt;z-index:137;"><span class="fmt-210">*</span> Write a short code segment that performs a mode change by modifying </div></span><img style="position:absolute;left:283.78pt;top:457.82pt;width:1.1pt;height:8.7pt;z-index:581;" src="./target/bfc0ec4f45fa5d691e048c7e88fbbab4.png" alt="__rendered_path__581" /><span class="fmt-211" style="white-space:pre;"><div style="position:absolute;top:176.49pt;left:122.68pt;z-index:161;letter-spacing:.001em;">the contents of the CPSR</div></span><img style="position:absolute;left:301.18pt;top:457.82pt;width:1.1pt;height:8.7pt;z-index:581;" src="./target/bfc0ec4f45fa5d691e048c7e88fbbab4.png" alt="__rendered_path__581" /><span style="white-space:pre;"><div style="position:absolute;top:205.17pt;left:137.32pt;z-index:231;letter-spacing:-.002em;">• The mode you should change to is user mode which has the value 0x10. </div></span><img style="position:absolute;left:318.46pt;top:457.82pt;width:1.1pt;height:8.7pt;z-index:581;" src="./target/bfc0ec4f45fa5d691e048c7e88fbbab4.png" alt="__rendered_path__581" /><span style="white-space:pre;"><div style="position:absolute;top:233.97pt;left:137.32pt;z-index:296;letter-spacing:-.002em;">• This assumes that the current mode is a priveleged mode such as </div></span><img style="position:absolute;left:335.98pt;top:457.82pt;width:1.1pt;height:8.7pt;z-index:581;" src="./target/bfc0ec4f45fa5d691e048c7e88fbbab4.png" alt="__rendered_path__581" /><span style="white-space:pre;"><div style="position:absolute;top:255.45pt;left:156.76pt;z-index:313;">supervisor mode. </div></span><img style="position:absolute;left:353.26pt;top:457.82pt;width:1.1pt;height:8.7pt;z-index:581;" src="./target/bfc0ec4f45fa5d691e048c7e88fbbab4.png" alt="__rendered_path__581" /><span style="white-space:pr
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 74</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-194"><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="./target/d00413d101e052af80bcbf4a2db40b96.png" alt="__rendered_path__2" /><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:70.3622pt;left:184.36pt;z-index:85;letter-spacing:.001em;">Quiz #6 - Sample Solution</div></span><span class="fmt-215" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.439pt;z-index:110;"><span class="fmt-214">*</span> Set up useful constants:</div></span><span style="white-space:pre;"><div style="position:absolute;top:211.91pt;left:98.4391pt;z-index:147;letter-spacing:-.009em;">mmask EQU 0x1f</div><div style="position:absolute;top:211.91pt;left:409.24pt;z-index:147;letter-spacing:-.002em;">; mask to clear mode bits</div></span><span style="white-space:pre;"><div style="position:absolute;top:239.15pt;left:98.439pt;z-index:176;letter-spacing:-.009em;">userm EQU 0x10</div><div style="position:absolute;top:239.15pt;left:409.24pt;z-index:176;letter-spacing:-.002em;">; user mode value</div></span><span class="fmt-215" style="white-space:pre;"><div style="position:absolute;top:297.21pt;left:98.4398pt;z-index:211;letter-spacing:-.001em;"><span class="fmt-214">*</span> Start off here in supervisor mode.</div></span><img style="position:absolute;left:723.82pt;top:560.22pt;width:5.6pt;height:5.6pt;z-index:60;" src="./target/ce6513985399c0e12fc064993de3a583.png" alt="__rendered_path__60" /><span style="white-space:pre;"><div style="position:absolute;top:325.31pt;left:176.2pt;z-index:250;letter-spacing:-.002em;">MRS r0, cpsr</div><div style="position:absolute;top:325.31pt;left:409.24pt;z-index:250;letter-spacing:-.002em;">; take a copy of the CPSR</div></span><span style="white-space:pre;"><div style="position:absolute;top:352.55pt;left:176.2pt;z-index:289;letter-spacing:-.006em;">BIC r0,r0,#mmask ; clear the mode bits</div></span><span style="white-space:pre;"><div style="position:absolute;top:379.79pt;left:176.2pt;z-index:325;letter-spacing:-.007em;">ORR r0,r0,#userm ; select new mode</div></span><span style="white-space:pre;"><div style="position:absolute;top:407.03pt;left:176.2pt;z-index:364;letter-spacing:-.002em;">MSR cpsr, r0</div><div style="position:absolute;top:407.03pt;left:409.24pt;z-index:364;letter-spacing:-.002em;">; write back the modified</div></span><span style="white-space:pre;"><div style="position:absolute;top:427.55pt;left:409.24pt;z-index:370;letter-spacing:-.001em;">; CPSR</div></span><span class="fmt-215" style="white-space:pre;"><div style="position:absolute;top:455.37pt;left:98.4417pt;z-index:396;letter-spacing:-.001em;"><span class="fmt-214">*</span> End up here in user mode.</div></span><img style="position:absolute;left:623.08pt;top:484.04pt;width:108pt;height:96pt;z-index:3;" src="./target/c6053f756b075808893b5298e38e1f84.png" alt="__rendered_path__3" /><img style="position:absolute;left:723.88pt;top:559.76pt;width:6pt;height:6pt;z-index:59;" src="./target/58efb4d00cfdb6014dbb515b1afcaef7.png" alt="__rendered_path__59" /><img style="position:absolute;left:641.92pt;top:505.04pt;width:72.5992pt;height:68.28pt;z-index:61;" src="./target/7411ebe8c009fe014a242380fa9c7f7d.png" alt="Image_766_
</div>
<div style="width:100%">
<hr />
<table style="border:0;width:100%;">
<tbody>
<tr>
<td bgcolor="eeeeee" align="right">
<font face="arial,sans-serif">
<b>Page 75</b>
</font>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:relative;width:842pt;height:595pt;">
<div style="position:absolute;left:0pt;top:0pt;width:100%;height:100%;clip:rect(0pt,842pt,595pt,0pt);" class="fmt-216"><span style="white-space:pre;"><div style="position:absolute;top:355.89pt;left:669.4pt;z-index:449;">g</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:74.0797pt;z-index:6;">e</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:84.7597pt;z-index:8;">A</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:58.7197pt;z-index:5;">Th</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:81.0397pt;z-index:7;letter-spacing:.001em;"> </div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:49.3622pt;left:238.96pt;z-index:81;letter-spacing:.001em;">Main features of the</div></span><span class="fmt-1" style="white-space:pre;"><div style="position:absolute;top:91.242pt;left:237.04pt;z-index:100;letter-spacing:.001em;">ARM Instruction Set</div></span><span class="fmt-217" style="white-space:pre;"><div style="position:absolute;top:155.01pt;left:98.4401pt;z-index:135;letter-spacing:-.001em;"><span class="fmt-216">*</span> All instructions are 32 bits long.</div></span><span class="fmt-217" style="white-space:pre;"><div style="position:absolute;top:183.69pt;left:98.4401pt;z-index:180;letter-spacing:-.001em;"><span class="fmt-216">*</span> Most instructions execute in a single cycle.</div></span><span class="fmt-217" style="white-space:pre;"><div style="position:absolute;top:212.49pt;left:98.44pt;z-index:229;"><span class="fmt-216">*</span> Every instruction can be conditionally executed.</div></span><span class="fmt-217" style="white-space:pre;"><div style="position:absolute;top:241.17pt;left:98.4411pt;z-index:256;letter-spacing:-.001em;"><span class="fmt-216">*</span> A load/store architecture </div></span><span style="white-space:pre;"><div style="position:absolute;top:269.85pt;left:137.32pt;z-index:307;letter-spacing:-.003em;">• Data processing instructions act only on registers</div></span><span style="white-space:pre;"><div style="position:absolute;top:298.53pt;left:176.2pt;z-index:328;letter-spacing:-.001em;"> Three operand format</div></span><span style="white-space:pre;"><div style="position:absolute;top:327.21pt;left:176.2pt;z-index:385;letter-spacing:-.001em;"> Combined ALU and shifter for high speed bit manipulation</div></span><span style="white-space:pre;"><div style="position:absolute;top:355.89pt;left:137.32pt;z-index:448;letter-spacing:-.002em;">• Specific memory access instructions with powerful auto-indexin</div></span><span style="white-space:pre;"><div style="position:absolute;top:377.37pt;left:156.76pt;z-index:467;">addressing modes.</div></span><span style="white-space:pre;"><div style="position:absolute;top:406.05pt;left:176.2pt;z-index:495;letter-spacing:-.001em;"> 32 bit and 8 bit data types</div></span><span style="white-space:pre;"><div style="position:absolute;top:434.73pt;left:229.6pt;z-index:545;">and also 16 bit data types on ARM Architecture v4.</div></span><span style="white-space:pre;"><div style="position:absolute;top:463.41pt;left:176.2pt;z-index:600;letter-spacing:-.001em;"> Flexible multiple register load and store instructions</div></span><span class="fmt-217" style="white-space:pre;"><div style="position:absolute;top:492.21pt;left:98.4443pt;z-index:643;letter-spacing:-.001em;"><span class="fmt-216">*</span> Instruction set extension via coprocessors</div></span><span class="fmt-0" style="white-space:pre;"><div style="position:absolute;top:552.8pt;left:93.5197pt;z-index:56;">RM Instruction Set - ARM University Program - V1.0</div></span><img style="position:absolute;left:56.56pt;top:537.84pt;width:719pt;height:2.3pt;z-index:1;" src="./target/d357b72a53ec0c37cd3be24596b5a36e.png" alt="__rendered_path__1" /><img style="position:absolute;left:56.56pt;top:536.12pt;width:719pt;height:.9pt;z-index:2;" src="
</div>
</div>
</body>
</html>