Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!husc6!harvard!caip!cbmvax!randy From: randy@cbmvax.cbm.UUCP (Randy Weiner) Newsgroups: net.micro.amiga Subject: Re: Console device question Message-ID: <258@cbmvax.cbmvax.cbm.UUCP> Date: Mon, 19-May-86 15:32:36 EDT Article-I.D.: cbmvax.258 Posted: Mon May 19 15:32:36 1986 Date-Received: Fri, 23-May-86 05:37:03 EDT References: <2563@decwrl.DEC.COM> <151400032@uicsl> Reply-To: randy@cbmvax.UUCP (Randy Weiner) Organization: Commodore Technology, West Chester, PA Lines: 48 In article <151400032@uicsl> hr@uicsl.UUCP writes: > > "...>there is a program called 'cons.c'..." > > "...I have typed and run the program without any problems..." > >I had a lot of problems and I may have found a bug because of >them. I believe the goto labels 1-9 are off by a row. If an Openxxxx >call fails, the program jumps to the matching Closexxxx. Guess what >happens if CloseLibrary is passed a null pointer? I have compiled and run the console example called "cons.c" that is found in the 1.1 version of the Rom Kernal Manual. It works as listed. But, you must make sure that you are running the correct version(s). The compiler MUST be version 3.03 (v1.1) AND, you should be certain that the library files, Amiga.lib and Lc.lib were copied from the V1.1 release disk. This example will not run under V1.0 (3.02)! > >Are the first two OpenLibrary calls necessary? >---- For the dos.library, no. This library is opened by the startup code, either Lstartup.asm or Astartup.asm. You can check this yourself by looking at these files. They may be found on the distribution disk, sub-dir "examples". I don't see any reason for including diskfont.library, there are no calls to the font library. You should be able to remove the reference. In general, I never assume a library base pointer is non-null. Instead, I close as shown: if (dosBase) CloseLibrary(dosBase) etc. etc. -- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Randy Weiner -- Commodore Business Machines <> uucp: {ihnp4|seismo|caip}!cbmvax!randy arpa: cbmvax!randy@seismo (or) randy@cbmvax.UUCP@{seismo | harvard} TEL: 215-431-9180