Path: utzoo!attcan!uunet!convex!killer!mit-eddie!bloom-beacon!apple!mjohnson From: mjohnson@Apple.COM (Mark Johnson) Newsgroups: comp.sys.mac.programmer Subject: Re: SlotVInstall problem Message-ID: <20875@apple.Apple.COM> Date: 19 Nov 88 02:06:04 GMT References: <10050047@eecs.nwu.edu> <10050050@eecs.nwu.edu> Organization: Apple Computer Inc, Cupertino, CA Lines: 35 In article <10050050@eecs.nwu.edu> jln@eecs.nwu.edu (John Norstad) writes: > >I discovered the reason why my SlotVInstall call failed in MPW C - >it's bad glue in the MPW library {Libraries}Interface.o. I thought >it worthwhile to alert people to the problem, hence this follow-up posting. > >The header file Retrace.h defines SlotVInstall as follows: > >pascal OSErr SlotVInstall (VBLBlockPtr, theSlot) > QElemPtr VBLBLockPtr; > short theSlot; > extern; > >I set a breakpoint on the SlotVInstall trap using MacsBug and >discovered that the glue code is the following: > > movea.l (a7)+,a1 > movea.l (a7)+,a0 > move.w (a7)+,d0 > _SlotVInstall > move.w d0,(a7) > jmp (a1) > >This glue code is popping the two parameters in the wrong order. >The trap is getting both a bad pointer to the parameter block and >a bad slot number. The second and third lines of code above >should be interchanged. > >I've checked both the MPW 2.0 and 2.0.2 Interface.o libraries, and >the have the same bad glue. > This problem with the MPW interface file is documented in Tech Note #200 on page 13. It has been corrected in MPW 3.0 which is available from APDA in beta form.