Path: utzoo!mnetor!uunet!husc6!bbn!rochester!PT.CS.CMU.EDU!andrew.cmu.edu!rs4u+ From: rs4u+@andrew.cmu.edu (Richard Siegel) Newsgroups: comp.sys.mac.programmer Subject: Re: referencing pointers to resources in Lightspeed Pascal Message-ID: Date: 21 Mar 88 15:44:57 GMT References: <1474@puff.cs.wisc.edu> Distribution: comp.sys.mac.programmer Organization: Carnegie Mellon University Lines: 22 In-Reply-To: <1474@puff.cs.wisc.edu> If you're trying to actually *call* the FKEY from Lightspeed Pascal, the way to do it is as follows: fkeyH := GetResource('FKEY', 4); if (fkeyH <> NIL) then begin MoveHHi(fkeyH); HLock(fkeyH); CallFKey(fkeyH); ReleaseResource(fkeyH); end; the procedure "CallFKey" is as follows: procedure CallFKey(codeH : Handle); inline $205F, $2050, $4E90; This bit of code pops the last argument off the stack, dereferences it (into a0, I think), and JSRs to that address. Notice that you can use the same technique to call code resources that take multiple arguments... -Rich