LOADWORDADR/de

(Difference between revisions)
Jump to: navigation, search
m (1 revision)
((**COPIED FROM ENGLISH PAGE**) =)
Line 1: Line 1:
== (**COPIED FROM ENGLISH PAGE**) === <span class="f_Header">Action</span> =
+
= <span class="f_Header">Funktion</span> =
  
Loads the Z-register and sets RAMPZ if available.
+
Läd das Z-Register und sezt RAMPZ wenn vorhanden.
  
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>

Revision as of 23:08, 22 February 2013

Contents

Funktion

Läd das Z-Register und sezt RAMPZ wenn vorhanden.

 

 

Syntax

LOADWORDADR label

 

 

Remarks

label

The name of the label which address will be loaded into R30-R31 which form the Z-register.

 

The code that will be generated :

LDI R30,Low(label * 2)

LDI R31,High(label * 2)

LDI R24,1 or CLR R24

STS RAMPZ, R24

 

As the AVR uses a word address, to find a byte address we multiply the address with 2. RAMPZ forms together with pointerZ an address register. As the LS bit of Z is used to identify the lower or the upper BYTE of the address, it is extended with the RAMPZ to address more then 15 bits. For example the Mega128 has 128KB of space and needs the RAMPZ register set to the right value in order to address the upper or lower 64KB of space.

 

 

See also

LOADLABELLOADADR

 

 

Example


LOADWORDADR label

Languages   English Deutsch  
Personal tools
Namespaces
Variants
Actions
Navigation
In other languages
Language