[comp.sys.atari.st] Interrupt help, please.

chrisl@fulcrum.bt.co.uk (Chris Parkin Lilley [cs12]) (02/16/90)

	I'm trying to get interrupt-driven I/O working over the serial port
on my 1040 ST. I've installed the address of my interrupt service routine in 
the appropriate vector (transmit buffer empty on the MFP -- it's 69, I think),
and then stuffed a character into the MFP data buffer. The service routine 
gets called OK, but the program then hangs, killing the machine.

	Actually, I've tried several things. When I started, I just put the
address of a C routine in the vector, and it crashed with a bus error, I
think. I presumed this would be because the C function does an `rts', not an
`rte' at the end of the routine, so it was pulling the wrong stuff off the
stack. Then I wrote a little routine in assembler which calls my C routine
and then does an `rte'. This is the version which hangs the machine. 

	I have put some flags in, and the C routine gets called OK, and
returns to the assembler routine OK, but then it all goes very quiet. Even
the keyclick goes away.

	Has anyone got experience of installing new interrupt service
routines on STs? Am I doing something really naive? Help!

	Advance thanks in desperation,

	- Chrisl.

--
		"Time is an illusion. Lunchtime doubly so."
--------------------------------------------------------------------------------
Chris Parkin Lilley, CS1.2, BT Fulcrum, UK               chrisl@uk.co.bt.fulcrum