嵌入式


GNU arm assembler

<h2>GNU arm assembler</h2> <p><a href="https://sourceware.org/binutils/docs/as/index.html#SEC_Contents">https://sourceware.org/binutils/docs/as/index.html#SEC_Contents</a></p> <p><a href="https://azeria-labs.com/writing-arm-assembly-part-1/">https://azeria-labs.com/writing-arm-assembly-part-1/</a></p> <p><a href="https://efxa.org/2011/03/02/assembly-gnulinux/">https://efxa.org/2011/03/02/assembly-gnulinux/</a></p> <p><img src="https://www.showdoc.cc/server/api/common/visitfile/sign/2748407d0444d24c9159bd4fe603fc6b?showdoc=.jpg" alt="" /> <img src="https://www.showdoc.cc/server/api/common/visitfile/sign/0455131fd08d787979d6e6fa4636dd3e?showdoc=.jpg" alt="" /></p> <h2>ARM特有汇编</h2> <ul> <li><code>.syntax unified</code>使用modern arm thumb指令</li> <li><code>.thumb_func</code>下个symbol指向arm thumb code,将下个symbol值的最低位值设置为1并队所有函数label都有效</li> <li><code>.pool</code>允许assembler将<code>literal pool</code>防止在<code>.pool</code>处,<code>literal pool</code>包含不能使用<code>mov,movw</code>的大数,如下面123456789将放置在<code>bx lr</code>后面</li> </ul> <pre><code>myFunction: ldr r0,=123456789 ... ... bx lr .pool</code></pre> <pre><code>.byte value{,value} # 等价于.hword,.short .2byte value{,value} # 等价于.word,.int .4byte value{,value} # 等价于.dword,.long .8byte value{,value}</code></pre>

页面列表

ITEM_HTML