RE: Accessing the PC

"Terry Hansen" <[email protected]>
Newsgroups gmane.comp.hardware.motorola.microcontrollers
Message-ID <C9576D23D3E0D34992E6797BFA71A9AC2EF490@cpe-66-1-246-56.co.sprintbbd.net>
Alex -
 
Worked great!  You're a genius!
 

   Terry Hansen 
   Computer Engineer 
   Compact Power - Monument CO 
   [email protected] 
   719.488.1600 x 136 
  

-----Original Message-----
From: alex shulman [mailto:[email protected]]
Sent: Monday, March 28, 2005 12:34 PM
To: [email protected]
Subject: Re: [MPC500] Accessing the PC


Hi,

There is no architectural instruction to read the PC.
But here the trick code:

     bl  here
here:
     mflr Rx
     ...

there:
     ...

Rx will contain absolute address of the lable "here"

if you'll need  the absolute address of lable "there"
you can calculate this by following code:

     addi Ry, Rx, there - here

Ry will contain absolute address of "there"

Of course, "there" and "here" should be defined in one
code section and be less than 32KB apart.



Regards
  Alex.

--- Terry Hansen <[email protected]> wrote:
> 555 Gurus -
>  
> Is there a way to access the contents of the PC? 
> i.e a variation on the mfspr instruction?
>  
> Thanks for the help.
> 
>    Terry Hansen 
>    Computer Engineer 
>    Compact Power - Monument CO 
>    [email protected] 
>    719.488.1600 x 136 
>   
> 
>  
> 
> 
> 
> [Non-text portions of this message have been
> removed]
> 
> 


            
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 


-----------------------------------------------------------
To learn more about Freescale Microcontrollers, please visit
http://www.freescale.com/mcu






Yahoo! Groups Sponsor	

ADVERTISEMENT
 <http://us.ard.yahoo.com/SIG=12907ulfr/M=298184.6191685.7192823.3001176/D=groups/S=1706554205:HM/EXP=1112124848/A=2593423/R=0/SIG=11el9gslf/*http://www.netflix.com/Default?mqso=60190075> click here	
  <http://us.adserver.yahoo.com/l?M=298184.6191685.7192823.3001176/D=groups/S=:HM/A=2593423/rand=383905916> 	


  _____  

Yahoo! Groups Links


*	To visit your group on the web, go to:
http://groups.yahoo.com/group/MPC500/
  

*	To unsubscribe from this group, send an email to:
[email protected] <mailto:[email protected]?subject=Unsubscribe> 
  

*	Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> . 




[Non-text portions of this message have been removed]



-----------------------------------------------------------
To learn more about Freescale Microcontrollers, please visit
http://www.freescale.com/mcu


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/MPC500/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.