> | IV. Compatibility with the Intel Assembler With their cross assembler ASM51, Intel has defined and implemented a suitable assembly language for the MCS-51 family, which has always been the only real standard in the 8051 world. Unfortunately, Intel has announced the "end of life" of ASM51 (final version 2.3) and all the other Intel MCS-51 development tools to the end of 1993. The ASEM-51 assembly language is a subset of the Intel standard that guarantees maximum compatibility with existing 8051 assembler sources. It implements all 8051 instruction mnemonics as well as a rich and useful subset of the Intel pseudo instructions and assembler controls. IV.1 Restrictions Since ASEM-51 generates an Intel-HEX file (or absolute OMF-51) output instead of relocatable object modules, the whole source code of an 8051 application program has to reside in one single file. Consequently all pseudo instructions that deal with relocatable segments or external or public symbols, have not been implemented:
>     PUBLIC
>     EXTRN
>     SEGMENT
>     RSEG
Intel-style macros are not supported! (Thus the '%' character can be used in comments.) Up to now only the following assembler controls and their abbreviations have been implemented:
primary controls | abbrev.
--- | ---
general controls | abbrev.
--- | ---
Intel- controls |
$DATE (<string>) |  | $DA
$DEBUG | $DB
$NODEBUG | $NODB
$MACRO (<percent>) | $MR
$NOMACRO | $NOMR
$MOD51 | $MO
$NOMOD51 | $NOMO
$PAGING | $PI
$NOPAGING | $NOPI
$SYMBOLS | $SB
$NOSYMBOLS | $NOSB
$PAGELENGTH (<lines>) | $PL
$PAGEWIDTH (<columns>) | $PW
$EJECT |  | $EJ
$GEN | $GE
$NOGEN | $NOGE
$GENONLY | $GO
$INCLUDE (<file>) | $IC
$LIST | $LI
$NOLIST | $NOLI
$SAVE | $SA
$RESTORE | $RS
$TITLE (<string>) | $TT
ASEM-51 controls |
$NOBUILTIN |  | -----
$NOTABS | -----
$PHILIPS | -----
$COND |  | -----
$NOCOND | -----
$CONDONLY | -----
$ERROR (<string>) | -----
$WARNING (<string>) | -----
IV.2 Extensions Assembler controls need not start in column 1, but may be preceded by any number of blanks and tabs. Primary controls may also be preceded by comment lines and $INCLUDE statements, provided the corresponding include files are only containing other control statements and commentary. The source file may contain blank and comment lines behind the END statement. Character strings may also be enclosed in double quotes. The DATA symbol for the special function register PCON is predefined. The bit operator '.' is legal in all expressions, not only in those that have to match the segment type BIT. ASEM-51 introduces a set of meta instructions, which overlay the Intel MCS-51 assembly language, but are not part of it! The meta instructions IFxx, ELSEIFxx, ELSE, and ENDIF allow conditional assembly, while the meta instructions MACRO, REPT, ENDM, EXITM, and LOCAL (and some control characters) form a powerful macro processing language. For detailed information on meta instructions see chapters "III.10 Conditional Assembly" and "III.11 Macro Processing". IV.3 Further Differences To make semantics unique, especially the precedence of unary operators in expressions is slightly different. Furthermore, expressions with a bit operation "." evaluate to a BIT type result, not to NUMBER. The segment type of symbols that are defined with EQU or SET evaluates always to NUMBER. Otherwise it might be difficult in some cases, to force the definition of typeless symbols. This is described in detail in chapters "III.4 Expressions" and "III.7 Segment Type". 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 before the first USING statement occurs.