Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!highspl!burris From: burris@highspl (David Burris) Newsgroups: comp.sys.atari.st.tech Subject: Re: MIDI input problems (C or assembler programming) Message-ID: <1991Feb7.000514.6776@highspl> Date: 7 Feb 91 00:05:14 GMT References: <1991Feb6.151810.986@daffy.cs.wisc.edu> Organization: Dave's Home PC Lines: 36 From article <1991Feb6.151810.986@daffy.cs.wisc.edu>, by carter@cat27.cs.wisc.edu (Gregory Carter): > > Well what do you know, finally someone asks a question up my alley! > John, I wrote some networking software for the midi port and ran into > the same problem, the Bcon calls are too slow to retrieve information fast > enough(In TOS 1.0 they are anyway, TOS 1.4/1.6 its a little better) from the > input buffer. Solution? In increase your buffer size to about 4K, for really > TAXING operations, increase to 16K. I use an 8K buffer and don't have any > problems at all. Real time . -- ================================================================ David Burris Aurora,Il. burris@highspl { att | linac }!highspl!burris ================================================================ our code is executed. If the assembly routine saves ALL registers, it can push the MIDI byte onto the stack and jsr directly to a C routine. If you allocate a lot of local variables or nest function calls too deeply, you might want to point the stack at some space allocated in your assembly routine. I would not be too surprised that you could generate enough interrupts of higher priority that a MIDI interrupt might be serviced after the next byte arrives. I haven't experienced this problem but I haven't really TRIED to produce it either. Be careful about using registers you haven't saved in your assembly routine. At the time the interrupt occurs, you have NO idea what might be in the registers. I kept having the temptation to believe that I had access to the scratch registers of the C compiler. -- ================================================================ David Burris Aurora,Il. burris@highspl { att | linac }!highspl!burris ================================================================