ARM Technical Support Knowledge Articles

COMPILER USES DPL AND DPH FOR VARIABLES

Applies to: C51 C Compiler

Answer


Information in this article applies to:


QUESTION

I have noticed that the compiler sometimes generates code that uses the DPTR (DPL and DPH) for local variables. What's going on?

ANSWER

In many cases, the data pointer is not used in a function. In that case, DPTR could be used as a general purpose register. The C51 Compiler is smart enough to detect when DPTR can be used this way.

Article last edited on: 2004-04-24 14:43:48

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