There was a post to this group a few weeks ago about job opportunities for
assembly programmers, and the general consensus of the replies seemed to
indicate that there are very few people actually doing assembly programming
as their main bread-and-butter jobs anymore. It seems as though areas which
were once considered the exclusive domain of assembly programming (operating
systems, BIOSes, etc.) are now done primarily in HLLs like C. Does this
mean that one no longer needs to write code that is as efficient as possible
because newer, faster hardware will always compensate for un-optimized code?
What is the opinion of this group? Is the mastery of assembly language a
helpful skill, or merely a bragging right? Can a person be a master HLL
programmer without knowing much, if any, assembly language?
For a computer virus researcher, the more assembly language he/she knows, the
more thorough and fast the analysis will be.
If you aren't interested in either careers or the other few jobs out there,
listen up. By becoming an advanced assembly language programmer, you will gain
an understanding of your target machine and operating system that someone
without asm experience wouldn't have. I'm by no means advanced, but I certainly
benefited from my asm experience once I entered C language and discovered that
pointers = offsets. It's also a belief of mine that a HLL programmer with an
extensive assembly language background will be able to optimize his HLL programs
(not necessarily by using asm) because he has that kind of understanding.
And one more thing is that many people will have a respect for you. I've gotten
people saying stuff like "Wow!" once I told them of my asm experience :)
In the end, what you really gain from delving deeply into assembly language is
not really a profitable avenue but a deep understanding. And through this
understanding, you will have a certain mastery of any HLL you choose to dedicate
yourself to that many others will not have.
Greg Buck wrote:
--
Team2k Programming Team:
http://ppilot.homepage.com
To email me, remove '3*&' from my email address. This is to deter spam :)
In my mind, depending upon a fast machine to compensate for inefficient coding
is a cop-out.
That said, one needs to be aware of the "Law of Diminishing Returns" and only
hand optimize where its absolutely necessary.
Still, an understanding of assembly can often provide a good insight as to what
is going on in your high-level code.
Dan
<why assembly>
I'd say most software development jobs are application development,
and most applications don't need ASM. Additionally, with modern
processors modern compilers tend to generate better optimized code
than most human coders do.
For embedded systems, microcontroller stuff etc. assembly is
much more usefull.
However, i think assembly will allways help you to understand
how your system works, and it will allow you to code really
EVERYTHING possible with your system.
--
Andreas
Mach jemandem ein Feuer und gib ihm ein paar warme Stunden.
Zünde ihn an und gib ihm Wärme für den Rest seines Lebens.
:Is the mastery of assembly language a
:helpful skill, or merely a bragging right?
To begin with, unlike HLLs, there is no single thing named "assembly
language". There is at least one separate and distinct "assembly language"
for each separate and distinct computer architecture. For this group
alone, there are at least six different assembly languages which are
regularly mentioned. The knowledge of any or all of them, considering them
solely as languages, is of absolutely no use to a HLL programmer, and of
not much more use to an "assembly language" programmer.
What is of value is some knowledge of the hardware on which the program
will run. To market oneself as a master assembly language programmer
requires a detailed and extensive knowledge of at least one hardware
platform. HLL programmers need considerably less depth, but will still
find it a helpful skill. For example, in the days when both PL/I and I
were young, I wrote an engineering analysis program which made heavy use
of arrays. While debugging this program, I happened to note that the names
which I had picked for the array indices caused the compiler to store them
as floating point numbers. It doesn't take depth in computer architecture
to know that array indices are integers, but it does take some low level
knowledge to realize that every time I stepped through an array, the
computer was wastefully, but without complaint, loading the floating point
representation; converting it to integer; using the integer value to
access the array; incrementing the integer value; and converting it back
to floating point, so that it could be stored as I had (unwittingly)
requested.
Even if performance is not an issue, assembly level knowledge is often
required for debugging. I use a shareware program written by a person who
is a good C programmer. If there is a problem with his code which can be
consistently replicated on demand, he will find and fix it within a day or
two. But when the problem is intermittent and results in a register dump
from the operating system, he is at a total loss, because he has
absolutely no clue as to how to relate the machine status to his code. It
is very frustrating for me, having to put up with such a problem for
months, when I could probably find his error in an hour or two, if he
didn't consider his source code so proprietory, and I have no doubts but
that he loses a number of customers because of his "buggy" code.
In summary, even if operating systems, BIOSes, etc. are now done primarily
in HLLs like C, the person writing them still must have an assembly
language programmer's knowledge of the hardware platform on which the code
will run.
Best,
-- Chuck Crayne
-----------------------------------------------------------
ccr...@pacific.net
-----------------------------------------------------------
comp.lang.asm.x86 moderation panel member
What does "most" mean ?
>For embedded systems, microcontroller stuff etc. assembly is
>much more usefull.
True, but these are also often programmed in c or similar...
>However, i think assembly will allways help you to understand
>how your system works, and it will allow you to code really
>EVERYTHING possible with your system.
And thus learn
a) how to write fast code using a HLL (pure crap optimized is still
bad code)
b) how to make it faster than optimizing compilers
Btw, the term that "todays compilers beat human assembly code" applies
mainly to bloody beginners and people concentrating on pure theory.
It is more compatibility and easier/faster programming style which
makes HLL more famous than asm...
Otherwise such crappy language like Java (at least when regarding
speed) would not have that success.
>Mach jemandem ein Feuer und gib ihm ein paar warme Stunden.
>Zünde ihn an und gib ihm Wärme für den Rest seines Lebens.
Darf ich rauchen ? - Ja bitte, meinetwegen dürfen sie auch brennen !
Depends. Regarding the rather high usage of stuff like Java, often
development time is much more important than execution time (a
faster/newer machine is much cheaper than paying good programmers).
And often the code is already fast enough written in C or other
languages as well (assuming that the programmer has at least a basic
idea about what he does), many applications call external API
functions most of the time, so there is not much to optimize with asm
there.
But in some cases the speed bonus is still valuable the development
time it requires, like in drivers or fast multimedia stuff. Other
fields are kernel stuff which requires at least a small part in asm
(the parts directly working on the CPU internals).
Such code is still mainly formed by c/cpp, using asm as inline or
external object for the places in which it is absolutely needed.
Looks like the only people mainly doing asm are working at CPU
manufacturers, while the rest (have to) use other languages than asm
most of their time.
>How important is it nowadays to really learn asm programming? I don't mean
>just scratch the surface like most university CSC curriculums do, but really
>spend the time and energy to become an advanced assembly programmer?
>
>There was a post to this group a few weeks ago about job opportunities for
>assembly programmers, and the general consensus of the replies seemed to
>indicate that there are very few people actually doing assembly programming
>as their main bread-and-butter jobs anymore. It seems as though areas which
>were once considered the exclusive domain of assembly programming (operating
>systems, BIOSes, etc.) are now done primarily in HLLs like C. Does this
>mean that one no longer needs to write code that is as efficient as possible
>because newer, faster hardware will always compensate for un-optimized code?
>
>What is the opinion of this group? Is the mastery of assembly language a
>helpful skill, or merely a bragging right? Can a person be a master HLL
>programmer without knowing much, if any, assembly language?
I work on a commercial OS that provides pretty good performance. I
write almost entirely in C. However, my code tends to be better than
that of some of my less experienced colleagues when it comes to
performance for two simple reasons, I can do assembly by hand and I
know how my compiler generates code. For example, which of the
following is faster:
void * x;
x = malloc(1024);
if (x == NULL)
{
return OUT_OF_MEMORY;
}
/* Do something with the allocated memory */
or:
void *x;
x = malloc(1024);
if (x != NULL)
{
/* Do something with the allocated memory */
}
else
{
return OUT_OF_MEMORY;
}
Most compilers (mine included) will generate the following as the
conditial statement for each version:
cmp eax, 0
jnz PastConditional
/* the return OUT_OF_MEMORY */
and:
cmp eax, 0
jz ElseCase
Intel x86 CPUs with a pipeline and branch prediction typically assume
conditional jumps are not taken. As a result high level code that
uses conditionals that are true for the case you'd expect to occur
most frequently are a little faster than those that are true for the
case you'd expect to occur least frequently. This happens because the
most likely case being the true condition will result in fewer
pipeline stalls due to branch mis-prediction.
Many high level programmers prefer the negative option conditionals
because they avoid multi-level nesting in the source code, but their
code is slower (it doesn't matter if CPUs are fast, wasted cycles are
wasted time - making a 1GHz processor run like a 900MHz one is bad
form).
Regards,
David.
--
Spam safe e-mail address (I hope), remove not. both
times it appears to contact me. I reserve the right
to respond only on a newsgroup if I choose.
what about compilers?!
regards,
hp
--
.hpr - h.-peter recktenwald, berlin
mailto:ph...@snafu.de - http://home.snafu.de/phpr - t: +49 30 85967858
Weitergabe oder Verwendung obiger Angaben zu kommerziellen Zwecken ist
gem. § 28 Abs. 3 BDSG untersagt.
and, I certainly won't by my new and fast and efficient hardware just to
make stupid programmers lazy life even lazier...
TS schrieb:
>
> >Additionally, with modern
> >processors modern compilers tend to generate better optimized code
> >than most human coders do.
>
> What does "most" mean ?
Me, for example ;)
I think after learning assembler by reading one or two books,
a good compiler can generate more optimized stuff, especally
accouting things like branch prediction, multi paralell pipelines,
etc...
--
Andreas
For beginners a contemporary (non-GNU) compiler could most likely
generate better code, yes. I know it can't beat me, and I'm not
even an optimization expert (like Terje for example). All it takes
is to memorize all details (or have the optimization book nearby)
and write your (now hopefully) optimized code. An interest in
computer architecture definitely helps.
Henrik Nebrin schrieb:
> | > >Additionally, with modern
> | > >processors modern compilers tend to generate better optimized code
> | > >than most human coders do.
> | I think after learning assembler by reading one or two books,
> | a good compiler can generate more optimized stuff, especally
> | accouting things like branch prediction, multi paralell pipelines,
> | etc...
>
> For beginners a contemporary (non-GNU) compiler could most likely
> generate better code, yes. I know it can't beat me, and I'm not
> even an optimization expert (like Terje for example).
Hm, the best i have heared of are Intels own compilers, which
can be used as MSVC "plugin". At least they produce far better
code than MSVCs own compiler.
--
Andreas
Techniker:Nein, dieser Kopierer hat keinen automatischen
Einzug. Das sind die Lüftungsschlitze.
>How important is it nowadays to really learn asm programming? I don't mean
>just scratch the surface like most university CSC curriculums do, but really
>spend the time and energy to become an advanced assembly programmer?
>
>There was a post to this group a few weeks ago about job opportunities for
>assembly programmers, and the general consensus of the replies seemed to
>indicate that there are very few people actually doing assembly programming
>as their main bread-and-butter jobs anymore. It seems as though areas which
>were once considered the exclusive domain of assembly programming (operating
>systems, BIOSes, etc.) are now done primarily in HLLs like C. Does this
>mean that one no longer needs to write code that is as efficient as possible
>because newer, faster hardware will always compensate for un-optimized code?
>
>What is the opinion of this group? Is the mastery of assembly language a
>helpful skill, or merely a bragging right?
Surely it's both! As well as just plain fun. Maybe it's just vulgar
curiosity, but I *like* knowing what is going on 'under the hood'. Who
cares whether such knowledge is actually necessary, or profitable?
> Can a person be a master HLL
>programmer without knowing much, if any, assembly language?
Given how little it takes nowadays to be considered a 'master
programmer', the answer would appear to be 'yes'. (Whether we *like*
that answer is another matter entirely.)
--
Simon van Dongen <sg...@xs4all.nl> Rotterdam, The Netherlands
'My doctor says I have a malformed public duty gland and a
natural deficiency in moral fibre,' he muttered to himself,
'and that I am therefore excused from saving Universes.'
Life, the universe and everything
"Greg Buck" <[private]@slb7.atl.mindspring.net> wrote in message
news:ObNB5.1942$YY2.1...@newsread2.prod.itd.earthlink.net...
> How important is it nowadays to really learn asm programming? I don't
mean
> just scratch the surface like most university CSC curriculums do, but
really
> spend the time and energy to become an advanced assembly programmer?
>
> There was a post to this group a few weeks ago about job opportunities for
> assembly programmers, and the general consensus of the replies seemed to
> indicate that there are very few people actually doing assembly
programming
> as their main bread-and-butter jobs anymore. It seems as though areas
which
> were once considered the exclusive domain of assembly programming
(operating
> systems, BIOSes, etc.) are now done primarily in HLLs like C. Does this
> mean that one no longer needs to write code that is as efficient as
possible
> because newer, faster hardware will always compensate for un-optimized
code?
>
> What is the opinion of this group? Is the mastery of assembly language a
> helpful skill, or merely a bragging right? Can a person be a master HLL
>Additionally, with modern
>processors modern compilers tend to generate better optimized code
>than most human coders do.
flamewar! flamewar! dammit, FLAMEWAR!
going on in comp.arch right now, hee hee let's have *another* one! hee hee :)
err - i'd like to know the actual BASIS of that statement, before anything else,
and before accepting as blind faith, as you seem so ready to do:
optimizing for *a* processor is a fairly intensive task, and takes pretty smart
human being/s to do it. (ie. the guys who are going to be working on the
compiler). do we simply have ENOUGH of them on the planet? how smart are they?
are the smartest in the world going to work on this? (ie. the "humans" who could
,maybe, have beaten them? )
but actually, the real fundamental question is: is it possible to automate
optimisng? (and I mean *optimising*, ie . *the best* possible code).
rohit.
--
It IS the end of the world as you know it! You can now
get PAID to listen to CDs and MP3s!!! Click on this link:
www.soundom.com/cgi-bin/affiliate.cgi?id=sexymf
And start feeling fine! :)
>complicated math routines for those 3-D engines.
how can you say that, with ALL the 3D API flame wars that have occurred over the
years? if it's not the card, it'll be DirectX or OpenGL or Mesa or whatever
else. doing asm by yourself is pretty much over. ( something that i pretty much
consider the end of the world, but then it had to happen sometime or the other).
>In the end, what you really gain from delving deeply into assembly language is
>not really a profitable avenue but a deep understanding. And through this
>understanding, you will have a certain mastery of any HLL you choose to dedicate
>yourself to that many others will not have.
>
it's interesting that university Comp Sci and CIS programs which will require
"computer architecture" and "software methodology" only "scratch the surface" as
mentioned before - Asm is kind of *the first thing* to learn along those lines,
innit?
Domainator.
>In my mind, depending upon a fast machine to compensate for inefficient coding
>is a cop-out.
>
err - that begs the question - in whose mind is it something else?
rohit.
Rohit schrieb:
>
> but actually, the real fundamental question is: is it possible to automate
> optimisng? (and I mean *optimising*, ie . *the best* possible code).
Of course. It is quite easy. Just let the computer try all combinations.
(you never asked for speed while optimising...)
Rohit wrote:
> On Sun, 01 Oct 2000 23:31:05 -0000, Al Leitch <al_team2k@3*&hotmail.com> wrote:
>
> >complicated math routines for those 3-D engines.
>
> how can you say that, with ALL the 3D API flame wars that have occurred over the
> years? if it's not the card, it'll be DirectX or OpenGL or Mesa or whatever
> else. doing asm by yourself is pretty much over. ( something that i pretty much
> consider the end of the world, but then it had to happen sometime or the other).
>
To tell you the truth, I've never actually heard about the 3-D API flame wars.
Programs are now leaving those complex calculations for other hardware/software to
do, nice.
>
> >In the end, what you really gain from delving deeply into assembly language is
> >not really a profitable avenue but a deep understanding. And through this
> >understanding, you will have a certain mastery of any HLL you choose to dedicate
> >yourself to that many others will not have.
> >
>
> it's interesting that university Comp Sci and CIS programs which will require
> "computer architecture" and "software methodology" only "scratch the surface" as
> mentioned before - Asm is kind of *the first thing* to learn along those lines,
> innit?
>
> Domainator.
>
> --
> It IS the end of the world as you know it! You can now
> get PAID to listen to CDs and MP3s!!! Click on this link:
>
> www.soundom.com/cgi-bin/affiliate.cgi?id=sexymf
>
> And start feeling fine! :)
>
--
So I'm not the only one who feels this way. :-)
I've always had trouble learning things if I wasn't given ALL the
details along the way. This prevents my thouhts from wandering and
getting stuck in one spot. I guess that this is the curse of having an
extremely logical(computer-like mind). :-) From the bottom up is the
only way for me.
Anyway, against recommendations, I've just started learning Assembly
(instead of an HLL) for this very reason. Wish me luck. :-)
Darren Harris
************************************************************************
In article <sto1eoo...@corp.supernews.com>,
Sent via Deja.com http://www.deja.com/
Before you buy.
> Snipped material about the disadvantages of the "black box" approach.
>
> Ditto Jesse,
>
> So I'm not the only one who feels this way. :-)
>
> I've always had trouble learning things if I wasn't given ALL the
> details along the way. This prevents my thouhts from wandering and
> getting stuck in one spot. I guess that this is the curse of having an
> extremely logical(computer-like mind). :-) From the bottom up is the
> only way for me.
>
> Anyway, against recommendations, I've just started learning Assembly
> (instead of an HLL) for this very reason. Wish me luck. :-)
>
> Darren Harris
>
> Sear...@mail.con2.com
>
> ************************************************************************
>
While I am also one of those people who like to know what goes on inside
"black boxes" I would play devil's advocate here for a moment and point
out that the concept of abstraction (the general idea of "black boxes")
is very important if you want to learn some subject.
In the snipped example, the poster complained that an instructor gave
him a black box and claimed it was an amplifier. The poster wasn't
happy until he figured out that the amplifier really consisted of some
transistors and other components. Then he was comfortable with the
amplifier appearing in the circuit under study.
This, however, is not a refutation of abstraction (i.e., abstracting
away the low-level implementation of the amplifier as a black box).
After all, transistors are black boxes too. Apparently, not knowing
the solid-state physics behind the operation of the transistor did
not stop this person from understanding how the amplifier behaved
in the circuit under study.
This attitude does demonstrate an important concept an old Department
Chair of mine at UCR (Tom Payne) states all the time:
"People need to fully understand the concepts at one level of abstraction
*below* the point they normally work."
For example, VHLL users (Perl, Python, HTML, Prolog, etc.), need to
be capable of working and understand code at one lower level of
abstraction, specifically the HLL level (e.g., C/C++, Pascal, FORTRAN,
etc.).
Those who work primarily at the HLL level need to understand concepts
at one lower level, specifically the assembly language level.
Those who work at the assembly language level, need to understand
what is happening at the architectural level.
Those who work at the architectural level need to understand how
gates and other logic functions are implemented (i.e., the transistor
level).
Those who work at the transistor level need to understand solid state
physics.
Below that, I suspect you need a direct line to God :-)
Randy Hyde
Jesse Duran
"Randall Hyde" <rh...@cs.ucr.edu> wrote in message
news:su42fre...@corp.supernews.com...
>
> in article stvqgp6...@corp.supernews.com, sear...@my-deja.com at
> sear...@my-deja.com wrote on 10/8/00 11:29 AM:
>
> > Snipped material about the disadvantages of the "black box" approach.
> >
> > Ditto Jesse,
> >
> > So I'm not the only one who feels this way. :-)
> >
> > I've always had trouble learning things if I wasn't given ALL the
> > details along the way. This prevents my thouhts from wandering and
> > getting stuck in one spot. I guess that this is the curse of having an
> > extremely logical(computer-like mind). :-) From the bottom up is the
> > only way for me.
> >
> > Anyway, against recommendations, I've just started learning Assembly
> > (instead of an HLL) for this very reason. Wish me luck. :-)
> >
> > Darren Harris
> >
> > Sear...@mail.con2.com
> >
> > ************************************************************************
> >
>