📄 apcsobj.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> <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 <value> MACRO EQUB $var DCB $var MEND</pre><p><h2>EQUW</h2><pre> ; EQUW <value> MACRO EQUW $var DCW $var MEND</pre><p><h2>EQUD</h2><pre> ; EQUD <value> MACRO EQUD $var DCD $var MEND</pre><p><h2>EQUD</h2><pre> ; EQUS "<value>" ; For 'EQUS "something", 13, 0' ; you will need use DCB directly. MACRO EQUS $var DCB "$var" MEND</pre><p> <p>You might like to try something such as:<pre> ; EQUSZ "<value>" MACRO EQUSZ $var DCB "$var", 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> STMFD R13!, {R0-R3, R14}<br> ...<br> LDMFD R13!, {R0-R3, PC}</code><br>you could write:<br><code> STMFD R13!, stm_temp<br> ...<br> 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 © 2001 Richard Murray</address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -