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

📄 repeat.htm

📁 一份51的编译程序,dos版本的. 英文名字MCS-51 Microcontroller Family Macro Assembler
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<!-- Repeat Macros -->

<HTML>

<HEAD>

<TITLE>Repeat Macros</TITLE>

</HEAD>

<BODY BACKGROUND="spiral.gif" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#990099" ALINK="#FF0000">

<TABLE WIDTH="98%">
<TR><TD WIDTH=60 VALIGN=BOTTOM NOWRAP>
<IMG SRC="transp.gif" ALT="" WIDTH=60 HEIGHT=20>
</TD><TD>

<!-- Ab hier Seitentext: -->

<BIG>
<BR>

<P>
<STRONG><U>III.11.3 Repeat Macros</U></STRONG>
</P>

<P>
Repeat macros don't have a macro name, and therefore cannot be called
multiple times. They are always expanded immediately after their definition.
During expansion, their macro body is repeated n times (0 &lt;= n &lt;= 65535).
Repeat macros start with the keyword REPT, followed by an expression, which
must be known on <NOBR>pass 1</NOBR>. In analogy to callable macros, there is a macro
body, which must be terminated with an ENDM instruction:
</P>

<P>
<BLOCKQUOTE>
<STRONG><PRE>
REPT &lt;expression&gt;
&lt;body line 1&gt;
&lt;body line 2&gt;
    .
    .
&lt;body line m&gt;
ENDM
</PRE></STRONG>
</BLOCKQUOTE>
</P>

<P>
The expression value specifies how many times the macro body is to be
repeated. Since repeat macros start with the keyword REPT, they are
sometimes also called &quot;REPT blocks&quot;.
</P>

<P>
<BR>
<STRONG>Example:</STRONG>
<BLOCKQUOTE>
<PRE>
        REPT 5
        NOP
        ENDM
</PRE>
This REPT block will expand to five NOP instructions
immediately after its definition:
<PRE>
        NOP
        NOP
        NOP
        NOP
        NOP
</PRE>
</BLOCKQUOTE>
</P>

</BIG>

<!-- Seitentext Ende -->

<P>
<BR>
<BR>
<CENTER>
<TABLE WIDTH="70%">
<TR><TH><A HREF="contents.htm"><IMG SRC="home.gif" ALT="[contents]" BORDER=0 WIDTH=32 HEIGHT=32></A></TH>
    <TH><A HREF="macros.htm"><IMG SRC="up.gif" ALT="[up]" BORDER=0 WIDTH=32 HEIGHT=32></A></TH>
    <TH><A HREF="params.htm"><IMG SRC="back.gif" ALT="[back]" BORDER=0 WIDTH=32 HEIGHT=32></A></TH>
    <TH><A HREF="local.htm"><IMG SRC="next.gif" ALT="[next]" BORDER=0 WIDTH=32 HEIGHT=32></A></TH>
</TR>
</TABLE>
</CENTER>
</P>

</TD></TR>
</TABLE>

</BODY>

</HTML>

⌨️ 快捷键说明

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