Keil Logo

A. Application Examples

This appendix illustrates project development for the 251 microcontroller family. The sample programs are found in the ..\Keil\C251\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\C251\Examples contains several other example programs that are described in the C251 Primer User's Guide.

ASM – Assembler Example

This example shows you how to create a 251 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 A251 and L251 from the Command Prompt:

Build the 251 application with the following commands:

A251 ASAMPLE1.A51 DEBUG XREF
A251 ASAMPLE2.A51 DEBUG XREF
A251 ASAMPLE3.A51 DEBUG XREF
L251 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 OH251 with the following command:

OH251 ASAMPLE1
 
  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.