Are there other HLAish compilers around? 
Author Message
 Are there other HLAish compilers around?

Out of curiousity, are there other compilers like HLA that are built
from the ground up to provide an HLLish interface to assembly language?
Yes, I know that MASM & TASM have features for this, but we are talking
design from the ground up.

--

Team2k PC/Palm Pilot Programming Team:
http://www.*-*-*.com/

To email me, remove '3*&' from my email address. This is to deter spam
:)



Wed, 13 Nov 2002 03:00:00 GMT  
 Are there other HLAish compilers around?

Quote:
> Out of curiousity, are there other compilers like HLA that are built
> from the ground up to provide an HLLish interface to assembly language?
> Yes, I know that MASM & TASM have features for this, but we are talking
> design from the ground up.

I have "Structured Microprocessor Programming" by Morris Krieger et al
[Yourden 1979] which describes SMAL/80. a language for 8080 and 8085
microprocessors.  To quote from the book:

1. It is a compiler rather than an assembler.

2. It incorporates the three basic structured-programming constructs--the
DO-END, IF-THEN-ELSE, and LOOP-REPEAT.

3. It has an indented, symbolic notation similar to that used in such
high-level languages as Algol, Pascal, and C.

Here are some examples comparing standard Intel 8080 mnemonics versus
SMAL/80:

        Intel                   SMAL/80
        ------------    ------------
        ADC B                   A = A + B + CY
        CMP C                   A : C
        CNC addr                IF NOT CY CALL addr
        DCR D                   --D
        INR E                   ++E
        JNZ addr                IF NOT ZERO GOTO addr
        MOV A,H         A = H
        MVI L,data              L = data
        SBB D                   A = A - D - CY
        SUB B                   A = A - B
        XRA E                   A = A XOR E

Here is a bubble sort in SMAL/80:

BUBBLE:
   LOOP;
      D = 0;                        /* reset flag for this loop iteration
*/
      A = M(TALLY);                 /* load number of list elements */
      B = A;                        /* into B */
      HL = ARRAY;                   /* point to beginning of array */
      LOOP;
         IF --B ZERO                /* if no more pairs left */
            BREAK;
         A = M(HL);                 /* else, get first item of pair */
         ++HL;                      /* and increment pointer */
         IF A : M(HL) NOT CY THEN   /* if first item is bigger */
            IF NOT EQUAL THEN       /* if two numbers are the same */
               DO;                  /* do an exchange */
                  C = M(HL);
                  M(HL) = A;
                  --HL;
                  M(HL) = C;
                  ++HL
                  D = 1;            /* set 'switched' flag */
               END;
       REPEAT;
    REPEAT WHILE [A = D; A = A OR A] NOT ZERO;
 RETURN;

The Motorola M68000 Family Structured Assembler is marvelous.  I used it
around 1988 on a Motorola VERSAdos system to write code for an embedded
system.  The code looks like standard assembly language, but there are
structured programming constructs.  Here is a piece of actual code from the
system (it is a fancy data mover.  I have removed the comments to protect
the guilty):

    MOVE.L (A2)+,(A1)+
    REPEAT
        MOVE.W (A2)+,D0
        IF <PL> THEN.S
            MOVE.W D0,D2
            LSR.W  #8,D2
            IF.B D0 <HS> (A3,D2.W) THEN.S
                MOVE.W D0,(A1)+
                MOVE.W (A2)+,D0
                WHILE <PL> DO.S
                    MOVE.W D0,D2
                    LSR.W  #8,D2
                    IF.B D0 <HS> (A3,D2.W) THEN.S
                        MOVE.W D0,(A1)+
                    ENDI
                    MOVE.W (A2)+,D0
                ENDW
                MOVE.W D0,(A1)+
            ENDI
        ENDI
    UNTIL.L A2 <HS> A0

I wrote a preprocessor for 6502 assembly language.  It was heavily
influenced by the Motorola assembler above, but the 6502 is not as easy to
program as the 68000 so my preprocessor is much more limited in what it
does.  It allows indentation and only generates branches and labels, which
I found to be all I really needed for my own use.

--

Paul R. Santa-Maria
Ann Arbor, Michigan  USA



Wed, 13 Nov 2002 03:00:00 GMT  
 Are there other HLAish compilers around?
Al,
     There are plenty of assemblers with a HLL like interface; just not on
Intel processors!

(1) VAX-MACRO:    Designed for the CISC chips used in the VAX series of
computers.  MACRO-32 (the other name for VAX-MACRO) allows very
sophisticated addressing schemes; usually just the domain of HLLs.  A
VAX-MACRO program looks practically like all the other VAX languages; BASIC,
C, COBOL, fortran, Pascal.

(2) BLISS-32:    Officially a HLL.  However BLISS is the HLL interface
language for VAX-MACRO, so it looks the same; it's a compiler really, for
the assembled language that looks like a HLL anyway.

        I work on Alpha systems, but I've never written anything in
