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

📄 compatib.htm

📁 Free 8051 asm compiler for linux new host platforms: Win32 and Linux macro processing dramatica
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- Compatibility with the Intel Assembler --><HTML><HEAD><TITLE>Compatibility with the Intel Assembler</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>IV. Compatibility with the Intel Assembler</U></STRONG></P><P>With their cross assembler ASM51, Intel has defined and implemented asuitable assembly language for the <NOBR>MCS-51</NOBR> family, which hasalways been the only real standard in the 8051 world.<BR>Unfortunately, Intel has announced the &quot;end of life&quot; of ASM51(final <NOBR>version 2.3</NOBR>) and all the other Intel <NOBR>MCS-51</NOBR>development tools to the end of 1993.<BR>The <NOBR>ASEM-51</NOBR> assembly language is a subset of the Intel standardthat guarantees maximum compatibility with existing 8051 assembler sources.It implements all 8051 instruction mnemonics as well as a rich and usefulsubset of the Intel pseudo instructions and assembler controls.</P><HR><P><STRONG><U><A NAME="RESTRICTIONS">IV.1 Restrictions</A></U></STRONG></P><P>Since <NOBR>ASEM-51</NOBR> generates an <NOBR>Intel-HEX</NOBR> file (or absolute<NOBR>OMF-51</NOBR>) output instead of relocatable object modules, thewhole source code of an 8051 application program has to reside in onesingle file. Consequently all pseudo instructions that deal with relocatablesegments or external or public symbols, have not been implemented:</P><P><BLOCKQUOTE><STRONG><PRE>PUBLICEXTRNSEGMENTRSEG</PRE></STRONG></BLOCKQUOTE></P><P>Intel-style macros are not supported! (Thus the '%' character can be used incomments.)<BR>Up to now only the following assembler controls and their abbreviations havebeen implemented:</P><P><TABLE BORDER CELLPADDING=8><TR><TH>&nbsp;</TH>    <TH><TABLE WIDTH="100%"><TR><TH ALIGN=LEFT NOWRAP>primary controls</TH><TH ALIGN=RIGHT NOWRAP>abbrev.&nbsp;</TH></TR></TABLE></TH>    <TH><TABLE WIDTH="100%"><TR><TH ALIGN=LEFT NOWRAP>general controls</TH><TH ALIGN=RIGHT NOWRAP>abbrev.</TH></TR></TABLE></TH></TR><TR><TD ALIGN=CENTER><STRONG>Intel-<BR><BR>controls</STRONG></TD>    <TD VALIGN=TOP>        <TABLE WIDTH="100%">        <TR><TD NOWRAP>$DATE (&lt;string&gt;)</TD><TD ROWSPAN=13>&nbsp;&nbsp;&nbsp;</TD><TD>$DA  </TD></TR>        <TR><TD>$DEBUG                       </TD><TD>$DB  </TD></TR>        <TR><TD>$NODEBUG                     </TD><TD>$NODB</TD></TR>        <TR><TD NOWRAP>$MACRO (&lt;percent&gt;)</TD><TD>$MR  </TD></TR>        <TR><TD>$NOMACRO                     </TD><TD>$NOMR</TD></TR>        <TR><TD>$MOD51                       </TD><TD>$MO  </TD></TR>        <TR><TD>$NOMOD51                     </TD><TD>$NOMO</TD></TR>        <TR><TD>$PAGING                      </TD><TD>$PI  </TD></TR>        <TR><TD>$NOPAGING                    </TD><TD>$NOPI</TD></TR>        <TR><TD>$SYMBOLS                     </TD><TD>$SB  </TD></TR>        <TR><TD>$NOSYMBOLS                   </TD><TD>$NOSB</TD></TR>        <TR><TD NOWRAP>$PAGELENGTH (&lt;lines&gt;) </TD><TD>$PL  </TD></TR>        <TR><TD NOWRAP>$PAGEWIDTH (&lt;columns&gt;)</TD><TD>$PW  </TD></TR>        </TABLE>    </TD>    <TD VALIGN=TOP>        <TABLE WIDTH="100%">        <TR><TD>$EJECT                 </TD><TD ROWSPAN=10>&nbsp;&nbsp;&nbsp;</TD><TD>$EJ  </TD></TR>        <TR><TD>$GEN                   </TD><TD>$GE  </TD></TR>        <TR><TD>$NOGEN                 </TD><TD>$NOGE</TD></TR>        <TR><TD>$GENONLY               </TD><TD>$GO  </TD></TR>        <TR><TD NOWRAP>$INCLUDE (&lt;file&gt;)</TD><TD>$IC  </TD></TR>        <TR><TD>$LIST                  </TD><TD>$LI  </TD></TR>        <TR><TD>$NOLIST                </TD><TD>$NOLI</TD></TR>        <TR><TD>$SAVE                  </TD><TD>$SA  </TD></TR>        <TR><TD>$RESTORE               </TD><TD>$RS  </TD></TR>        <TR><TD NOWRAP>$TITLE (&lt;string&gt;)</TD><TD>$TT  </TD></TR>        </TABLE>    </TD></TR><TR><TD ALIGN=CENTER><STRONG><NOBR>ASEM-51</NOBR><BR><BR>controls</STRONG></TD>    <TD VALIGN=TOP>        <TABLE WIDTH="100%">        <TR><TD>$NOBUILTIN</TD><TD ROWSPAN=3>&nbsp;&nbsp;&nbsp;</TD><TD>-----</TD></TR>        <TR><TD>$NOTABS   </TD><TD>-----</TD></TR>        <TR><TD>$PHILIPS  </TD><TD>-----</TD></TR>        </TABLE>    </TD>    <TD VALIGN=TOP>        <TABLE WIDTH="100%">        <TR><TD>$COND</TD><TD ROWSPAN=5>&nbsp;&nbsp;&nbsp;</TD><TD>-----</TD></TR>        <TR><TD>$NOCOND</TD><TD>-----</TD></TR>        <TR><TD>$CONDONLY</TD><TD>-----</TD></TR>        <TR><TD NOWRAP>$ERROR (&lt;string&gt;)</TD><TD>-----</TD></TR>        <TR><TD NOWRAP>$WARNING (&lt;string&gt;)</TD><TD>-----</TD></TR>        </TABLE>    </TD></TR></TABLE></P><BR><HR><P><STRONG><U><A NAME="EXTENSIONS">IV.2 Extensions</A></U></STRONG></P><P>Assembler controls need not start in column 1, but may be preceded by anynumber of blanks and tabs. Primary controls may also be preceded by commentlines and $INCLUDE statements, provided the corresponding include files areonly containing other control statements and commentary.<BR>The source file may contain blank and comment lines behind the END statement.Character strings may also be enclosed in double quotes.<BR>The DATA symbol for the special function register PCON is predefined.<BR>The bit operator '.' is legal in all expressions, not only in those thathave to match the segment type BIT.</P><P><NOBR>ASEM-51</NOBR> introduces a set of meta instructions, which overlay theIntel <NOBR>MCS-51</NOBR> assembly language, but are not part of it!<BR>The meta instructions IFxx, ELSEIFxx, ELSE, and ENDIF allow<A HREF="condit.htm">conditional assembly</A>, while the meta instructionsMACRO, REPT, ENDM, EXITM, and LOCAL (and some control characters) form a powerful<A HREF="macros.htm">macro processing</A> language.For detailed information on meta instructions see chapters<NOBR>&quot;<A HREF="condit.htm">III.10 Conditional Assembly</A>&quot;</NOBR> and<NOBR>&quot;<A HREF="macros.htm">III.11 Macro Processing</A>&quot;</NOBR>.</P><BR><HR><P><STRONG><U><A NAME="DIFFERENCES">IV.3 Further Differences</A></U></STRONG></P><P>To make semantics unique, especially the precedence of unary operators in<A HREF="express.htm">expressions</A> is slightly different. Furthermore,expressions with a bit operation &quot;.&quot; evaluate to a BIT type result,not to NUMBER. The <A HREF="segment.htm">segment type</A> of symbols that aredefined with EQU or SET evaluates always to NUMBER. Otherwise it might bedifficult in some cases, to force the definition of typeless symbols.This is described in detail in chapters<NOBR>&quot;<A HREF="express.htm">III.4 Expressions</A>&quot;</NOBR> and<NOBR>&quot;<A HREF="segment.htm">III.7 Segment Type</A>&quot;</NOBR>.<BR>Except in DB instructions, the zero length string constant '' is illegal.The $NOMOD51 control disables also the predefined CODE addresses.The special assembler symbols AR0...AR7 are predefined for bank 0 beforethe first USING statement occurs.</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="contents.htm"><IMG SRC="up.gif" ALT="[up]" BORDER=0 WIDTH=32 HEIGHT=32></A></TH>    <TH><A HREF="macrolst.htm"><IMG SRC="back.gif" ALT="[back]" BORDER=0 WIDTH=32 HEIGHT=32></A></TH>    <TH><A HREF="listfile.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 + -