A86: Re: Assembly-86 Digest V1 #873


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

A86: Re: Assembly-86 Digest V1 #873




> Date: Wed, 21 Apr 1999 15:44:24 -0500
> From: "David Phillips" <david@acz.org>
> Subject: A86: Re: Re: Assembly
> 
> WRONG!  You sure you want to debate this?  This is all imho (meaning it's MY
> PERSONAL OPINION and this not a flame), but the AP classes are the worst
> teaching idea ever.  How can you go a whole year in "AP Computer Science",
> take a test that's gives you college credit for the first semester/year, and
> still not know to handle strings or linked lists?
> 
> ...
> 
> Now, you have a almost-perfectly designed Z80 machine with 128k ram (so it
> has a few quirks, has to be a challenge somewhere :) and are graced with a
> full host of development tools, emulators and documentation, allowing you to
> easily and fully enjoy programming it in assembly, and you want to go and
> screw it up by writing a compiler?

Wow. I agree with every single line of this. I too refuse to use
anything I couldn't write myself, or at least understand fully.
I never use the C++ template classes (Array, Vector, etc.), and
I hate MFC and OWL because they produce bloated code.

Now, about making asm easier:
You write programs in asm to make them smaller, faster, and more
capable. Have you ever looked at the output of a basic->asm translator?
It is not smaller, not faster, and no more capable than the original
basic program. The same goes for C compilers. A 'hello world' program
will be at least a few hundred bytes long because of the large run-time
library that the compiler has to add. If you can't write programs in
pure asm, you obviously won't be able to write good, tight, optimized
code that is the whole point
of writing in asm anyway.

If you want to make it easier for people to learn asm, WRITE GOOD
TUTORIALS. Don't make macros that take away the opportunity to squeeze
one more byte out of a routine. Write tutorials that explain what is
going on inside the calculator. For example, if a tutorial explains what
happens when you call a routine (the pc is pushed onto the stack, then
people can figure out for themselves that you can jump out in the middle
of a routine as long as you pop a register pair.

Also, don't forget that asm programming is not for everyone. It's a lot
harder than using ti-basic. A RAD for asm is almost a contradiction. If
you want RAD, use basic. If you want small, fast, good programs, use
asm,
but use it the right way.

(BTW, does anyone have a list of exactly what opcodes affect the flags?)

  David Reiss
  dlreiss@worldnet.att.net


References: