Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
50
Добавлен:
14.04.2015
Размер:
1.37 Mб
Скачать

Keil Software — Cx51 Compiler User’s Guide

147

 

 

Philips 8xC750, 8xC751, and 8xC752

The Philips 8xC750, 8xC751, and 8xC752 derivatives support a maximum of 2 KBytes of internal program memory. The CPU cannot execute LCALL and LJMP instructions. The following must be considered when using these devices:

A special library, 80C751.LIB, which does not use these instructions is necessary for these devices.

The Cx51 compiler must be set to avoid using LJMP and LCALL instructions. This is accomplished using the ROM(SMALL) directive.

Note that the following restrictions apply when creating programs for the 8xC750, 8xC751, and 8xC752:

Stream functions such as printf and putchar may not be used. These functions are usually not necessary for this chip because it is only equipped with a maximum of 2 KBytes and has no serial interface.

Floating-point operations may not be used. Only operations using char,

unsigned char, int, unsigned int, long, unsigned long, and bit data types

5

are allowed.

The Cx51 compiler must be invoked with the ROM(SMALL) directive. This

control statement instructs the C51 compiler to use only AJMP and ACALL instructions.

The library file 80C751.LIB must be included in the input module list of the linker. For example:

BL51 myprog.obj, startup751.obj, 80C751.LIB

A special startup module, START751.A51, is required. This file contains startup code that is comparable to that found in STARTUP.A51, but contains no LJMP or LCALL instructions. Refer to “Customization Files” on page 150 for more information.

148 Chapter 5. 8051 Derivatives

Philips 80C51MX Architecture

The Philips 80C51MX architecture provides an extended instruction set and extended addressing modes to support up to 16MB memory space. The universal pointer registers and the related instructions give you hardware support for generic pointers. You may use the far memory type to place variables anywhere in the extended memory space. Programming examples for the Philips 80C51MX architecture are found in the folder C51\EXAMPLES\PHILIPS 80C51MX.

The Philips 80C51MX architecture is supported with the extended CX51 compiler, LX51 linker/locater, and AX51 macro assembler. These additiaonl components are available in the PK51 Professional Developers Kit.

Philips and Atmel WM Dual DPTR

Philips Semiconductors and Atmel Wireless and Microcontrollers provide several compatible 8051 variants with dual data pointers. Using multiple data pointers can improve the speed of library functions like memcpy, memmove, memcmp, strcpy, and strcmp.

5

The MODP2 directive instructs the Cx51 compiler to generate code that uses

 

 

both data pointers in your program.

 

The Cx51 compiler uses at least one data pointer in an interrupt function. If an

 

 

interrupt function is compiled using the MODP2 directive, both data pointers are

 

saved on the stack - this happens even if the interrupt function uses only one data

 

pointer.

 

To conserve stack space, you may compile interrupt functions with the

 

NOMODP2 directive to prevent the Cx51 compiler from using the second data

 

pointer.

Keil Software — Cx51 Compiler User’s Guide

149

 

 

Chapter 6. Advanced Programming

Techniques

This chapter describes advanced programming information that experienced software engineers will find invaluable. Knowledge of most of these topics is not necessary to successfully create an embedded 8051 target program using the Cx51 compiler. However, the following sections provide insight into how many non-standard procedures can be accomplished (for example, interfacing to PL/M-51).

This chapter discusses the following topics:

Files you may alter to customize the startup procedures

Files you may alter to customize run-time execution of library routines

The conventions the Cx51 compiler uses to name code and data segments

How to interface Cx51 functions to assembly and PL/M-51 routines

Data storage formats for the different Cx51 data types

Different optimizing features of the Cx51 optimizing compiler

6

Соседние файлы в папке HLP