[comp.sys.mac.programmer] Color hilite

marty@cernvax.cern.ch (hugues marty) (11/23/90)

In system LDEF 0 source you can find :

  LHilite
	 bclr      #7,HiliteMode       ; now in color! <8jun87>
	 MOVE.L    LRect(A6),-(SP)     ; push rect
	 _InverRect                    ; and invert it

I would like to know if it is safe to use this HiliteMode low-memory
global to perform color hilite. Does it work under A/UX where using
low globals should be avoided? I never found any reference to this
HiliteMode byte in IM. Is there any "official" documentation
somewhere?

Hugues Marty.
-- 
e+ ---->?<---- e- :Les Chercheurs de Bosons Unifies: marty@cernvax.cern.ch

andyp@treehouse.UUCP (Andy Peterman) (11/24/90)

In article <3170@cernvax.cern.ch> marty@cernvax.cern.ch (hugues marty) writes:
>I would like to know if it is safe to use this HiliteMode low-memory
>global to perform color hilite. Does it work under A/UX where using
>low globals should be avoided? I never found any reference to this
>HiliteMode byte in IM. Is there any "official" documentation
>somewhere?

I've been using the low-memory HiliteMode for years in a few
applications with no problems.  They continue to run fine under A/UX and
7.0.  In A/UX, they have somehow created a low memory global space
where it's legal to at least read and, in some cases like this one,
write to these globals.  IMHO, I think this will be legal at least until
System 8.0, which probably won't be in our lifetime :-).

Check out IM vol V, page 61-62 for the "official" documentation.

By the way, if you use MPW C 3.0 or newer, you can declare a function
that does the bit clear with the following:

	void HiliteMode(void) = {0x08B8, 0x0007, 0x0938};

-- 
Andy Peterman                       |   Opinions expressed
treehouse!andyp@gvgpsa.gvg.tek.com  | are definitely those of
(916) 273-4569                      |      my employer!

keith@Apple.COM (Keith Rollin) (11/24/90)

In article <3170@cernvax.cern.ch> marty@cernvax.cern.ch (hugues marty) writes:
>
>In system LDEF 0 source you can find :
>
>  LHilite
>	 bclr      #7,HiliteMode       ; now in color! <8jun87>
>	 MOVE.L    LRect(A6),-(SP)     ; push rect
>	 _InverRect                    ; and invert it
>
>I would like to know if it is safe to use this HiliteMode low-memory
>global to perform color hilite. Does it work under A/UX where using
>low globals should be avoided? I never found any reference to this
>HiliteMode byte in IM. Is there any "official" documentation
>somewhere?

It's in Inside Mac V, page 61, according to the index.

-- 
------------------------------------------------------------------------------
Keith Rollin  ---  Apple Computer, Inc.  ---  Developer Technical Support
INTERNET: keith@apple.com
    UUCP: {decwrl, hoptoad, nsc, sun, amdahl}!apple!keith
"Argue for your Apple, and sure enough, it's yours" - Keith Rollin, Contusions