blob: 700f566a5d3f4bd0acb8baa0fb92a3f8155e50f7 [file] [log] [blame]
<html lang="en">
<head>
<title>Altmacro - Using as</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using as">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Pseudo-Ops.html#Pseudo-Ops" title="Pseudo Ops">
<link rel="prev" href="Align.html#Align" title="Align">
<link rel="next" href="Ascii.html#Ascii" title="Ascii">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This file documents the GNU Assembler "as".
Copyright (C) 1991-2019 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
section entitled ``GNU Free Documentation License''.
-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<a name="Altmacro"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Ascii.html#Ascii">Ascii</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Align.html#Align">Align</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Pseudo-Ops.html#Pseudo-Ops">Pseudo Ops</a>
<hr>
</div>
<h3 class="section">7.4 <code>.altmacro</code></h3>
<p>Enable alternate macro mode, enabling:
<dl>
<dt><code>LOCAL </code><var>name</var><code> [ , ... ]</code><a name="index-LOCAL-_0040var_007bname_007d-_005b-_002c-_0040dots_007b_007d-_005d-279"></a><dd>One additional directive, <code>LOCAL</code>, is available. It is used to
generate a string replacement for each of the <var>name</var> arguments, and
replace any instances of <var>name</var> in each macro expansion. The
replacement string is unique in the assembly, and different for each
separate macro expansion. <code>LOCAL</code> allows you to write macros that
define symbols, without fear of conflict between separate macro expansions.
<br><dt><code>String delimiters</code><a name="index-String-delimiters-280"></a><dd>You can write strings delimited in these other ways besides
<code>"</code><var>string</var><code>"</code>:
<dl>
<dt><code>'</code><var>string</var><code>'</code><dd>You can delimit strings with single-quote characters.
<br><dt><code>&lt;</code><var>string</var><code>&gt;</code><dd>You can delimit strings with matching angle brackets.
</dl>
<br><dt><code>single-character string escape</code><a name="index-single_002dcharacter-string-escape-281"></a><dd>To include any single character literally in a string (even if the
character would otherwise have some special meaning), you can prefix the
character with &lsquo;<samp><span class="samp">!</span></samp>&rsquo; (an exclamation mark). For example, you can
write &lsquo;<samp><span class="samp">&lt;4.3 !&gt; 5.4!!&gt;</span></samp>&rsquo; to get the literal text &lsquo;<samp><span class="samp">4.3 &gt; 5.4!</span></samp>&rsquo;.
<br><dt><code>Expression results as strings</code><a name="index-Expression-results-as-strings-282"></a><dd>You can write &lsquo;<samp><span class="samp">%</span><var>expr</var></samp>&rsquo; to evaluate the expression <var>expr</var>
and use the result as a string.
</dl>
</body></html>