[Coco] 6809 example

Roger Taylor rtaylor at bayou.com
Sun Jan 18 00:19:52 EST 2004


At 01:28 PM 1/17/2004 -0800, you wrote:
Roger:

>Forgive me if this is dumb question, but I'm a programming newbie, but is 
>HLA an intermediate step between Assembly and languages like C and if so, 
>would it have some use in the mainstream market.  It seems like a more 
>essorteric language than the more accepted ones or is it jus new?
>
>Jim

Randall Hyde started writing HLA back when he was a professor and was 
having trouble with his students grasping the normal type of books, 
etc.  It's been used in classes, and it still is I think.  I see students 
come on the list all the time and say they are trying to get a class 
project done and need help.

HLA is older than a lot of the fad languages that keep popping up, and you 
won't find a Microsoft or Borland label on it, so that plays a big part in 
where languages go.  One man can only do so much.  His initial goal was to 
create an assembler that was friendlier than MASM but he got carried away 
and now it is a hybrid low-level/high-level "assembler" as he calls 
it.  Technically (and don't tell him this), it is a compiler.  He can argue 
well about this and he compares HLA to MASM, showing you how many 
high-level control structures are in MASM and ask you what you call them, 
etc. :)   HLA requires MASM to assemble it's output, even though HLA itself 
accepts all of the Pentium, MMX, FPU instructions.  It simply does it nicer 
and then converts things into the raw and ugly MASM format.

No, you won't find any company asking for skill in the HLA area, so right 
now I feel that it's mainly being used by students and guys like me, solo 
work... which is odd because this is an extremely powerful 
language.  There's no way to describe it unless you've looked at about 20 
different source code programs to something Randall has written as examples.

Here's a very simple snip from CCASM that in *no* way shows the power of 
HLA, but does show a little bit of mixed content.
Being able to start with high-level code then work your way down over time 
to pure assembly, is the strength of HLA.

         elseif(str.prefix(Reg2Str, ",pc")) then
                 if (ForcedAddressing=0) then
                         if (ForwardRef=0) then // if target address is 
unknown, force 16-bit
                                 xor(ebx,ebx);
                                 mov(offset,bx);
                                 mov(PC,eax);
                                 add(SetSize,eax);
                                 add(2,eax);
                                 sub(eax,ebx);
                                 if ((type int32 ebx) in -128..127) then
                                         mov(8,ForcedAddressing); // pass 2 
will know about this
                                 endif;
                         else    mov(16,ForcedAddressing);
                         endif;
                 endif;


----------
Roger Taylor






More information about the Coco mailing list