Keil Logo

D. Assembler Differences

This appendix lists the differences between between the Intel ASM 51 assembler, the Keil A51 assembler, and the Keil A251/AX51 assembler.

Differences Between A51 and A251/AX51

Assembly modules written for the A51 assembler may be assembled using the A251/AX51 macro assembler. However, since the A251 macro assembler supports the Intel 251 architecture and the AX51 macro assembler supports extended 8051 variants like the NXP 80C51MX, the following incompatibilities may arise when A51 assembly modules are assembled with the A251/AX51 assembler

  • 32 Bit Values in Numeric Evaluations
    The A51 assembler uses 16 bit values for all numerical expressions. The A251/AX51 macro assembler uses 32 bit values. This may cause problems when overflows occur in numerical expressions. For example:
    Value     EQU    (8000H + 9000H) / 2
    

    generates the result 800h in A51 since the result of the addition is only a 16 bit value (1000h). However, the A251/AX51 assembler calculates a value of 8800h.

  • 8051 Pre defined Special Function Register Symbol Set
    The default setting of the A51 assembler pre defines the Special Function Register (SFR) set of 8051 MCU. This default SFR set can be disabled with the A51 control NOMOD51. Both A251 and AX51 do not pre define the 8051 SFR set. The control NOMOD51 is accepted by A251/AX51 but does not influence any SFR definitions.
  • More Reserved Symbols
    The A251/AX51 macro assembler has more reserved symbols as A51. Therefore it might be necessary to change user defined symbol names. For example the symbol ECALL cannot be used as label name in A251/AX51, since it is a mnemonic for a new instruction.
  • Object File Differences
    Ax51 uses the OMF 251/51MX file format for object files. A51 uses an extended version of the Intel OMF 51 file format. The OMF 51 file format limits the numbers of external symbols and segments to 256 per module. The OMF 251 file format does not have such a limit on the segment and external declarations.
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.