Ax51 User's GuideAx51 Introduction Assembling Programs Writing Assembly Programs Control Statements Macro Processor Error Messages Appendix A. Application Examples B. Reserved Symbols C. Listing File Format Listing File Heading Source Listing Macro / Include File / Save Stack Format Symbol Table Listing File Trailer D. Assembler Differences Between A51 and ASM51
A. Application Examples
This appendix illustrates project development for the Ax51 microcontroller family. The sample programs are found in the ..\Keil\C51\Examples\ASM folder. Each sample program is stored in a separate folder along with µVision project files that help you quickly build each sample program.
The folder ..\Keil\C51\Examples contains several other example programs that are described in the C51 Primer User's Guide.
ASM – Assembler Example
This example shows you how to create an x51 program in assembler language. The program, which outputs the text "PROGRAM TEST" on the serial interface, is three modules that may be translated using the various tool versions.
Using Ax51 and Lx51 from the Command Prompt:
Build the Ax51 application with the following commands:
A51 ASAMPLE1.A51 DEBUG XREF A51 ASAMPLE2.A51 DEBUG XREF A51 ASAMPLE3.A51 DEBUG XREF L51 ASAMPLE1.OBJ, ASAMPLE2.OBJ, ASAMPLE3.OBJ SEGMENTS (VAR1) IXREF
The SEGMENTS control locates the VAR1 segment before other internal data memory segments.
The IXREF control includes a cross reference in the linker listing (MAP) file.
The file ASAMPLE1 is the absolute object module created by the linker. This file can be used as input for debuggers or may be converted into an Intel HEX file using OH51 with the following command:
of your data.