MACRO-64; the Alpha assembler.  MACRO-32 is still available on the Alpha
series; it's compiled, but looks just like the assembled version, on VAX
computers.  BLISS is also available; BLISS is slightly different looking
then MACRO, so it was worthwhile to make a BLISS compiler as well for the
Alpha.

(3) MI:        The "assembler" for OS/400.  MI stands for Machine Interface,
and it's a compiled language.  MI is called the assembler for the AS/400
(OS/400 being the operating system) because it's the assembler for the
AS/400 architecture, which is defined in High Level Language terms;  RPG.
IBM doesn't supply the instruction set for it's AS/400 models, so the
"instruction set" of MI is as low level as you can get on the AS/400.  MI is
somewhere between C and the actual instruction set of actual processor, as
far as HLLness goes.

(4) A86:    An Intel (x86) assembler; so I lied about there not being any
HLL like assemblers for Intel processors; but not by much.  A86 (I've never
written anything in A386, but a beta version came with my copy A86/D86) was
written by Eric Isaacson as a better ASM86 assembler.  In the accompanying
documentation E.I. states that he made concessions to structured programming
techniques  when writing A86; there's your HLLnes.  I was able to convert
one of my own programs (several thousand lines of code) from MS QuickBASIC
4.5 to A86 without too much trouble (I had a lot of time on my hands back
then).

There's a shareware assembler called ASIC that bills itself as almost BASIC.
It looks like an assembler with BASIC vocabulary; still has a lot more of a
HLL feel then most assemblers.  I messed around with ASIC but never wrote
anything with it so I didn't send the author the $25.00 he was asking for (I
think that was the cost).  I did write a full blown program with A86 so I
sent Eric Isaasson the $80.00 he requested; support the shareware concept.

                                                                        Dave



Wed, 13 Nov 2002 03:00:00 GMT  
 Are there other HLAish compilers around?

Quote:

> Out of curiousity, are there other compilers like HLA that are built
> from the ground up to provide an HLLish interface to assembly language?
> Yes, I know that MASM & TASM have features for this, but we are talking
> design from the ground up.

This doesn't really apply to "from the ground up", but for instance gcc
has many features which are definitely "High Level Assembly". For
instance:

- extended inline asm:

you can specify a macro like

#define getflags(eflags) \
asm volatile ("pushfl; pop %0" :"=rm" (eflags));

This specifies that the variable you want to pop the flags into can either
be a register or in memory.

So than you can anywhere in your C-code do

getflags(flags);

and have your cpu-state at that point.

- specifying registers for variables

register int *foo asm ("b");

connects EBX to foo, so wherever foo is used the register EBX is used, and
EBX is reserved to apply to foo unless the compiler knows foo is not
"live" or it is declared as a global variable. The latter might be a bit
difficult to do on x86's, though.

Of course this does not at all have the aims that Randy has for HLA,
doesn't it? It is more for being able to circumvent C's limitations and
tweak it where it is needed or gives you that extra performance.

If you don't mind C in the first place, of course.

Bart



Thu, 14 Nov 2002 03:00:00 GMT  
 Are there other HLAish compilers around?

Quote:
> Out of curiousity, are there other compilers like HLA that are built
> from the ground up to provide an HLLish interface to assembly language?

Try c-- (yes, it is such a thing ;)
It is basicly 16 bits assembly (i dont remamber that it had 32 bits opcodes
atleast) with sortof HL syntax. like IF ax = 40h then blah blah..
Search www.hornet.org for C-- (its under
http://www.hornet.org/code/utils/compiler/ )

Cvore of kamelite



Fri, 15 Nov 2002 03:00:00 GMT  
 Are there other HLAish compilers around?
Take a look at Jim Neil's TERSE language.
While the programming paradigm is closer to APL than Pascal,
it is definitely a higher level assembly language.  Like HLA, it
compilers to assembly code;  code generation modules are
available for all the popular assemblers.
Randy Hyde



Quote:
> Out of curiousity, are there other compilers like HLA that are built
> from the ground up to provide an HLLish interface to assembly language?
> Yes, I know that MASM & TASM have features for this, but we are talking
> design from the ground up.

> --

> Team2k PC/Palm Pilot Programming Team:
> http://ppilot.homepage.com

> To email me, remove '3*&' from my email address. This is to deter spam
> :)



Sat, 16 Nov 2002 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. others f90 compilers (correction)

2. I am looking for a Mac f77 compiler - for free of course :)

3. i am looking for f90 compiler

4. I am having compiler problems with MS FORTRAN 3.31

5. I am not deaf, but am I mute?

6. meeting others through personal ads (advertisement)

7. Book Sale - APL Books and others

8. Stop others from using your computer!!! 3013

9. APL Quote Quad, Vectors and others

10. poolDictionaries and others dictionaries

11. translating &#228; and others

12. I've tried Smalltalk Express, any others??

 

 
Powered by phpBB® Forum Software