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| 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. -- Cheers Alain ----------------------------------------------------- FB^3 in Europe: http://euro.futurebasic.com/ FB II Pouch: http://www.pixmix.com/FB/outils.html -----------------------------------------------------