Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] Getting Register Content From its address

2005-06-27 by Bruce Parham

Ahmad El-Saied wrote:

> hi all,
> 	I've a register1 containing the address of another
> register2  that i dont know (suppose its entered by
> keys) & i need to get the contents of that register2.
> 
> 	plz help me about this
>                    Ahmad El-Saeed

You didn't state if you are working in assembly or C but it sounds you're
working at the assembly level.

The registers are mapped to the bottom of the ram address space so
something like:

     mov   r30, r16     ; assumes r16 has reg2 address (is reg1)
     clr   r31          ; r31:r30 now points to reg2
     ld    r18, Z       ; content of reg2 -> r18

will do the trick.

Bruce

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.