[futurebasic] Re: [FB] MacsBug

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : September 2001 : Group Archive : Group : All Groups

From: Pete <furbies@...>
Date: Sat, 29 Sep 2001 03:39:12 +1000
Alain Pastor on 28/9/01 11:08 PM  scrawled:

> Pete wrote:
>> 
>> I'm writing an .INCL that will allow me to determine if MacsBug is
>> installed, and if it is, then I can call some debugging FNs.
>> 
>> What I'm having trouble with, is determining if MacsBig is
>> installed/running.
>> 
> 
> Pete,
> 
> Is it really necessary nowadays to test for the 24 bit addressing mode?
> According to your explanation and a visit to the Apple universal
> headers, I would try something like this:


> 
> clear local mode
> local fn MagsBugEstaInstalado
> dim @ respuesta  as long
> dim   bandera    as unsigned byte
> 
> long if [_Macjmp] > 0
> long if fn Gestalt(_gestaltAddressingModeAttr, respuesta) = _noErr
> long if (respuesta and _gestalt32BitAddressing%) != 0
> bandera = |0x0BFF|
what does the line above & the line below mean ?


> xelse
> bandera = |[_Macjmp]|
> end if
> end if
> end if
> end fn = (bandera != 0) and ((bandera and 0xe0) == 0x60 )
> 
> long if fn MagsBugEstaInstalado
> print "Puede llamar a MacsBug cuando quiera"
> xelse
> print "Lo siento pero no MacsBug para usted"
> end if
> 
> do
> until fn button
> 
> 
> I'm not a bit twidler and I cannot guarantee that the conversion is
> correct. All I can say is that it gives the good result on my configuration.
Pete...                             (the other one)