Re: HLA



Rod Pemberton wrote:
"santosh" <santosh.k83@xxxxxxxxx> wrote in message
news:1151774678.062006.88400@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Rod Pemberton wrote:


True. Now think about an inline asm syntax that is very close to C's
grammar. It could be added to almost any C compiler without problems...

I don't think you'll find an x86 assembler with a syntax closer to C's than HLA.

I can't add HLA to a C grammar.

You can't add anything to the C grammar without changing the langauge
itself.

Untrue. All major C compilers have an asm directive. All of GCC's
extensions can be added to the ISO C LALR(1) grammar without any
modifications to the original portions of the ISO C grammar (e.g., see CIL
by Necula, et. al.). Therefore, GCC has numerous extensions without
"changing the language."

When you extend the language you change it.

It's proprietary language restricts its use, i.e., non-conformance with
a
single language grammar such as C or Pascal.

That's true for most x86 assemblers. How well can you integrate NASM or
FASM or MASM into C.

WASM is Watcom/OpenWatcom's version of MASM and they have integrated it into
C with an assembly directive...

And what standard does WASM conform to? Is it not also proprietary (by your apparent definition)?

If every tool in the world bent over backwards to conform to C and
Pascal, the field of programming would be stagnant and lot less
innovative.

True, but the point was about one specific case: HLA. HLA is _almost_
compliant with the C grammar. HLA could be much more useful if it were
fully compliant.

Then it would not longer be an assembler, but a C compiler. But actually, HLA is not even close to conforming to the C standard. Nor should it try to.

I'm not sure you really mean what you are saying here, though.

Not so. I will switch to any language or compiler tool which is:
1) easiest - low syntax, the less I have to remember, lookup, or the
less
likely the grammar contributes to error generation, the better.
2) powerful - the more control I have, the quicker and more accurately I
can
complete things.

Some will claim that 1. and 2. are mutually exclusive, to an extent.

And, they'd be wrong. See FORTH or B (pre-cursor to C). Both of these
languages comply with 1) and 2).

Are you suggesting that B is somehow more powerful than C? As I recall, it had only one type.

You could also compare NASM's clean,
simple, powerful format with that of MASM's or GAS.

Gas is cleaner and simpler, and MASM is far more powerful.

What has GCC's inline asm feature vs. OW's same got to do with
assemblers?

B) This has to do with assemblers because the assembly code is the same
whether compiled by GCC and OW inline assembly or externally by GAS or WASM.

I don't know about OW and WASM, but gcc's inline assembler syntax is definitely different from gas's syntax; neither will compile the other without changes.

--
Thomas M. Sommers -- tms@xxxxxx -- AB2SB

.



Relevant Pages

  • Re: Misplaced parenthesis
    ... The entire purpose of the parser component of a compiler is syntax ... Now the language, accepted by the compiler, is a subset of the ... grammar that describes an superset of the OPL language. ...
    (comp.lang.pascal.delphi.misc)
  • Re: The history of Structure capabilities
    ... is a structure is a structure, regardless of syntax. ... The layout in memory for your example is ... Only when processed by a C compiler, ... example of a possible assembler syntax. ...
    (comp.lang.asm.x86)
  • Re: [OT] Sed and Awk
    ... > Sed doesn't look like any assembler I've ever used. ... Its syntax is ... Nor does awk resemble any compiler you've ever seen. ...
    (comp.unix.shell)
  • Re: What micros do you actually hate to work with?
    ... with less than tiny asm ... hassle to work with 32 bit longs in assembler for an 8 bit uP, ... Microchip's C compiler tools and their assembly under MPLAB. ... is that other programmers for C are easier to find. ...
    (comp.arch.embedded)
  • Re: The Promise of Forth
    ... Declare variables, declare locals, let the compiler do the work ... Forth could be considered the assembler for a simplified virtual ... If you use locals then you have to initialise them each time. ... there are likely to be libraries that could be profitably used within ...
    (comp.lang.forth)