RE: Accessing the PC
"Randall Young" <[email protected]>
| Newsgroups | gmane.comp.hardware.motorola.microcontrollers |
|---|---|
| Message-ID | <[email protected]> |
> Is there a way to access the contents of the PC? i.e a variation
> on the mfspr instruction?
I don't know of a way to access it directly, but you could always do
something like :
bl .+4
mflr rA
Assuming of course you don't need the contents of "lr" (otherwise you'll
need to save & restore it).
Of course if you know the code hasn't been moved around in memory, you could
just load any label as a constant. But I assume since you're asking, you've
got a reason that method isn't valid.
Randall Young
Senior Software Engineer
NavCom Technology, Inc.
A John Deere Company
-----------------------------------------------------------
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/