Global Sources
EE Times-India
Stay in touch with EE Times India
EE Times-India > Power/Alternative Energy
Power/Alternative Energy  

Converting from the Metalink ASM51 assembler to the Keil A51 assembler

Posted: 19 Jun 2003     Print Version  Bookmark and Share



CYGNAL Integrated Products, Inc. AN021 - 1.0 AUG01

4301 Westbank Drive Copyright ) 2001 Cygnal Integrated Products, Inc.

Suite B-100 (All rights reserved)

Austin, TX 78746

Converting from the Metalink ASM51 Assembler to the

Keil A51 Assembler



Starting with release V1.4 of the Cygnal Development Kit Software, the Metalink ASM51

assembler/linker has been replaced with the Keil Software A51 macro assembler and stand-alone

OMF-51 compatible BL51 linker. Once V1.4 (or later) of the Cygnal Development Kit Software

is installed, source-level debug using output from the Metalink assembler/linker is no longer

supported by the Cygnal IDE.

Benefits of the Keil 8051 tools include:

7 Multiple source and object file support. You can organize your projects into multiple source/

object files and re-assemble only the files modified since the last program build.

7 Source-level debug of code containing macros and conditional assembly directives.

7 Faster debug processing before download.

7 Source file names no longer restricted to 8.3 (DOS) format.

7 A separate copy of register definition files is no longer required in each project's source direc-

tory. Include files can be kept in a single directory in the assembler's search path.

Converting Metalink ASM51 Source for the Keil A51


The source and directive syntax of the Keil A51 assembler is very similar to that used by the Met-

alink ASM51 assembler. Typically, the only change required to your existing Metalink ASM51

source files to make them compatible with the Keil A51 assembler is the single line of source

used to include register definition files. The Keil A51 assembler uses the $INCLUDE directive to

include registers definition files instead of the $MODxxxx directive.

Metalink ASM51 syntax:

$MOD8F000 ; include C8051F000 register definition file.

Keil A51 assembler syntax:

$INCLUDE ( ; include C8051F000 register definition file.

AN021 - Converting from the Metalink ASM51 Assembler to the

Keil A51 Assembler

2 AN021 - 1.0 AUG01 ) 2001 Cygnal Integrated Products, Inc.

The latest register definition files, defining all SFR registers and bit-addressable control/status

bits, are copied into the "Cygnal\Examples\C8051Fxxx" directory and into the default search path

used by the Keil A51 assembler during IDE installation. It is no longer necessary to keep a copy

of a register definition file in each project's source file directory. The register and bit names used

in this file are identical to those used in the C8051Fxxx datasheets.

The complete assembler and linker reference manual can be found on-line under the Help menu in

the IDE or in the "Cygnal\hlp" directory (A51.PDF). Example source code is provided in the

"Cygnal\Examples\C8051Fxxx" directories which may be used as a template for code develop-

ment. Refer to Application Note "AN004 - Integrating Keil 8051 Tools into the Cygnal IDE" for

additional information on using the Keil 8051 tools with the Cygnal IDE.

Comment on "Converting from the Metalink ASM51 a..."
*  You can enter [0] more charecters.
*Verify code:


Visit Asia Webinars to learn about the latest in technology and get practical design tips.


Go to top             Connect on Facebook      Follow us on Twitter      Follow us on Orkut

Back to Top