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.
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:
Intel-style macros are not supported! (Thus the '%' character can be used in
Up to now only the following assembler controls and their abbreviations have
|$DATE (<string>)|| ||$DA |
|$DEBUG ||$DB |
|$MACRO (<percent>)||$MR |
|$MOD51 ||$MO |
|$PAGING ||$PI |
|$SYMBOLS ||$SB |
|$PAGELENGTH (<lines>) ||$PL |
|$PAGEWIDTH (<columns>)||$PW ||
|$EJECT || ||$EJ |
|$GEN ||$GE |
|$GENONLY ||$GO |
|$INCLUDE (<file>)||$IC |
|$LIST ||$LI |
|$SAVE ||$SA |
|$RESTORE ||$RS |
|$TITLE (<string>)||$TT |
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.