Re: hla set up for the art of assembly



On Jun 15, 11:43 pm, "Rod Pemberton" <do_not_h...@xxxxxxxxxxxxx>
wrote:


"different"?  Don't you mean similar?  The point was that HLA's syntax is
much more like C and very different from any existing or obsolescent
assembler... x86 or not (i.e., even 6502 assembly was far closer to modern
x86 and NASM than HLA is...).  So, it's easier to adapt from one assembler
to another.  It'd be easier to adapt to C from HLA than from HLA to
(non-HLA) assembly.  It'd be difficult to adapt to Pascal from HLA.


MASM:

mov eax, 0

HLA:

mov( 0, eax );


C:
eax = 0;

Gee, other than the semicolon at the end of the line, it sure looks
like HLA syntax is a whole lot closer to MASM than to C. Rinse and
repeat for every other instruction in the instruction set.






Randall has stated that HLA is _only_ a teaching tool (on numerous
occasions)...  including to me when I suggested it could have a higher
purpose such as a general C assembler.

Uh, please point out where I said that HLA is *only* a teaching tool.
I've certainly said that it was created as a teaching tool, but there
is absolutely no reason HLA cannot be used for other purposes. For
example, I am currently developing software to control a TRIGA Reactor
for General Atomics using HLA. And there are lots of other examples of
real-world applications that demonstration HLA is useful for something
beyond educational purposes.

Okay, so we have to call assembly: "real assembly" because of HLA being
promoted as assembly, but RH calls "real assembly": "straight assembly
language" because he knows HLA isn't "straight assembly language".  

HLA, like MASM and TASM, is a high-level assembly. When I talk about
"straight assembly" (though I've never used that term), I use it in a
derogatory manner -- as in "not as capable as the high-level
assemblers (like HLA, MASM, and TASM)."

Maybe
we're miscommunicating with Randall...  His use of "straight" also implies
HLA is "deviant" assembly at best, doesn't it?  

Yeah, just like MASM and TASM are "deviant" assemblers. Go have your
argument with the MASM and TASM crowd and spare us.

You also have to question,
as I did of RH previously, how well someone is going to learn assembly if
not self-taught in their early teens...  Teaching someone assembly at a such
a late stage isn't going to produce promising results.

Complete B.S.



Not sure how you came to that conclusion from my statements.  I prefer C,
followed by assembly.  All other languages I've tried have limitations or
push additional problems onto the programmer.

You can speak for yourself and, perhaps, your limited ability to use
other languages. You most certainly cannot make such sweeping
generalizations and claim that apply to everyone.

Like I said, it could be useful as a C syntax compatible assembler.

You claim to know C. You claim it is your favorite language. But you
claim that it's syntax is based on C. This doesn't make sense.  

But, I
see no reason why a non-C programmer would embrace HLA...  Do you?  

Anymore than a C programmer would embrace C?

Again, you are dead wrong about HLA being based on C syntax. About the
*only* thing it has in common with C (that is unique to C, and not
available in languages like Pascal, Ada, Modula-2, etc) is conditional
compilation via the #if statement, the #include statement, and comment
syntax. And even the syntax of most of those is significantly
different from C that they wouldn't be sufficient motivation for a C
programmer to "embrace" HLA (on syntax principles alone).

Certainly it is the case that HLA's compile-time language and
declaration syntax is similar to HLLs (Pascal/Ada/Modula-2, btw, not
C). This is certainly a positive thing as it means that someone
learning assembly language via HLA will have an easier time of it.


Don't
you think it's too different from other assemblers?  

And that makes it different from any other assembler (which is too
different from all the others), how?
Is Gas "too different"?
I'm sure MASM users feel that NASM is "too different".

Bottom line is that a mov instruction is a mov instruction. Whether
it's written as "mov eax, 0" or "mov( 0, eax );" what difference does
this really make?

As for the HLL-like statements, what's the difference between

MASM/TASM:

.if eax == 0
.
.
.
.endif


and
HLA:

if( eax = 0 ) then
.
.
.
endif;

(BTW, which one looks closer to 'C' to you?)




Don't you think it's
similar to C?  

Though neither of the above HLL-like statements look like C, I'd argue
that the MASM code is more similar to C.

Don't you think it's too different from Pascal?  

Try Modula-2. You'd get a lot closer.

Don't you
think it's syntax deviates too much from that already standardized by Intel
(and/or AMD) and Microsoft for x86 assembly?  I do.

MASM/TASM are the only two assemblers that come close to using the
syntax "standardized" by Intel. Yet the code example above suggests
that they use a "C" syntax by your argument.



Is it because HLA provides an easy
entry-point for outsiders to join the sacred ranks of the ASM-cadre??

Are you saying HLA is easier than NASM for assembly?

Perhaps he is not, but I am.
And I'm one of the few people who've ever frequented this newsgroup
that actually has experience teaching assembly language to 1000s of
beginners.


From the HLA examples I've seen, I'd have to wholeheartedly disagree with
you.  They're far closer to C and don't have a nice clean syntax like NASM.

So what is it that makes NASM syntax so "clean"?
The absence of parentheses? The operand order? Please explain how any
of *that* makes any difference whatsoever at all.

The advantages of HLA are easily summed up as follows:

1) The presence of HLL-like control structures ("not pure assembly")
allow beginners to start coding immediately, writing useful programs.
This is particularly useful in courses that have a time limit (e.g.,
10 weeks). The sooner someone starts coding, the more they're going to
learn.

