[comp.sys.atari.st] Wanted: Assembler example with timer interrupt

gdr@pbhya.UUCP (Guy Ridley) (01/20/88)

I am writing some music composition software.  I want it to spend most of
its time making up music, but then at regular intervals send the next 
note (or note-off message) out the MIDI port.  I have read what ST Internals
has to say about the clock interrupts, but since there is no example given,
I am still murky about what I need to do and in what order.  As I understand
it, using the C timer, I am limited to intervals that are multiples of
1/200th second.  Is this true?  Also, I remember reading here that the
200hz clock is not always accurate.  Is this so?  And why?  I understand
that I have to mess with a vector, and then write a routine (that sends
notes) at the place to which the new vector points (I assume by using  
another ORG in the assembler code?).  But... how do I make sure that after
that routine is done, the main part of the program continues exactly where
it left off?  
 
I guess what I need is an example of code that uses a timer interrupt,
or else a clear, thorough book on interrupts.  Any suggestions?  

brenes@sky.COM (Erasmo Brenes) (01/20/88)

Try looking at the MWC (Mark Williams C) manual. It shows some examples of
using the timers to interrupt a program. I would recommend to use timer A
which is reserved for user applications rather than timer C which is used
elsewhere in the system. Also some of the examples that come with the
package deal with handling system calls from a C language program. I hope
this gives you some leads.