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: 1990-12-27 23:53:51
subject: #8920-#68000 ASM Language

#: 8921 S12/OS9/68000 (OSK)
    27-Dec-90  23:53:51
Sb: #8920-#68000 ASM Language
Fm: Jack Crenshaw 72325,1327
To: Jack Crenshaw 72325,1327 (X)

[Continued]

A little history: Several people have tried to do similar things with
assemblers.  One notable is by Ed Ream, author of the editor "red."  He came up
with a unique approach, which was to make the assembler look like legal K & R
C.  In other words, expressions like
       d0 += d1; are perfectly legal C expressions.  In fact, Ed's anguage was
such a proper subset of C that it would compile under a C compiler (with the
identifiers d0, d1, ... d7, a0, a1, ... a7, etc. just compiled as normal
variables. (Not sure how Ed handled the size issue.  Maybe I'd best go back and
take another look.)

Only one problem:  The assembler ran slower than Christmas, and some of the
constructs were pretty weird.

Another fellow did the same thing for the Z-80 ... using C-like constructs. His
program was really just a preprocessor, and also too slow to be much use.  But
the worst problem was some of the instructions.  For example, the Z-80 LDIR
(load, increment, and repeat) instruction translated to the following C code:

       while(bc--){*de++=*hl++)

Frankly, it's a lot easier for me just to type LDIR!

I concluded from all this that it's a bad idea to try to warp the assembler to
fit an existing language like C.  Better to start with a clean slate. (one more
message, I promise)

[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™.