ARM Technical Support Knowledge Articles

PHYSICAL LOCATION OF REGISTERS

Applies to: C51 C Compiler

Answer


Information in this article applies to:


QUESTION

How do I refer to a General Purpose Register by its address?

ANSWER

The location of the GPRs depend on the register bank used. There are four register banks, each one occupying eight bytes of RAM space. USe the following formula to calculate the location of a register:

(Register_Bank * 0x08) + Register_Number

For example, R3 of register bank 2 is located at address (2*0x08)+3 or 0x13, while R0 of register bank 0 is located at (0*0x08)+ 0 or 0x00.

Article last edited on: 2004-04-30 09:21:51

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