Welcome, Guest. Please login or register.

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

Description:

0 Members and 1 Guest are viewing this topic.

Offline patrikTopic starter

Amiga interrupt-routines in C.
« on: April 17, 2003, 02:13:58 PM »
I am a beginner in AmigaOS system programming. I am writing a device and have a question about how interrupt-routines actually work in the AmigaOS.

As I understand you could write something like this to make an Interrupt structure ready for use:

struct Interrupt dummyINT;

UBYTE dummyINTData;

void DummyINTCode(void)
{
    doblabla();
}

void main(void)
{
    dummyINT.is_Data = &dummyINTData;
    dummyINT.is_Code = DummyINTCode;
}

My question is: Are you supposed to access the is_Data segment from the is_Code routine in any special way?

Would really need some explanation on how this stuff actually works.


/Patrik
 

Offline patrikTopic starter

Re: Amiga interrupt-routines in C.
« Reply #1 on: April 18, 2003, 05:10:26 PM »
I am definately still interested and would be very glad if you sent documentation to my mailbox :).

I am using SASC and it seems to be possible to access registers exactly like Thomas said.

The problems as always with C arises when you have to force it into doing something exacly in a certain way - as in this case. Is it possible that I would save myself a lot of cursing and swearing by writing the interrupt-routine in assembler right away? ;)


/Patrik
 

Offline patrikTopic starter

Re: Amiga interrupt-routines in C.
« Reply #2 on: April 18, 2003, 08:06:47 PM »
Do you know if it is possible to get hold of that book nowadays?

Those interrupts wont not kill me ;), though my amiga have to be prepared to hear some bad words and cursings ;). Have done a lot of programming on several kinds platforms - everything from small microcontrollers to big unix-boxes so I am not new to programming.


/Patrik