Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!jarthur!nntp-server.caltech.edu!toddpw From: toddpw@nntp-server.caltech.edu (Todd P. Whitesel) Newsgroups: comp.sys.apple2 Subject: Re: Computer capabilities Message-ID: <1991Jan2.060637.7936@nntp-server.caltech.edu> Date: 2 Jan 91 06:06:37 GMT References: <325@generic.UUCP> <10827@ucrmath.ucr.edu> Organization: California Institute of Technology, Pasadena Lines: 40 rhyde@ucrmath.ucr.edu (randy hyde) writes: >I really laugh when someone tells me that there is not reason to use >assembly language because optimizing "C" compilers are so good. They tell >me that their "C" compiler produces code which is only 25% slower and 50% >larger than a corresponding assembly language program. I then turn around >and reimplement the program so it requires half the space and runs 5-10x >faster than the comparable "C" program. I agree with you in principle on this, but in many cases the real issue is development time vs. code qualities. I find that I often write in C as much as possible (even with Orca/C on the GS, BTW) and use assembly only when speed or compactness are important. Examples would be screen-clearing loops (speed) and simple functions like XBA which are ludicrous when compiled but are quite nice when a quick asm{} statement is used to add in-line assembly code. >As for the architecture of the 65xxx vs. 8088 being good for compilers- >the 8088 has a BP register which makes it easy to access parameters and >local variables on the stack. The 65c816 doesn't have (and desparately needs) >this. Orca/C uses the direct page for this. A seperate register would be better. >A top of stack addressing mode, like the 68000 and 32000 have, would also be >incredibly useful to compiler writers. 1,s and (d,s),y are available. However, I would have preferred a [d,s],y mode instead. >The ability to pop parameters off the stack when returning from a subroutine tsc clc adc #n tcs Isn't THAT bad, but aesthetically I agree with you. Todd Whitesel toddpw @ tybalt.caltech.edu