Path: utzoo!mnetor!uunet!husc6!think!ames!pasteur!ucbvax!CORY.BERKELEY.EDU!dillon From: dillon@CORY.BERKELEY.EDU (Matt Dillon) Newsgroups: comp.sys.amiga Subject: Re: the Amiga Interrupt Cycle and Exec Message-ID: <8802210745.AA20230@cory.Berkeley.EDU> Date: 21 Feb 88 07:45:55 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 31 > Could anybody please tell me what order Exec pushes what registers >onto the stack right before it calls your interrupt service routine? (It frees >a1...?? to use as scratch.) I need access to this data, and any help would >be greatly appreciated. The RKM's don't give the whole story. I thank you in advance. > Absolutely not! DON'T!!! WRONG! You can trace the ROM code if you want, but under no circumstances should you make assumptions as to what the interrupt tag code does! When your interrupt service routine is entered, the following is all you know: D0 -scratch D1 -scratch A0 -scratch A1 -server data segment pointer on call, scratch on return A5 -scratch A6 -EXEC library base pointer on call, scratch on return D2-D7/A2-A4 -must be preserved by your interrupt handler. Where the server data segment pointer is the one defined in the Interrupt structure for that interrupt. The interrupt service routine should return with an RTS. Obviously the tag code has saved D0/D1/A0/A1/ A5/A6, but what possible reason could you have for wanting the original contents? At the point your interrupt service routine is entered, the previous state could have been *anything*. This is the Amiga. Let us not get into the habit of using hardcoded addresses and offsets that delve into the internals of the OS! -Matt