On Wed, 15 Oct 2003, Kenneth Butterfield wrote:
> I found I could save and restore all of the data registers and
> a0...a3 within an exception handler. The system crashes if I save
> a4, a5, or a6. I was not even doing anything with the registers as
> I was just trying out the mmov command. (I was clearing the source
> of the exception)
>
> My question is two fold. How did anything in the system know I had
> saved and restored these registers?
In both examples, you're popping two values from the return stack
between the RL R -) MMOV and the R )+ RL MMOV, so you're not
restoring what you preserved.
> LABEL <works> RL R -) MMOV D0 D7 // A0 A3 ///
...
> r )+ d1 mov
> r )+ a0 mov
> R )+ RL MMOV D0 D7 // A0 A3 ///
A0-A3 are scratch registers, so you're "getting away with it" in
<works>--not quite sure how, since you're still two cells short on
the return stack.
Do WH A4 and WH A5, and you'll see what they're used for. A5=U on
my 68K and ColdFire...you will die if you leave U corrupted.
-- Ron Oliver <roliver_at_openesque.com> ---------------------------------------------------------------------- swiftx_at_forth.com The SwiftX programming discussion email list To unsubscribe, send subject "unsubscribe" to swiftx-request_at_forth.com For list command help, send subject "help" to swiftx-request_at_forth.com Message archives are located at http://www.forth.com/archive/swiftx ---------------------------------------------------------------------- This list is a forum for SwiftX users. For product support and bug reports, please send email to support_at_forth.com ----------------------------------------------------------------------Received on Wed Oct 15 2003 - 17:04:45 PDT
Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!
This archive was generated 09-Feb-2012. Archive updated nightly.