ARM Technical Support Knowledge Articles

POST INCREMENT ON LONG FAR TYPES

Applies to: C51 C Compiler

Answer


Information in this article applies to:


SYMPTOM

Far memory accesses may return inaccurate values. For example:

far long a;
long b;
.
.
.
b = a++;
.
.
.

Assigns an inaccurate value to b when far memory accesses are used, the target object is stored in DATA, the source object is post incremented, and the source object is stored in far memory. Note that the XBANKING.A51 file must be configured and included in your project.

Specifically, the problem is that the bytes of the variable b are written in reverse order.

CAUSE

This is caused by a problem in the far memory libraries for classic 8051 devices.

RESOLUTION

This problem is corrected in the C51 V7.20 (and later) update.

Article last edited on: 2005-05-20 10:38:44

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential