Article View: comp.sys.mac.apps
Article #1392Re: WriteNow 3.0 and assembly language
From: Quinn "The Eskimo!"
Date: Wed, 08 Apr 1992 02:31
Date: Wed, 08 Apr 1992 02:31
49 lines
3404 bytes
3404 bytes
In article <scott.702673933@mcl>, scott@mcl.mcl.ucsb.edu (Scott Bronson) writes:
>
> There is one solid fact that was muddied in the above paragraph. Assembly
> will *always* run at least as fast as the high level language.
^^^^^^
No. Wrong. Incorrect. Error. This is only true if you have unlimited time
to implement your program. If you're stuck on a time budget then you can be
faced with the following problem. You have more than one algorithm that will
solve your problem but you can't figure out in advance (through algorithmic
analysis) which one will go faster. So you must choose: implement one in
assembler or implement a couple in HLL and do some profiling.
OK so this example is contrived but I hope you get the point. Assembler
will always run at least as fast as HLL if you use the same algorithm *and*
you have sufficient time to implement that algorithm in assembler.
> The 680x0 was designed for the assembly language programmer. It's assembly
> is among the cleanest for humans to write, but not so friendly for compilers.
680x0 is nice but it's not that nice. It just doesn't compare to Macro-11 (-:
Can anyone say orthogonality? [More to the point can I spell it?] This
concept of address and data registers is a real *pain*. And all those 16 bit
limits )-: (on the 68000 at least).
Now if you want a truly nice processor designed for writing in assembler check
out the National Semiconductor 32000 series. Yum. I mean the VAX had
"calculate polynomial" instructions but the 32000 has "move string of bytes
using a byte indexed translation table on each byte until you hit a zero (or
until you hit the end of the string)".
And I think you'll also find that some of the current crop of RISC processors
are not that bad on the assembler processor. Certainly I've had a look
at the ARM, 88000, R3000 and Dec Alpha and they were all usable.
Anything with numbered registers (as opposed to AX, BX, etc (-: ) is OK by me.
> Thus, I find that coding up to 40% of your program in assembly is not
> unrealistic and doesn't add too much time do the development process.
On the contrary I find it adds quite a bit of time (although it may well be worth
it). I think that the only sensible way to write in assembly language is to
first write the code in Pascal and then (by hand) recode the Pascal into assembler.
[Kudos to the author of UltraSlimFast.] This gives great confidence in your
program because you know that the algorithm works and that the only errors were
induced by the recode. Also you have a working Pascal version to fall back on
if the wheels fall off and the deadline falls due.
Quinn "The Eskimo!" <quinn@cs.uwa.edu.au> "Real Coke, Diet .sig"
Department of Computer Science, The University of Western Australia
-- Seeing himself doing more assembler as C gets more popular
Technical Details
Message-ID:
<1992Apr8.023144.26793@bilby.cs.uwa.oz.au>Path:
arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!uniwa!bilby.cs.uwa.oz.au!quinn@cs.uwa.edu.auReferences:
<1CE00001.vqm69q@gla-aux.uucp> <5423.29d9c483@hayes.com> <scott.702673933@mcl>Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.mac.apps Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!uniwa!bilby.cs.uwa.oz.au!quinn@cs.uwa.edu.au From: quinn@cs.uwa.edu.au (Quinn "The Eskimo!") Subject: Re: WriteNow 3.0 and assembly language Message-ID: <1992Apr8.023144.26793@bilby.cs.uwa.oz.au> Sender: usenet@bilby.cs.uwa.oz.au Nntp-Posting-Host: eriodon Organization: The University of Western Australia References: <1CE00001.vqm69q@gla-aux.uucp> <5423.29d9c483@hayes.com> <scott.702673933@mcl> Date: Wed, 8 Apr 1992 02:31:44 GMT