TIP: Click on subject to list as thread! ANSI
echo: cis.os9.68000.osk
to: Jack Crenshaw 72325,1327 (X)
from: Jack Crenshaw 72325,1327
date: 1991-01-06 21:12:09
subject: #9049-#68000 ASM Language

#: 9050 S12/OS9/68000 (OSK)
    06-Jan-91  21:12:09
Sb: #9049-#68000 ASM Language
Fm: Jack Crenshaw 72325,1327
To: Jack Crenshaw 72325,1327 (X)

[Continued]

I have mixed emotions about this, though.  For one thing, if the idea of an
assembler is to produce a 1-to-1 correspondence between source code and object
code, this is violated if you allow expressions.  Not only that, but it might
not be immediately obvious that multiple instructions are going to be
generated.  And it would take someone who _REALLY_ knows assembler language to
know when one instruction will be generated, and when it can't be.  It seems
that if the "compiler" is going to expand the code and produce what is surely
likely to be more inefficient code than the programmer can do, you should at
least give him some warning message that you've done the expansion.

Too, once you get into general assignment statements, you have to use some
intermediate storage .. either register, stack, or memory.  And this might walk
over the programmer's plans for register assignments.

Finally, it's HARD!  It turns out to be a lot more difficult to write a
HOL-like assembler than a HOL compiler, itself.  The reason in that the
compiler writer can make his own decisions as to register assignments,
parameter-passing conventions, etc., and enforce them autocratically.  With a
"pseudo-assembler," you have to honor the programmer's choices. Also, the
compiler author is allowed to use a subset of the CPU instruction set, while
the assembler writer must support them all.

[More]



There is 1 Reply.

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.