order of operands in HLA

From: fabio de francesco (fmdf_at_tiscali.it)
Date: 08/20/04


Date: 20 Aug 2004 08:08:32 -0700

Hello.

As I wrote in this NG some weeks ago, I have been recently started to
learn Assembly by reading AoA and exercising with HLA, and I am
enjoying myself with this powerful language.

However some days ago, I was reading some simple code written in NASM
not being able to understand what it would do. It took a while before
I found out that the order of operands was exactly the opposite
between HLA and NASM, for example "mov(src,dest);" is "mov dest,src".
Then I noticed that GAS uses the second form of syntax too. And If I
am right MASM does the same as the latters.

So, why does HLA use this counter intuitive syntax? Seen that HLA
claims to be easier for HLL programmers to become used to it, itself
should use a syntax that recalls either (Ada) "dest := src;" or
(C/C++) "dest = src;" with destination as a left operand. A different
example from the C library are the functions "memcpy(dest,src,size);"
and "memmove(dest,src,size);".

May be I'm missing something important that explains the design of the
language syntax. Please, does anyone know why this is the way it is?

Thank you all,
Fabio De Francesco.



Relevant Pages

  • 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: AT&T or Intel syntax ?
    ... Gas and HLA require more modification. ... GAS' and HLA's syntaxes "Intel Syntax". ... NASM, and TASM-ideal-mode, user's heart, those brackets. ... TASM "ideal" mode" have deviated from Intel Syntax. ...
    (comp.lang.asm.x86)
  • Re: HLA History
    ... If Nasm didn't already exist, ... > effort writing HLA (then again, ... > constant arrays as well as for memory addressing modes. ... > different, so it's nice to try and use different syntax, too. ...
    (alt.lang.asm)
  • Re: Significant Pure Assembler Application In MASM ?
    ... And if you're going to talk about what happens *inside* HLA, ... don't forget that HLA also produces MASM code and MASM ... "NASM grew out of a discussion on comp.lang.asm.x86 a year or two ago." ... "...that the syntax I've chosen for fasm, ...
    (alt.lang.asm)
  • 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)