Re: HLA
- From: "T.M. Sommers" <tms@xxxxxx>
- Date: Sat, 01 Jul 2006 19:31:50 -0400
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
.
- Prev by Date: Re: HLA
- Next by Date: Re: WinExplorer
- Previous by thread: Re: HLA
- Next by thread: Re: HLA
- Index(es):
Relevant Pages
|