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

Keil Software — Cx51 Compiler User’s Guide

357

 

 

Appendix B. Version Differences

This appendix lists an overview of major product enhancements and differences between the current version of the Cx51 compiler and previous versions. The current version contains all enhancements listed below:

Version 6.0 Differences B

EXTERNAL and SEGMENT limitations removed

The number of external symbols and segments per module are no longer limited to 256. This historical limitation was imposed by the old Intel Object File format.

First 256 characters of a variable name are significant

Now the first 256 characters of a variable name are significant. Previously, only the first 32 characters were significant.

Support for Philips 80C51MX and Dallas Contiguous Mode

Cx51 provides support for the Philips 80C51MX architecture and the Dallas Contiguous Mode that is available on the Dallas 390 and variants.

OMF2 directive and far memory type support

The OMF2 directive selects a new OMF file format that provides detailed symbol type checking across modules and supports up to 16MB code and xdata memory. This format is required when you use the STRING, VARBANKING, and XCROM directives.

STRING directive

Cx51 allows you to locate constant strings into const xdata or const far space which leaves more code space available for program code.

USERCLASS directive

Assigns user defined class names to compiler generated segments. Class names may be referenced by the LX51 linker to locate all segments with a specific class name.

VARBANING directive and far memory type support

Two new memory types, far and const far, and user configureable access routines provide support for up to 16MB extended code and xdata memory. The VARBANKING directive enables far memory type support.

XCROM directive

The XCROM directive locates constants into xdata ROM which frees code ROM space for program code.

358

Appendix B. Version Differences

 

 

Support for Analog Devices B2 series of MicroConverters

The B2 series of ADuC devices contains dual DPTR and an extended stack.

NOTE

Only the the PK51 Professional Developers Kit supports the OMF2 output file format, Philips 80C51MX, Dallas Contiguous Mode, and VARBANKING. These options are not available in the CA51 and DK51 packages.

B

Version 5 Differences

Optimize Level 7, 8, and 9

C51 offers three new optimizer levels. These new optimizations focus primarily on code density. Refer to “Optimizer” on page 157 for more information.

Directives for the dual DPTR support

C51 provides dual DPTR support for Atmel, Atmel WM, and, Philips with the directives MODA2 and MODP2.

data, pdata, xdata automatic variables overlayable in all memory models

C51 now overlays all data, pdata, and xdata automatic variables regardless of the selected memory model. In previous C51 versions, only automatic variables of the default memory type are overlaid. For example, C51 Version 5 did not overlay pdata or xdata variables if a function where compiled in the SMALL memory model.

The data type enum adjusts automatically 8 or 16 bits.

C51 now uses a char variable to represent an enum, if the enum range allows that.

modf, strtod, strtol, strtoul Library Functions

C51 now includes the ANSI standard library functions modf, strtod, strtol, strtoul

BROWSE, INCDIR, ONEREGBANK, RET_XSTK, and RET_PSTK Directives

C51 supports new directives for generating Browse Information, specifying include directives, optimizing interrupt code, and using the reentrant stack for return addresses. Refer to “Chapter 2. Compiling with the Cx51” on page 17 for more information.

Keil Software — Cx51 Compiler User’s Guide

359

 

 

Version 4 Differences

Byte Order of Floating-point Numbers

Floating-point numbers are now stored in the big endian order. Previous releases of the C51 compiler stored floating-point numbers in little endian format. Refer to “Floating-point Numbers” on page 179 for more information.

_chkfloat_ Library Function

 

 

 

 

 

B

 

The intrinsic function _chkfloat_ allows for fast testing of floating-point

 

numbers for error (NaN), ±INF, zero and normal numbers. Refer to

 

 

“_chkfloat_” on page 245 for more information.

 

 

 

 

 

FLOATFUZZY Directive

 

 

 

 

 

 

 

 

C51 now supports the FLOATFUZZY directive. This directive controls the

 

 

number of bits ignored during the execution of a floating-point compare.

 

 

Refer to “FLOATFUZZY” on page 38 for more information.

 

 

 

Floating-point Arithmetic is Fully Reentrant

 

 

 

 

 

Intrinsic floating-point arithmetic operations (add, subtract, multiply, divide,

 

 

and compare) are now fully reentrant. The C library routines fpsave and

 

 

fprestore are no longer needed. Several library routines are also reentrant.

 

 

Refer to “Routines by Category” on page 218 for more information.

 

Long and Floating-point Operations no Longer use an Arithmetic Stack

 

 

The long and floating-point arithmetic is more efficient; the code generated

 

 

is now totally register-based and does not use a simulated arithmetic stack.

 

 

This also reduces the memory needs of the generated code.

 

 

 

 

Memory Types

 

 

 

 

 

 

 

 

 

The memory types have been changed to achieve better performance in the

 

 

run-time library and to reflect the memory map of the MCS® 251 architecture.

 

Memory Type Bytes for Generic Pointers

 

 

 

 

 

 

The memory type bytes used in generic pointers have changed. The

 

 

following table contains the memory type byte values and their associated

 

 

memory type.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Memory Type

idata

data

bdata

xdata

pdata

code

 

 

 

C51 V5 Value

0x00

0x00

0x00

0x01

0xFE

0xFF

 

 

 

C51 V4 Value

0x01

0x04

0x04

0x02

0x03

0x05

 

 

 

WARNINGLEVEL Directive

 

 

 

 

 

 

 

C51 now supports the WARNINGLEVEL directive which lets you specify

 

 

the strength of the warning detection for the C51 compiler. The C51

 

360

Appendix B. Version Differences

 

 

compiler now also checks for unused local variables, labels, and expressions. Refer to “WARNINGLEVEL” on page 85 for more information.

B

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