[futurebasic] Re: [FB] [FBII] FN NEWGESTALT

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 1999 : Group Archive : Group : All Groups

From: "keller" <keller@...>
Date: Thu, 30 Dec 1999 13:40:51 -0600
Oh. Ignore my last post. When I sent Mars' code by email, I noticed that I
had thought the storageblock label to be part of a remark, and had remarked
it out when taking out the email formatting. Well, that problem is solved.

>>>Has anyone got some code where they added the toolbox FN NEWGESTALT in FBII?
>>>I'd appreciate seeing how it's really done, rather than stumbling along on
>>>my own.
>> You didn't say which part of the process you stumbled at. The easy part is
>> LOCAL FN myNewGestalt(selector&, gestaltFunctionProcPtr&)
>>  ` move.l ^gestaltFunctionProcPtr&,a0
>>  ` move.l ^selector&,d0
>>  ` dc.w $A3AD ; _newGestalt trap word
>>  ' error code is in d0, returned as the function value
>> called like this
>>  osErr% = FN myNewGestalt(_"QQQQ", myProcPtr&)
> My main problem was setting up the funtion for myProcPtr& to point at, but I
> needed help with "the easy part" too. Mark sent me some code (thanks, Mark)
> that Mars wrote which does all of the installation of a custom gestalt
> selector function, but I am having trouble with one assembly code line...
> `   lea storageblock(pc),A1         ;get the address of the storage block
> FBII compiler error:
> Assembler: undefined label error.
> Define this label.
> I don't understand the lea instruction, or how I should "define" the label
> storageblock, if that is it. Dim-ing it doesn't seem to be the answer. By
> the way, I am setting up the gestalt handler in an FBII INIT, and later
> calling FN GESTALT in FB^3. Here is the rest of the code.
> Thanks. Anders