Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!ucbvax!ucsd!helios.ee.lbl.gov!ux1.lbl.gov!beard From: beard@ux1.lbl.gov (Patrick C Beard) Newsgroups: comp.sys.mac.programmer Subject: Low memory globals from C (Was RE: Finding Screensize under MF) Summary: easier, nicer than macros Message-ID: <4615@helios.ee.lbl.gov> Date: 12 Jan 90 20:51:32 GMT References: <10139@saturn.ucsc.edu> <9429@hoptoad.uucp> <1102@urbana.mcd.mot.com> <10276@saturn.ucsc.edu> <9623@hoptoad.uucp> Sender: usenet@helios.ee.lbl.gov Reply-To: beard@ux1.lbl.gov (Patrick C Beard) Organization: Lawrence Berkeley Laboratory, Berkeley Lines: 16 X-Local-Date: 12 Jan 90 12:51:32 PST In article <9623@hoptoad.uucp> tim@hoptoad.uucp (Tim Maroney) writes: # #To access low-memory globals from C, if you must, you use the macro #preprocessor. For instance, you would say # ##define CurrentA5 (*(long *)0x904) A cleaner way to do low memory globals from THINK C is the ':' notation. extern Ptr CurrentA5 : 0x904; This method gives you do type checking if you want. ------------------------------------------------------------------------------- - Patrick Beard, Macintosh Programmer (beard@lbl.gov) - - Berkeley Systems, Inc. "..............Good day!" - Paul Harvey - -------------------------------------------------------------------------------