[net.micro.amiga] Setting up an interrupt server

moorel@eglin-vax@caip.RUTGERS.EDU (03/07/86)

From: "LYNNE C MOORE" <moorel@eglin-vax>


	I am working on the software for a real-time control system project 
using the Amiga, and I need to set up interrupts to intercept the FLAG signal 
on 8520a to use the parallel port. The signal will provide a time sync for the 
control system as well as data, so I don't think that this could be done with 
the parallel port device.
	In the ROM Kernel manual, the description of setting up an interrupt 
server seems to imply that you should set up an Interrupt structure and call 
AddIntServer to put it into the pre-existing server chain that the system sets 
up. Given that we were adding a server to an existing chain, I assumed that the 
AddIntServer routine would set the pointers to the is_Node.ln_Pred and 
is_Node.ln_Succ, and I set up all the remaining fields; however, when I call 
the routine to add the server, it never returns.
	Has anyone successfully used these routines? Do I need to set up the 
entire server chain in order to add a customized server for one interrupt?

	Thanks,
	Lynne C. Moore <MOOREL@EGLIN_VAX.ARPA>

------

dave@heurikon.UUCP (Dave Scidmore) (03/12/86)

> From: "LYNNE C MOORE" <moorel@eglin-vax>
> 
> 
> 	In the ROM Kernel manual, the description of setting up an interrupt 
> server seems to imply that you should set up an Interrupt structure and call 
> AddIntServer to put it into the preexisting server chain that the system sets 
> up. Given that we were adding a server to an existing chain, I assumed that
> the 
> AddIntServer routine would set the pointers to the is_Node.ln_Pred and 
> is_Node.ln_Succ, and I set up all the remaining fields; however, when I call 
> the routine to add the server, it never returns.

	I wrote a little routine to add an interrupt server to the 60Hz VBLANK
interrupt chain. The routine used a software interrupt to signal the main
routine every 60th interrupt. It worked just fine. It sounds like you are doing
everything correctly if you do indeed set up all fields except the linked list
pointers. I have only two suggestions. First make sure that the interrupt
service routine returns the a zero if it returns anything else the system will
not service later routines in the interrupt chain. Since these later routines
may belong to the system things may come to a screetching halt. Second make
sure that if a lot of stuff is done in the routine it send a software interrupt
to do it. On last note, the program I wrote worked OK when compiled under
Lattice but not under Manx. Hope this helps.

						Dave Scidmore