#: 9049 S12/OS9/68000 (OSK)
06-Jan-91 21:11:50
Sb: #9042-#68000 ASM Language
Fm: Jack Crenshaw 72325,1327
To: Bud Hamblen 72466,256 (X)
I like it, Bud ... not the syntax, but the idea. The reason I asked was that I
was prepared to say that I'd rather have a separate compiler and assembler.
But if you can mix the two languages in one program, so much the better.
I started down this road by writing a preprocessor for 68000 assembler
language. I did this mainly because I found the 68K control constructs,
branches, etc., too confusing. Every time I use DBcc, I have to think about it
and hand-execute it, and I _STILL_ tend to get it backwards. So I decided to
add Pascal-like control constructs. I had
IF-ELSE-ENDIF
WHILE-ENDWHILE
LOOP-ENDLOOP
DO-ENDDO (uses DBcc)
BREAK
For the conditions, I replaced the 68000 CC's by things like =, !=, <= ,etc.
Carry clear was !cy, etc.
It worked out really nicely, and turned out to be easy to write. Natch, all
control constructs were nestable to any depth. Any other instructions besides
the control constructs just pass right through to the assembler.
I could play around with something like this. I've toyed with the idea of
extending the HOL-like constructs. By that I mean that, if a MOVE X(PC),D0
gets translated as d0=x, then it's a small matter to let more complex
expressions like x = y + z/2 be generated, too.
[More]
There is 1 Reply.
|