[net.micro.mac] Interrupt handlers.

matt@srs.UUCP (Matt Goheen) (08/07/85)

    I have been playing around with the 6522 chip in the mac to do
some (accurate) timings.  I believe I have gotten the chip to work
properly in that the counter (I'm using the T1 timer in repeat
mode) decrements.  I also believe that I have put the correct
address of my interrupt handler in the secondary interrupt vector
for level one interrupts.  This address (from what I can figure)
is at 0x1aa.  The program runs fine until I enable the timer 1
interrupt from the VIA (using the IER on the chip).  It seems
that my interrupt handler never gets control of the program,
additionally, as soon as I do enable the interrupts, the program
hangs.  I return from the interrupt handler by pushing the
address of the IOdone routine on the stack, and then executing
a RTS instruction.  This is what the manual says to do if you
handle the interrupt immediately.  I don't really know if I am
interpreting the manual correctly.  I haven't written a device
driver for this because I don't think I have to.  Do I?  I plan
to eventually use this as a desk accessory to do some nifty things,
but I'm not sure exactly what to make it do.  Any ideas about
things you want timed?  I will mail the source of this to anyone
who want's it, it is very small in it's current state (written
in Aztec C).  Finally, in case you got this far and still know
what the hell I'm talking about, the interrupt handler I am
currently using does nothing more than increase a global counter
(counts the number of interrupts) and clear the flag in the
IFR by reading the timer 1 counter low order byte.  If you think
you can help me but need more information, please ask!!


					PLEASE HELP!!

UUCP:						    Matt Goheen
    ...{allegra, seismo}!rochester!srs!matt	    S.R. Systems
						    Rochester NY
						    (716) 266 - 9035