Re: Hey, what is all this 'off topic' posting?



On Mon, 05 Sep 2005 13:59:46 -0700, Bob Monsen wrote:

> On Mon, 05 Sep 2005 12:40:58 -0400, keith wrote:
>
>> On Sun, 04 Sep 2005 20:17:37 +0200, Frank Bemelman wrote:
>>
>>> [quoted text muted]
>>
>> Macros are far more than (even sort of) subroutines. They can do
>> conditional processing too. A few years back (when I was doign such
>> things) I had a set of x86 assmebler macros that would do PL/I-like
>> branch constructs (IF/THEN/ELSE, SELECT/WHEN in both forms, LOOP, UNTIL,
>> etc.). Assembler macros are *much* more than (sort of) subroutines. If
>> that's all you're using macros for, I can see why you don't much like ASM.
>
> It's the duckling syndrome. We always love whatever we bonded to as a
> child.

Not at all. I had all of two weeks of PL/I in college and perhaps another
week (40 hours class) OTJ. Otherwise I've never used it. I *do* like
PL/I language constructs though. Pascal, I was moderatley comfortable
with. I was riased with Fortran, so Basic is trivial. ASM is comfortable
because that's what I do; sling bits. I really don't care what the
processor is, it's a small learning curve to be productive
(particularly the embedded stuff). VHDL is nice because it's *NOT* 'C'. ;-)

> I like C because it's what I 'grew up' with. I've done lots of asm
> coding, but it is always painful when I have to hack out the loop
> control structures yet again using compare and branch instructions (or
> write the macros using some arcane assembler to do that on a new
> architecture), or explicitly allocate and reuse local variables, or
> remember which status bits get whacked by which instructions, or try to
> remember the calling registers or stack allocation for a called routine.

You're not structured enough. It's been years since I had problems with
asm stuff, yet 'C' will allow even the most experienced programmer to
shoot himself with pointers without knowing better. I can't tell you the
number of times we have hard crashes going form one OS (or compiler)
version to another because different assumptions are made WRT pointers.
Crappy programming, agreed. I don't see experienced ASM programmers
making the same stupid mistakes. They *know* what a pointer is and to
treat it with respect.


> C does all this for you, at a small price in efficiency, but doesn't get
> in your way like many other HLLs. I think the level of abstraction is
> just right for most software that touches hardware. That is probably why
> most OS, driver, and embedded software is written in it, and has been
> for 25 years. If you need more speed or more space, there are hard core
> optimization options, and you can always profile and optimize by hand in
> assembler.

I dissagree. Most work that touches hardware is done in 'C' because
programmers are too dumbed down. ;-)

> Yet another good thing about C is that it's pretty standard. Nearly
> everybody can read it after a few minutes instruction (unless you've
> macroized it to look like cobol) Assembler with macros tends to look
> like a private language, and intuiting higher level structures can be
> daunting.

Hmm, tell that to IBM. MVS is written in PL/S (or PL/AS), which isn't
much more than a macro language on top of 370 assembler. If the macros
are written correctly, they work just fine.

> C was designed to be a portable assembly language,

I'd like to see you argue that point over on comp.sci. They chew people
up with that attitude (though personally I don't disagree, much).

> and, in my opinion,
> does a great job at that task, and many others. Quick to write, often
> portable, easy to read, handles annoying details that can be the source
> of bugs, but lets you whack away at hardware without trying to protect
> you from yourself. Flexible, malleable, can be used to write drivers,
> operating systems, or AI. It's a good language.

It sucks as an embedded language. It might be OK (with the ++ crap added
on top) for UI stuff, but it is crap as an embedded language.

--
Keith
.



Relevant Pages

  • Re: Hey, what is all this off topic posting?
    ... >>> that's all you're using macros for, I can see why you don't much like ASM. ... > PL/I language constructs though. ... >> write the macros using some arcane assembler to do that on a new ...
    (sci.electronics.design)
  • Re: Help...
    ... An Assembler is a Programming Tool that translates ... HLA does this. ... Macros and Equates substitutions features. ... difference between a language and the implementation of a language. ...
    (alt.lang.asm)
  • Re: HLA Stdlib v2.2 is now available.
    ... a language and an implementation of a language, ... it from being an assembler. ... You argue that the fact that the HLA ... the "user" can write their own macros and this makes all the ...
    (alt.lang.asm)
  • Re: To Beth
    ... Allready, I write asm, in many many cases, when using the ... I disagree that development time is faster writing in assembler, ... vanishes if you have a good macro language available. ... Not commenting code in my opinion is the worst habit ever. ...
    (alt.lang.asm)
  • Re: a turbo assembly language
    ... > With this You will go more fast of a C (or whatever language you want) ... > programmer because debugging assembly program is easier. ... * "Writing Asm would be more time consuming than HLL". ... RosAsm Assembler Syntax, at all. ...
    (alt.lang.asm)