Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ihnp4!chinet!steinmetz!jesup From: jesup@steinmetz.UUCP Newsgroups: comp.sys.amiga Subject: Re: Amiga good for hacking?? Message-ID: <1292@steinmetz.steinmetz.UUCP> Date: Wed, 11-Mar-87 16:32:27 EST Article-I.D.: steinmet.1292 Posted: Wed Mar 11 16:32:27 1987 Date-Received: Fri, 13-Mar-87 23:56:40 EST References: <2719@well.UUCP> <2705@jade.BERKELEY.EDU> <370@batcomputer.tn.cornell.edu> Reply-To: jesup@kbsvax.steinmetz.UUCP (Randell Jesup) Distribution: world Organization: General Electric CRD, Schenectady, NY Lines: 47 In article <370@batcomputer.tn.cornell.edu> hsgj@batcomputer.UUCP (Dan Green) writes: >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. With the new -b option (based-relative) code, and the -r option (pc-relative jsr's), Lattice code is the same size or smaller, except for libraries. The libraries in 3.10 (You DO have it, don't you?) are much more granular than 3.03. The other problem is that the default lattice startup code includes sdtio, even if you yourself don't. It can be recompiled with the -dTINY option to remove such things. >Losing the >string routines (strcpy,strlen, etc) is a shame, but these are >easy to write. You don't have to lose them! Just put amiga.lib BEFORE lc.lib, and anything it can't find in amiga.lib will be pulled from lc.lib. This also fixes the CXM33, etc thing. WARNING: Amiga.lib has a subset of stdio that assumes stdin and stdout are variables with the AmigaDos filehandles in them. It's printf also wants 'l's before a long value (unlike lattice). This includes characters (%lc). >The real bugger is mult and divides. Lattice *stupidly* handles >these by function calls, (eg CXM33) which are in lc.lib. The amiga.lib >has IMulU() and IDivU() to multiply and divide 16-bit USHORTS, but >this means you have to explicity convert. For example: >x = a * b; ==> x = IMulU( (USHORT)a, (USHORT)b ); See above. >*** FLAME ***: Why does so much of lc.lib get included, even if it >is not used? If this was fixed (by BLINK (the official linker, these >days) or Lattice) all would be well. As said above, get 3.10, use -b and -r (and of course -v), and use smallcode and smalldata in blink. My application went from 47K to 34K just by recompiling with 3.10 (and I already didn't use anything from lc.lib but the string functions and the multiplies). >-- Dan Green Randell Jesup jesup@steinmetz.uucp (rochester!steinmetz!jesup) jesup@ge-crd.arpa