Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!gem.mps.ohio-state.edu!ginosko!uunet!mcsun!ukc!edcastle!lfcs!nick From: nick@lfcs.ed.ac.uk (Nick Rothwell) Newsgroups: comp.sys.mac.programmer Subject: Using MIDI Manager from ThinkSpeed C. How? Help! Message-ID: <336@castle.ed.ac.uk> Date: 7 Sep 89 09:14:28 GMT Sender: root@castle.ed.ac.uk Reply-To: nick@lfcs.ed.ac.uk (Nick Rothwell) Organization: LFCS Enya Admiration Society Lines: 33 I've just spent an evening trying to get a simple MIDI Manager application (MIDISignIn, MIDISignOut) going in LightThink C. No luck. I tried cross-calling some assembly bolted onto the MIDI.a macro file. I tried in-line assembler in THINK C. I even tried jumping to an array of integers containing the instructions and the trap. This was the most successful; I at least got *out* of MIDISignIn, even though I couldn't go anywhere afterwards. So, what's wrong with something like this: pascal OSErr MIDISignIn(clientID, refCon, icon, name) OSType clientID; long refCon; Handle icon; StringPtr name; { asm { move.l #(((long)midiSignIn<<16) + midiToolNum), D0 dc.w 0xA800 /* sound manager trap. */ } } I have tried all sorts of combinations of literal opcodes and things. I seem to half get into MIDISignIn, because the generic application icon appears in the patchbay; next thing I know, I've skidded to a halt in SetDItem with an odd address trap. Somebody out there must have this stuff off the ground..? Please? Nick. -- Nick Rothwell, Laboratory for Foundations of Computer Science, Edinburgh. nick@lfcs.ed.ac.uk !mcvax!ukc!lfcs!nick ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ Fais que ton reve soit plus long que la nuit.