2) The presence of the HLA Standard Library.

3) The Art of Assembly language.




I'm not saying poor syntax is an exceptionally bad thing - I do just fine
with GNU AS and GCC's inline assembly.  But, the poor syntax wastes my time,
creates confusion, leads to errors, etc.

Interesting. It is exactly HLA's syntax that helps catch a lot of
errors. You see people complaining all the time, for example, about
type checking in assemblers like MASM, TASM, and HLA. Yet type-
checking clearly helps catch errors.

Certainly, you are not used to HLA's syntax. And you have a vested
interest in NASM. However, the fact that you don't know HLA (and its
syntax) hardly qualifies as "proof" that it is a "poor" syntax.
Granted, it causes you confusion because you don't know it, and
reading HLA syntax wastes your time because you don't know it, but the
same exact thing can be said about NASM syntax with respect to someone
who doesn't know NASM.



I still recall a friend who wouldn't stop talking about LISP.  Months and
months of LISP...!  Six to eight months later, I very reluctantly asked
about LISP.  He wasn't raving anymore.  He was upset: "Lost In Stupid
Parenthesis"... mumble... mumble...  He wanted to make simple change to his
code, but he couldn't figure it out.  I then learned he'd been trying to fix
the problem for about week.  Last I heard, he had to rewrite it all - to fix
one simple problem.  This is just one of many examples about the problems
that arise from poor syntax.

And you think that people programming in NASM don't suffer from such
problems? Pick any other assembler if you don't like NASM. Truth is,
most people who spend six to eight months programming in HLA really
like it. If you don't believe me, visit the AoA/HLA Yahoo programming
group some time. 

FORTH, while free from syntax error messages,
is another language where insufficient context from lack of syntax can be
confusing.  It's frequently quite difficult to understand - it's not much
more than an AST.  A couple of nested IF-ELSE-THEN's will do it for most
people (There's no real way to tell which ELSE block goes with which IF
without rewriting the code in an indented style since there is no syntax.).
The lack of variables for others (Hey, they're _all_ on the stack...
Typesystem?  What typesystem?  That'll knock a few C heads for a loop!).

Basically, all you're saying is that if you don't know the language
real well, it's confusing and a source of errors. No surprise there.
But if you're going to knock all these languages (HLA included),
wouldn't it be better for you to *learn* the language first so you
have an informed opinion? Forth and LISP are great languages for
their intended purpose. Just like most programming languages out
there. The fact that *you* don't know a language doesn't mean that the
syntax is bad or that the language is prone to errors; that's more a
indictment of your capabilities with the language rather than the
language itself.
hLater,
Randy Hyde


.



Relevant Pages

  • Re: My view on this "Is blah an assembler"
    ... > HLA is Randall's attempt to redefine source language and assembly ... I consider HLA a failure in this regards as it makes ... really...does anyone here except for Randy and a few others ... if Randy had modelled it after a COBOL-like syntax then it ...
    (alt.lang.asm)
  • Re: HLA v1.93 is now available
    ... How can the C language be beside itself?? ... It has always been clear that when Rene says "that C-side toy" he is ... two attacking HLA and has spent very little time attacking MASM. ... from HLA to other assemblers (not just FASM, ...
    (alt.lang.asm)
  • Re: HLA History
    ... >> meaning of the brackets in the Intel Syntax. ... NASM uses a more "traditional" assembly language syntax. ... People claiming that their assemblers are "Intel Syntax" compatible ... suitable for handling HLA output. ...
    (alt.lang.asm)
  • Re: hla set up for the art of assembly
    ... It'd be difficult to adapt to Pascal from HLA. ... That's the exact syntax of procedure call in C... ... language" because he knows HLA isn't "straight assembly language". ... you think it's too different from other assemblers? ...
    (alt.lang.asm)
  • Re: The excellent HLA LIB
    ... I didn't pick on the syntax:) ... assemblers" do procedures differently? ... assumptions about HLA without even *learning* enough about HLA to know ... you call it "Natural Syntax Desired for Assembly Programming"? ...
    (alt.lang.asm)