Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rochester!rutgers!lll-lcc!well!ewhac From: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) Newsgroups: comp.sys.amiga,comp.misc Subject: Re: Another 1.3 wish. Message-ID: <3664@well.UUCP> Date: Mon, 3-Aug-87 05:36:54 EDT Article-I.D.: well.3664 Posted: Mon Aug 3 05:36:54 1987 Date-Received: Tue, 4-Aug-87 01:49:33 EDT References: <8707190424.AA10158@cogsci.berkeley.edu> <434@sugar.UUCP> Reply-To: ewhac@well.UUCP (Leo (My glasses have gate arrays) Schwab) Followup-To: comp.misc Organization: Chrysler/GM, Makers of the 6000 SUX. Lines: 68 Summary: Really about machine code. Xref: mnetor comp.sys.amiga:7051 comp.misc:907 [ Followups redirected to comp.misc, where they like to talk about such things. ] In article <434@sugar.UUCP> peter@sugar.UUCP (Peter da Silva) writes: >[Flame-throwers on "stun", captain] > >And why explain in 68000 code? [ ... ] >I bought this machine because the operating system requires an absolute >minimum mucking about in assembly. Ther's no reason on god's green earth >why that code had to be in assembly. [ ... ] >Right. da Silva's rule #0x7FFE: if conversion of some example from assembly >to some high level language is easy, then it should have been expressed >in high level language in the first place. > AHEM! I am of the opinion that assembly code is *not used enough* these days. The assumption that high-level languages are "good enough" simply does not jibe with me. Expressing a new or complicated algorithm in a high-level language is a useful endeavor. It allows you to clearly formulate and express the problem/procedure in machine-interpretable form. However, once you have the basic algorithm down, your next step should logically be to translate that algorithm into assembly by hand. Compilers can do a good job, but never as good as a human. I point to accomplishments of the past. SpaceWars fit in 4K of core on the PDP systems (as I understand it). I have a copy of a very powerful music program for the 8080 that runs in 4K. I have a copy of an 8080 BASIC interpreter that has multi-line user-defined functions, IF-THEN-ELSE, automatic structure indenting, error trapping, formatted I/O, and matrix functions. It's 15K in size, and runs great in 32K. Sonix is all assembly code, and its core is 29K in size (I think). Meanwhile, MicroSlush is proud of the fact that the core of their AmigaBASIC interpreter runs in "only 80K" of RAM. Truly pathetic. I'm not knocking high-level languages. I use them a lot, and would be very lost without them. In fact, if you know how a particular compiler behaves, you can get some very efficient code out of it. But it should be agreed that assembly has its place in the world, and should not be arbitrarily poo-poohed. I really should hone my 68K assembly skills. I think I'm getting lazy.... >Fear not, you're in good company. Donald E. Knuth (yes, that Knuth) is one >of the worst offenders. His "Art of computer programming" is almost useless >for day-to-day use because of "MIX". [ ... ] You didn't read his introduction to the book. It's a cookbook of algorithms, with sample implementation in a hypothetical language. It's up to you to translate the *algorithm*, not the code, over to what you want. I suspect he invented a hypothetical language to force his readers to use the algorithms he presented, not just his code. If he'd written it in Pascal or something, people would be tempted to drop the code into a machine unmodified, and they wouldn't learn anything. Anyone can transliterate code, but can you use the *algorithm*? Final note: This is not a personal attack. I simply feel that assembly code should be used more often than it is currently. _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ Leo L. Schwab -- The Guy in The Cape ihnp4!ptsfa -\ \_ -_ Bike shrunk by popular demand, dual ---> !{well,unicom}!ewhac O----^o But it's still the only way to fly. hplabs / (pronounced "AE-wack") "Work FOR? I don't work FOR anybody! I'm just having fun." -- The Doctor