Seriously, IRQ mode is a completely seperate processor mode - it has it's
own set of certain registers
it IS ok to play with r13 as long as you don't do it within IRQ mode.
-Stephen
----- Original Message -----
From: "matthew conte" <itsbroke@...>
To: <gbadev@yahoogroups.com>
Sent: Thursday, February 06, 2003 7:49 AM
Subject: Re: [gbadev] Interrupt/stack question
> From: "James Daniels" <james.daniels@...>
> [...]
> > I believe this might be the source of the problems because inside some
> > of my routines I'm storing the stack (r13) and then using it as a
> > general purpose register. Of course, I restore the stack before
> > returning or calling another function so there's not normally a problem.
> > However, if an interrupt were to occur whilst r13 contained something
> > other than the stack then random areas of memory would be corrupted.
> [...]
>
> your understanding is correct. you may not twiddle r13 within your
routines
> unless you a) are not using interrupts or b) disable interrupts.
>
> regards,
> matthew.
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>