ARM Technical Support Knowledge Articles

DALLAS 390/400/520 STRUCTURE POINTER INCREMENT PROBLEM

Applies to: C51 C Compiler

Answer


Information in this article applies to:


QUESTION

I'm having a problem de-referencing and post-incrementing a pointer to a pointer on the Dallas 390/400/5240 in contiguous mode with far memory. For example:

char func (struct info_st *p)
{
volatile char c;
c = *p->ptr++;
return (c);
}

The ptr element of the structure points to xdata in the range 0x010000-0x01FFFF. The problem is that instead of adding 1 to the pointer, the value 0x0101 is added.

ANSWER

This problem is related to the ?C?PLDIPTR function in the Dallas 390/400/5240. The version of this function causes a problem incrementing the pointer. This problem is corrected in the C51 V7.07 update.

Article last edited on: 2005-05-20 09:29:38

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