Path: utzoo!utgpu!water!watmath!clyde!att!ihuxz!burris From: burris@ihuxz.ATT.COM (Burris) Newsgroups: comp.sys.atari.st Subject: Re: MIDI Interrupts Message-ID: <3478@ihuxz.ATT.COM> Date: 8 Oct 88 15:19:58 GMT References: <8810060809.AA13023@ucbvax.Berkeley.EDU> Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 46 > > Perhaps somebody has an answer to the following: > > XBIOS function Kbdvbase() returns a pointer to a structure where - > among others - three pointers (*kb_midisys)(), (*kb_vmiderr)() and > (*kb_midivec)() are stored. As far as I know from several books on the > ATARI ST, kb_midisys() is called, when an interrupt has occured (in one > of the ACIAs), kb_vmiderr() is the MIDI error handler and kb_midivec() > is responsible for receiving a byte from the MIDI port. But I couldn't > find any further description of what the routines should do EXACTLY and > when/how they are called. > Is there some sort of "official", detailed and reliable documentation > of these (and possibly other) routines and TOS pecularities? Is the > documentation, if any, available to "normal" users? Where? In W-Germany? > Actually the routine is like this: struct vectors { long midivec; /* MIDI input */ long vkbderr; /* Keyboard error */ long vmiderr; /* MIDI error */ long statvec; /* IKBD status */ long mousevec; /* Mouse routines */ long clockvec; /* clock time routine */ long joyvec; /* joystick routines */ long midisys; /* system MIDI vector */ long ikbdsys; /* IKBD system vector */ }; struct vectors *kbdvbase(); midivec is the interrupt vector for the MIDI receiver. Essentially, it just calls a routine that stores the MIDI bytes in a circular buffer that is then read by the conin() BIOS routine. The vmiderr vector is called whenever an overrun of the buffer is detected. You can supply your own MIDI interrupt routine by writing a new vector to midivec. You should not mess with midisys. Dave Burris