Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!cwjcc!gatech!bbn!bbn.com!levin From: levin@bbn.com (Joel B Levin) Newsgroups: comp.sys.mac.programmer Subject: Re: Segment Loader and Related Questions Keywords: Segment loader, language interfaces, 32K limit Message-ID: <29711@bbn.COM> Date: 15 Sep 88 19:08:55 GMT References: <369@ajpo.sei.cmu.edu> Sender: news@bbn.COM Reply-To: levin@BBN.COM (Joel B Levin) Organization: BBN Communications Corporation Lines: 28 _DATAINIT is documented at least a little in the MPW manual chapter "Advanced programming tools" under "more about linking" and "segments with special treatment". See also the assembly manual under "Programming for the Macintosh" in chapter 1. There may be something in the C manual, but I couldn't find it. (These are the beta manuals; the real ones are at home.) The C syntax is: extern _DataInit (); . . . UnloadSeg (_DataInit); Don't worry about the [not in ROM] stuff. The libraries get it right. In C you may have a choice of using the C interface or the Pascal interface, depending on how you name routines. If an argument is a string, for instance, the Pascal interface avoids the c-string to p-string conversion. For Toolbox calls the Pascal version gets you an in-line trap; for system calls that pass arguments by registers, you get a different glue routine. If you are using C, Earle Horton wrote a nice set of definitions (originally to help with incompatibilities between THINK C and MPW) which let you easily use the simpler Pascal interface to the toolbox. (let me know if you want a copy -- Earle posted it once, so I guess I can distribute it :-)). /JBL UUCP: {backbone}!bbn!levin POTS: (617) 873-3463 INTERNET: levin@bbn.com