Keil Logo

Between A251 and ASM51

Assembly modules written for Intel ASM51 can be retranslated with the A251 macro assembler. However, since the A251 macro assembler supports additional 251 features, the following incompatibilities can arise when ASM51 modules are retranslated with A251.

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

    has the result 800H in ASM51 since the result of the addition is only a 16 bit value (1000H), whereas the A251 calculates Value as 8800H.

  • 8051 Pre-defined Symbols
    The default setting of Intel ASM51 pre defines the Special Function Register (SFR) set and symbol names for reset and interrupt vectors of 8051 MP. This default symbol set can be disabled with the ASM51 control NOMOD51. A251 does not pre-define any of the 8051 SFRs or interrupt vector symbols. The control NOMOD51 is accepted by A251 but does not influence any symbol definitions.
  • More Reserved Symbols
    The A251 macro assembler has more reserved symbols, as ASM51. Therefore, it might be necessary to change user defined symbol names. For example, the symbol ECALL cannot be used as label name in A251, since the Intel/Atmel Wireless 251 has a new instruction with that mnemonic.
  • Enable the MPL Macro Language
    If your assembly module contains Intel ASM51 macros, the A251 MPL macros need to be enabled with the MPL control.
  • Object File Differences
    The A251 assembler uses the Intel OMF 251 file format for object files. The ASM51 assembler uses 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. The ASM51 assembler generates line number information for source level debugging. For compatibility with ASM51, line number information can be disabled with the A251 control NOLINES.
  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.