A83: Re: Asm God???


[Prev][Next][Index][Thread]

A83: Re: Asm God???




Perhaps he forgot to take it out.  Perhaps you dissassembled it incorrectly,
or he was using self modifying code.  Or perhaps it was one of his first
programs and he didn't want to be embarassed by releasing the source.
Another thing to remember is not all good programmers optimize every byte
out of their code just because they can.  Some people just write code that
works, and can write code fast.  Why spend an hour optimizing a routine to
save 10 bytes?  If you like to do that, then fine.  But for some people,
they couldn't care less.  By not releasing source code, you can free
yourself of that.

I've seen code that Clem has written and said wasn't optimized, and I could
find many things that could be sped up (opcode-wise) or made smaller.  But
who cares?  Working, stable code is much better than half-finished, well
optimized code.  And Clem is one of the best assembly programmer's I've met.
If you program a lot of assembly languages, or don't use one a lot, you
forget the little tricks of a certain language.  I've seen many things to
optimize in Z80 code that Rusty writes, but that doesn't mean it's a
mistake.  As he says, only optimize where it matters.  Do you bother to
optimize code for a PC?  Algorithms, yes, usually, if it doesn't make the
code more difficult.  But the actual code?  No.  Why bother, for a computer
running at several hundred megahertz?  Why can Rusty write stuff in the 3
days that might take me a month (not talking asm)?  Because writing heavily
optimized code just because you can and writing excellent programs is
something completely different.

Just my thoughts.

>   This comes to show that even the great asm
> programmers can make mistakes.
>
> Here is a little excert from Bill Nagel's ZPWORD.  He
> didn't included the source so I had to disassemble it.
>
>
>      pop  de
>      inc  e
>      jp   Label5
>      ret




References: