RE: Re: Managing accidental read/writes to address zero

alex shulman <[email protected]>
Newsgroups gmane.comp.hardware.motorola.microcontrollers
Message-ID <[email protected]>
You could just put a branch instruction to your error
handler or to reset vector (0x100) at address 0, or
put litteraly 0 there.

If the processor fetches 0 it gets unimlemented
instruction exception at address 0x1000. 

You may write your Null pointer error handler code
there as a part of the unimplemented instruction
handler.


Alex.
--- Jean-Christophe MATHAE <[email protected]>
wrote:
> I was thinking of something like
> #define	NULL	0xF0000000
> were an access to this address will trigger a bus
> error exception.
> 
> It is not an easy solution, as this would probably
> need to recompile the
> libraries... And perhaps trigger all sorts of
> strange errors where it is
> assumed that "NULL == 0" is true ....
> 
> 
> 


		
__________________________________ 
Yahoo! Mail Mobile 
Take Yahoo! Mail with you! Check email on your mobile phone. 
http://mobile.yahoo.com/learn/mail 


-----------------------------------------------------------
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.