News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Why to use assembly??

Started by elisapa, January 21, 2012, 10:26:05 AM

Previous topic - Next topic

elisapa

Hi All,
Yep i am here and i love assembly !!!
I just wanted a few points to use with the ones who say that its old and useless :)
Personally i think that all the other ways are the easy ways and the only thing you learn from them is the lang itself, with assembly its much more fun and it makes you think + you learn so much on how the OS works.

Thank you all for the replies !
-= BY MYSeLF BuT NoT aLoNe =-

vanjast

Where you'll discover that assembly kills high level programming is in embedded systems (eg: Cell Phones).

The problem with this is that without knowledge of internal workings you're limiting your capabilities.
Sure it takes slightly longer to learn, but once over that hurdle... development times are very much the same.

You'll notice that with the higher levels, little niggling problems arise that take a long time (if ever) to resolve.
With assembly you rarely have this problem, because you have to get it right first time. Once in that mode you'll have few problems.
:8)

BogdanOntanu

Quote from: vanjast on January 22, 2012, 12:58:45 PM
Where you'll discover that assembly kills high level programming is in embedded systems (eg: Cell Phones).

No, this is not true. ASM has no place in embedded systems.

The reason is that one will change the CPU every other projects and sometimes the very same project will be done with 2-3 different CPU's. C and sometimes C++ rule in embedded systems because of this.

You can release 50.000 units of an device with CPU1 and another 50.000 units with CPU2 and another 100.000 units with CPU3 and each CPU will be very very different but the device functions will be exactly the same.

Funny but ASM has its place only in PC's and laptops with x86 or x64 architecture because of the huge mass of such devices available to all people and all using kind of the same CPU and the same ASM.

Here it does not matter if you program in C/C++ or Java or ASM as long as the program is well written and it will run corectly.

There is another very very low level place where resources are extremely scarce and where ASM can make a difference when compared with C: the small PIC controllers world with 128 bytes of RAM and 512 bytes of ROM.

However even there a limited set of C rules because you change devices quite often.

Hence forget about ASM when programming for embedded devices. ASM "rules" only in the PC area ;)

Of course that ASM knowledge is a benefit for programming embedded devices (required on most jobs) and you mightl need it once in a while (rarely). However it is most likely that you will write your programs in C or C++  in that world.
Ambition is a lame excuse for the ones not brave enough to be lazy.
http://www.oby.ro

clive

Kind of agree with Bogdan here, Cell Phones being a particularly bad example, with almost the entire code base being in C/C++ or other HLL/scripts, things like Set-top Boxes, Storage Drives, Wireless Modems and GPS Receivers are also predominantly not assembler.

Sure there are places where assembler might be used, where hand-crafted code is helpful, say DSP. I have examples where generating micro-code for a programmable state machine is done by hand or via some crude assembler/compilation tools. A lot of specialize stuff is likely to be implemented in silicon, where speed/parallelism is critical and achievable. Perhaps you want Logic/VHDL/Verilog skills.

I certainly think an embedded engineer should be comfortable/competent with assembler, the move to purely HLL just illustrates the dumbing down of the applicant pool. On the other hand someone with only assembler, or only x86 competence, isn't much use either. I guess if Intel gets Atom to fly in cell phones there might be some interest there, but I wouldn't hold my breath.

I'm not sure how someone could get a degree in computer science without exposure to compiler design, assemblers, assembly language, operating systems and linkers/loaders. I'm an EE and know this stuff, but I'm admittedly the exception, not the rule.
It could be a random act of randomness. Those happen a lot as well.