Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!usc!apple!well!farren From: farren@well.sf.ca.us (Mike Farren) Newsgroups: comp.sys.amiga.programmer Subject: Re: Lemmings - a tutorial Part V (last) Message-ID: <24056@well.sf.ca.us> Date: 6 Apr 91 05:33:23 GMT References: <1991Mar31.003933.1483@mintaka.lcs.mit.edu> <1991Apr1.020748.26863@mintaka.lcs.mit.edu> Lines: 69 mykes@amiga0.SF-Bay.ORG (Mike Schwartz) writes: >your standard printf("Hello, world\n") program is huge. printf, in its full form, is huge. It's quite complex once you add all the different data types, formats, justifications, etc. I've seen asm printf implementations, and they're huge, too. (That's not to mention the overhead involveed in adding in the floating point math libraries, which standard printf requires.) >Why is the best compiler on the Amiga run the bejeezes slow? In my >experience, your development cycle (edit/compile/link/run/debug and >repeat all the above) is critical to your productivity. Don't know. Mostly because they all come from old technology, I'd suspect, plus some of them are incredibly comprehensive. >fWhy isn't something like LightSpeed 'C' available for the Amiga? It >flies and generates awesome code. I tried LightSpeed. Nice compiler, enormous disk hog, very, very quirky, absolutely non-standard. I wouldn't switch. >Why hasn't someone made the entire c.lib into a loadable library >so all programs can share it instead of duplicating these routines >hundreds of times all over everyone's hard disks? Why not even >just printf.library (this alone would save megabytes on my hard disk)? You could do this - but it's hard enough to guarantee that something like arp.library is on everyone's disk, let alone a c.lib.library. Besides, there is no "standard" c.lib - although the ANSI standard one probably will be in a decade or so. >Why don't 'C' compilers support linkerless usage? A) You have to link in the library routines SOMEWHERE. B) With the linker, you have much more flexibility in how you put your final program together. C) Most "linkerless" implementations of anything just incorporate the linker into the compiler/assembler/whatever - it's still there, but hidden. >Why don't 'C' compilers know about the routines in the OS without >#pragmas? While we're at it, why not all the structures and other >things from the header files, too? Standards. They could know about OS routines - but then standards would be out the window. Besides, #pragmas allow you to easily make the OS routines inline calls, instead of having to pass all the args on a stack, "destack" them and stuff them into registers, and only then call the OS. If you had to incorporate all of the information in all of the header files into a C compiler, it would be an incredible pig, both in loading and in running. Symbol searches, in particular, would kill you. >Why do 'C' programmers ask me whether I use: > MULU #17,d0 >instead of: > move.l d0,d1 > lsl.l #4,d0 > add.l d1,d0 >when it is basic programming normally done by assembler language >programmers (one of the oldest tricks in the book)? Yeah? Then how come every would-be assembly language programmer I've ever worked with has had trouble understanding shift-add multiplication, let alone something like Booth's algorithm? It might be one of the oldest tricks in the book, but most assembly programmers only read Abacus books :-) -- Mike Farren farren@well.sf.ca.us