Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!think!mintaka!oliveb!amiga!cbmvax!valentin From: valentin@cbmvax.commodore.com (Valentin Pepelea) Newsgroups: comp.sys.amiga.tech Subject: Re: RKM: Libs and Devs Message-ID: <9410@cbmvax.commodore.com> Date: 21 Jan 90 07:41:01 GMT References: <1990Jan20.042239.12232@athena.mit.edu> Reply-To: valentin@cbmvax.commodore.com (Valentin Pepelea) Organization: Commodore, West Chester, PA Lines: 41 In article <1990Jan20.042239.12232@athena.mit.edu> rlcarr@space.mit.edu (the Wizard of Speed and Time) writes: >I just picked up the new Libs and Devs RKM and typed in the first example >(pp. 7-9). A couple of questions: > >1) there is the line >struct IntuitionBase *IntuitionBase = NULL; > >I was under the impression that Lattice included an IntuitionBase in lc*.lib, Yeah, so? >so that this line should be extern struct etc. etc. The author wanted to automatically initialize the pointer to NULL. The line "extern struct IntuitionBase *IntuitionBase = NULL;" would have been translated to "struct IntuitionBase *IntuitionBase = NULL;" anyway because you cannot auto-initialize externs. >Also, for the program, the compiler options are given as >-b1 -cfist -L -v -w > >Now, -w selects 16 bit ints. Is there any reason this was used? I guess smaller data size, a slight incresed speed are it. > Should it have been -y instead (load A4 with LinkerDB)? What for? A4 get loaded with the LinkerDB upon program entry. You want to use -y only when some of your routines (assembler modules for ex.) trash A4, or when the code is intented to be used by other tasks or interrupts. >Now for the problem. Despite (1) the code compiles and links fine. >However, when I run it, instead of "Our Own Screen" in the title bar, I >get a blank ORANGE titlebar (the screen gadgets ARE drawn and are in their >correct colors). However, the window DOES have "graniteWindow" in its >titlebar. Also, the program works fine and returns all its memory. Look at your typed-in code once again. I think the pointer to the "Our Own Screen" does not get initialized correctly. Maybe you forgot a comma somewhere? Valentin