Xref: utzoo comp.sys.mac.programmer:8749 comp.sys.mac:37331 rec.music.synth:8822 Path: utzoo!utgpu!watmath!att!dptg!rutgers!iuvax!mailrus!shadooby!oxtrap!sendai!rich From: rich@sendai.sendai.ann-arbor.mi.us (K. Richard Magill) Newsgroups: comp.sys.mac.programmer,comp.sys.mac,rec.music.synth Subject: Re: Mac SCC madness (Multifinder deranged?) Message-ID: Date: 30 Aug 89 15:00:57 GMT References: <832@amc-vlsi.UUCP> Reply-To: rich@oxtrap.UUCP Distribution: na Organization: Digital Works, Ltd. - Ann Arbor, MI Lines: 36 In-reply-to: green's message of 29 Aug 89 22:14:02 GMT In article <832@amc-vlsi.UUCP> green (Brian Green) writes: So far, I have had great sucess intercepting, buffering, and re-transmitting the MIDI stream from my keyboard under FINDER, but when I run the application under MULTIFINDER, I am plagued by seemingly random losses of MIDI data, along with occasional total lock-ups of the Mac (requiring power down to reset). Can anybody suggest what I may be doing wrong? Yes. A) Don't use global data. You are probably presuming that A5 is set properly within one of your interrupt service routines. This is not a valid assumption under multifinder. The MIDI driver that came with glib-1.6 suffered from this same problem. (mail me if you'd like a corrected version) B) Why are you writing your own when several versions already exist, more or less in the public domain? (rhetorical question). C) Why would anyone in their right mind write anything other than MIDI Manager on mac these days? I have tried to follow the compatibility guidelines in Inside Macintosh I-V which include: - not using the user stack pointer in assembler routines There is nothing wrong with using stack. (short of avoiding overflows). What they are trying to get across in the tech notes is that you can't make any assumptions about the contents of stack below your frame, across calls. ie, any two functions, F and G may not see the same thing below their stack frames. This is only common sense, but someone at apple didn't realize this when they originally wrote the save/restoreA5 code. -- rich.