Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!cbmvax!carolyn From: carolyn@cbmvax.UUCP Newsgroups: comp.sys.amiga Subject: Re: Amiga good for hacking?? Message-ID: <1527@cbmvax.cbmvax.cbm.UUCP> Date: Tue, 10-Mar-87 17:22:28 EST Article-I.D.: cbmvax.1527 Posted: Tue Mar 10 17:22:28 1987 Date-Received: Wed, 11-Mar-87 20:52:46 EST References: <2719@well.UUCP> <2705@jade.BERKELEY.EDU> <370@batcomputer.tn.cornell.edu> Reply-To: carolyn@cbmvax.UUCP (Carolyn Scheppner CATS) Distribution: world Organization: Commodore Technology, West Chester, PA Lines: 82 In article <370@batcomputer.tn.cornell.edu> hsgj@batcomputer.UUCP (Dan Green) writes: >NOTE: This note is *not* meant to start compiler arguments. > >Lattice is always flamed for producing large code. For instance, a >file compiled with Manx might be 10Kbytes, whereas the executable >from Lattice might be 25K. Those of us who have Lattice can get >around this shortcoming by simply not including the Lattice lc.lib >"library", and linking with AStartup.obj instead of Lstartup.obj. > >What you lose is stdio... mult and divides... string functions Not so. 1. stdio Astartup.obj sets up the AmigaDOS filehandles stdin, stdout, stderr. These can be referenced as external LONGs in your code, or you can use them automatically with the some abbreviated stdio functions which are built in to Amiga.lib. Amiga.lib contains a printf() which works fine with %lx, %ld, and %s. It's a bit weird with %c (I think you must use %lc) and it does not handle floating point. Amiga.lib also contains a getchar(). I get along fine with these two stdio functions. Astartup (unlike Lstartup) does not open an stdio window when a program is started from WorkBench. I wrote a modified Astartup called TWstartup which does open an Amiga stdio window on WorkBench, using a console spec defined in the application. This startup is also handy for non-stdio applications while debugging things like WB argument handling and reading of ToolTypes, etc. There is a new 1.2 version a Astartup which handles quoted command line args in a manner more consistent with the parsing done by the BCPL CLI commands. My current TWstartup is built upon this version. Both Astartup and TWstartup (.asm and .obj) are on the release version of the 1.2 Readme disk in the "1.2 Native Developer Update". The update is a four disk set available directly from CBM. - 1.2 Includes, Amiga.lib, fd's - 1.2 Stripped Includes - 1.2 Autodocs (demo Infominder format) - 1.1 Readme disk (demo InfoMinder, demo InfoMinder format Readmes, ARC'd text Readmes and Autodocs, 1.2 function offset tables, 1.2 Astartup and TWstartup) To order, send check for $20 made out to Commodore Business Machines to: Kim Montgomery Software Tech Support CBM 1200 Wilson Drive West Chester, PA. 19380 Be sure to specify what you are ordering, and include your name/address. 2. mult and divide The Lattice compiler does require LC.lib to do non-power-of-two division and multiplication. But you can link with LIBRARY Amiga.lib, LC.lib and get those routines from LC.lib without taking too big a hit in code size. 3. string functions Same goes for string functions. Link with LC.lib second if you want to use Lattice's string functions. Check out the Addison-Wesley Rom Kernel Exec manual for a description of the C support functions in Amiga.lib. I only use printf() and getchar() but there are others. And remember that to use Astartup or TWstartup, you must use the -v flag on LC2 to disable Lattice's insertion of stack-checking code. (That code requires _base and _xcovf in Lstartup) -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Carolyn Scheppner -- CBM >>Amiga Technical Support<< UUCP ...{allegra,caip,ihnp4,seismo}!cbmvax!carolyn PHONE 215-431-9180 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=