<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:wfw="http://wellformedweb.org/CommentAPI/">
<channel>
<title>JRNitre&#039;s Blog - 汇编</title>
<link>https://blog.atoery.cn/index.php/tag/compilation/</link>
<atom:link href="https://blog.atoery.cn/index.php/feed/tag/compilation/" rel="self" type="application/rss+xml" />
<language>zh-CN</language>
<description></description>
<lastBuildDate>Wed, 16 Apr 2025 20:32:00 +0800</lastBuildDate>
<pubDate>Wed, 16 Apr 2025 20:32:00 +0800</pubDate>
<item>
<title>[ARM 架构] 浅入 - 简单汇编指令</title>
<link>https://blog.atoery.cn/index.php/2025/04/16/91.html</link>
<guid>https://blog.atoery.cn/index.php/2025/04/16/91.html</guid>
<pubDate>Wed, 16 Apr 2025 20:32:00 +0800</pubDate>
<dc:creator>JRNitre</dc:creator>
<description><![CDATA[ARM 架构是一种精简指令集计算机，其一些基本的汇编指令如下：读内存 LOADLDR R0, [R1, #4 ;    读地址 “R1 + 4&quot;，将从 R1 读取的 4 个字节存入 R...]]></description>
<content:encoded xml:lang="zh-CN"><![CDATA[
<p>ARM 架构是一种精简指令集计算机，其一些基本的汇编指令如下：</p><ul><li>读内存 <code>LOAD</code></li></ul><pre><code>LDR R0, [R1, #4 ;    读地址 “R1 + 4&quot;，将从 R1 读取的 4 个字节存入 R0</code></pre><ul><li>写内存 <code>STORE</code></li></ul><pre><code>STR R0, [R1, #4] ;    将 R0 的数据 4 个字节写入地址 R1</code></pre><ul><li>加减 <code>ADD&amp;SUB</code></li></ul><pre><code>ADD R0, R1, R2 ;    R0 = R1 + R2
ADD R0, R1, #1 ;    R0 = R1 + 1
SUB R0, R1, R2 ;    R0 = R1 - R2
SUB R0, R1, #1 ;    R0 = R1 - 1</code></pre><ul><li>比较 <code>CMP</code></li></ul><pre><code>CMP R0, R1 ;    比较 R0 与 R1 的值，将结果保存到 PSR[程序状态寄存去] 中</code></pre><ul><li>跳转 <code>B&amp;BL</code></li></ul><pre><code>B main ;    直接跳转
BL main ;    先把返回地址保存到 LR 寄存器后再跳转</code></pre><blockquote>未来我深入学习 ARM 架构或者汇编等后，这部分可能会继续更新~</blockquote>
]]></content:encoded>
<slash:comments>0</slash:comments>
<comments>https://blog.atoery.cn/index.php/2025/04/16/91.html#comments</comments>
<wfw:commentRss>https://blog.atoery.cn/index.php/feed/tag/compilation/</wfw:commentRss>
</item>
</channel>
</rss>