⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 apcsobj.html

📁 关于ARM汇编的非常好的教程
💻 HTML
字号:
<!doctype html public "-//W3C//DTD HTML 3.2//EN"><html><head><title>Useful objasm macros</title><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><meta http-equiv="content-language" content="en" /><meta name="resource-type" content="document"><meta name="copyright" content="This document copyright 2001 by Richard Murray. Use for non-profit and education purposes explicitly granted."><meta name="author" content="Richard Murray"><meta name="rating" content="general"></head><!--  /assembler/apcsobj.html            --><!--                                     --><!--  (C) Copyright 2001 Richard Murray  --><!--  Designed by Richard Murray         --><!--  rmurray@heyrick.co.uk              --><!--                                     --><body bgcolor="#f0f0f0" text="#000000" link="#0022dd" vlink="#002288"><table border = "0" width="100%">  <tr>    <td align=center width=100>      <img src="arm3.gif" width=79 height=78 align = middle>    </td>    <td>      <h1 align="center"><font color="#800080">Useful objasm macros</font></h1>    </td>    <td align=center width=100>      <img src="arm3.gif" width=79 height=78 align = middle>    </td></table><p>&nbsp;<p>I don't like the DCx version of allocating storage, I'm used to the EQUx method provided by theBASIC assembler...<h2>EQUB</h2><pre>          ; EQUB &lt;value&gt;          MACRO          EQUB    $var          DCB     $var          MEND</pre><p><h2>EQUW</h2><pre>          ; EQUW &lt;value&gt;          MACRO          EQUW    $var          DCW     $var          MEND</pre><p><h2>EQUD</h2><pre>          ; EQUD &lt;value&gt;          MACRO          EQUD    $var          DCD     $var          MEND</pre><p><h2>EQUD</h2><pre>          ; EQUS &quot;&lt;value&gt;&quot;          ; For 'EQUS &quot;something&quot;, 13, 0'          ; you will need use DCB directly.          MACRO          EQUS    $var          DCB     &quot;$var&quot;          MEND</pre><p>&nbsp;<p>You might like to try something such as:<pre>          ; EQUSZ &quot;&lt;value&gt;&quot;          MACRO          EQUSZ   $var          DCB     &quot;$var&quot;, 0          MEND</pre>though I've not tested this one.<p><h2>RLIST</h2>You can use RLIST to define ranges of registers:<pre>stm_temp  RLIST {R0-R3,R14}ldm_temp  RLIST {R0-R3,PC}str_temp  RLIST {R0-R3}</pre>Then, in your code, instead of:<br><code>&nbsp; STMFD R13!, {R0-R3, R14}<br>&nbsp; ...<br>&nbsp; LDMFD R13!, {R0-R3, PC}</code><br>you could write:<br><code>&nbsp; STMFD R13!, stm_temp<br>&nbsp; ...<br>&nbsp; LDMFD R13!, ldm_temp</code><p>The 'str_temp' version is for when you want to store/load without messing with R14/PC. The sameis used for both loading and storing.<p><hr size = "3"><a href="index.html#08">Return to assembler index</a><hr size = "3"><address>Copyright &copy; 2001 Richard Murray</address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -