Hi All, recently i had a lot of people says that assembly is obselete and should not be used...
I started to argue and everyone said his point on why to use or not use assembly.
Whats youe excuse dear Forum members??
Because you can.
:bg
i seem to recall that discussion some time ago
probably in the Colosseum sub-forum
you might try the forum search tool - advanced options
let's see you make a 3 Kb window with a C compiler :P
...or a 5 Kb MDI window (see attached)
but, really, the big advantages are speed - and you don't have any "you can't do that" rules :U
Ten reasons:
1. Speed
2. Speed
3. Speed
4. Speed
5. Speed
6. Speed
7. Speed
8. Freedom to do what you want
9. Size
10. No Repetitive Stress Injury (http://en.wikipedia.org/wiki/Repetitive_strain_injury#Keyboards_and_keyboard_alternatives) from {bloody C brackets} and useless ; after each line
Quote from: elisapa on January 21, 2012, 10:26:05 AM
Hi All, recently i had a lot of people says that assembly is obselete and should not be used...
Usaully those that tell you that you shouldn't themselves can't. :wink
Quote from: Bill Cravener on January 21, 2012, 12:17:17 PM
Usaully those that tell you that you shouldn't themselves can't. :wink
assembly language may, however, have adverse effects on spelling and grammar :bg
Because you can use SIMD instructions so you can easy program your computer do parallel computing with for
Example SSE to process 4 floats simultaneously
A few reasons:
1) Because it is fun
2) Because you gain a lot of knowledge about how the CPU and the computer works at low level and can optimize better
3) Because it is simple and clear and has no dependency chain
4) Freedom and control
5) Speed
Quote from: dedndave on January 21, 2012, 01:40:09 PM
Quote from: Bill Cravener on January 21, 2012, 12:17:17 PM
Usaully those that tell you that you shouldn't themselves can't. :wink
assembly language may, however, have adverse effects on spelling and grammar :bg
Most of us write in assembly because function names in other languages are too long and prone to spelling mistakes. For example the normal length of a mnemonic in assembly is 3 letters, allowing only limited unique combinations, much less prone to error than something like strcasecmp or even longer commands. Of course our good friends at Intel threw a wrench into the works with SIMD instructions, they are longer than 3 letters and for that reason virtually incomprehensible to your average assembly language programmer, who will gladly write 50 lines of code to perform the same task with 3 letter mnemonics rather than use a single SSE instruction like PMOVMSKB. Another reason for using assembly is that most assembly language programmers are grammatically challenged, a line like
sbb eax,edx makes more semantic sense than something in NATURAL like
DECIDE ON FIRST VALUE which would be unintelligible gibberish to him.
Hope this helps to enlighten you.
Quote...50 lines of code to perform the same task with 3 letter mnemonics rather than use a single SSE instruction like PMOVMSKB
is that Russian ? :eek
Ok, ok, maybe asm does affect ones grammar. I should have said; Usually those that tell you that you shouldn't "- use assembly -" " - they -" themselves "- do not know how to use assembly -".
Dah, better? :lol
Something seldom mentioned,you spend time actully doing a complex task,it takes time,and you must gather all your creative juices to do what you need to do. At the finish you may be a bit burned out,but when you do accomplish your goal,you have the satisfaction of having risen to the task. You did not do it in a "LEGO" fashion with pre built blocks,you were an artist!
This might be a question of why would someone build a nice piece of furniture by hand,when they could buy it already made...
Oh yeah dave...lets see that. And not just C. The other day i tried to use pascal to make a simple main window. It turn out with 100kb the for assembly only takes about 2kb. I imagine that there may be other things to consider when writting in high level languages but it just seems that nothing can beat assembly. And could imaging yourselves trying to bebug a program written in C, PASCAL or even BASIC. I imagine the code is full of senseless garbage.
Laters
Quote from: donkey on January 21, 2012, 02:20:52 PM
... average assembly language programmer, who will gladly write 50 lines of code to perform the same task with 3 letter mnemonics rather than use a single SSE instruction like PMOVMSKB.
:green2
(although I find 16 matches for PMOVMSKB in my favourite library :wink)
Interesting troll, a single 1st post gets 13 replies. I wonder if we will ever hear from the initial poster again that has anything to do with assembler language programming ?
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 !
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)
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.
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.