Welcome, Guest. Please login or register.

Author Topic: Amiga interrupt-routines in C.  (Read 3628 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline PiR

  • Full Member
  • ***
  • Join Date: Apr 2003
  • Posts: 148
    • Show all replies
Re: Amiga interrupt-routines in C.
« on: April 18, 2003, 10:57:18 AM »
Hi

Are you still interested in this?
Yesterday evening I dug my documentation (RKRM) for you. I was thinking about sending it to you, but I have packed it ad got 2,7MB archive, so I didn't know if you want it in your mailbox...

Thomas answer is quite good, but.
To be precise data pointer is in A1, not A0.

Yes, you have to use compiler with special support, or write some code in assembly.

I think that much better solution is to use data pointer and omit any globals. Remember that inside interrupt function you are very limited (you cannot allocate/free memory and it means all fuctions that may do it inside them). '__saveds' is also SASC keyword.

The interrupts are devided to be 'servers' and 'handlers'. Some are predefined to be used as 'handlers', other as 'servers'. You must be carefull not to install 'server' as 'handler' and vice-versa'.

Zero flag is important only with 'servers'. It shoud be done with 'return 0', as it should load D0 with 0. But yes, it might be tricky.

This is quite complicated and the good documentation is A MUST.

Good luck