Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!ux1.lbl.gov!beard From: beard@ux1.lbl.gov (Patrick C Beard) Newsgroups: comp.sys.mac.hypercard Subject: Re: Hypercard & LSC C 3.0 Message-ID: <1156@helios.ee.lbl.gov> Date: 20 Oct 88 18:39:18 GMT References: <12943@oberon.USC.EDU> Sender: usenet@helios.ee.lbl.gov Reply-To: beard@ux1.lbl.gov (Patrick C Beard) Organization: Lawrence Berkeley Laboratory, Berkeley Lines: 35 And, here is the example code for how to set up A4 from withing an XCMD: -------- /* ExampleXCMD.c -- bare minimum LSC 3.0 XCMD */ #include /* for global access */ #include "HyperXCmd.h" /* globals */ Handle returnValue=nil; /* set this if something is to be returned */ #define OpenGlobals() RememberA0(); SetUpA4(); #define CloseGlobals() RestoreA4(); /* entry point */ pascal void main(paramPtr) XCmdBlockPtr paramPtr; { OpenGlobals(); /* we now have access to our globals! */ DoXCMD(paramPtr); /* whatever this XCMD does */ /* check to see if we should return any value */ if(returnValue) paramPtr->returnValue=returnValue; CloseGlobals(); } -------- I hope this helps. Patrick Beard Lawrence Berkeley Laboratory beard@ux1.lbl.gov