Quote:
Originally Posted by
gabam
My question is that where does Assembly language stand today against the high level languages, I mean what can assembly do, that the other langues can't????
I hope you will explain your good points.
Thanks alot!
The most vital thing about assembly is that it's freestanding. It makes extremely few assumptions about the environment you're writing code for, and can create code which needs no operating system at all. That's what makes it almost impossible to get rid of.
When you're programming in assembly, all it amounts to in the end is "put these exact bytes in this exact location in memory" except you can give it instructions as well as bytes, and it does the conversion for you. That's precisely the kind of thing you need when writing a BIOS for example, when the computer does in fact start up blindly looking for its very first instruction at a very specific place.
You also need it to write a bootloader, which gets loaded from a hardcoded location on disk then blindly executed from, again, a specific spot inside that location.
You also need at least some of it to write an operating system. That gets loaded by the bootloader and, again, blindly executed starting from a very specific spot.
You don't get a nice, programmer-friendly environment where you can load whatever language you like to do whatever you please until after all these things have already happened. Even after that, assembly language is still useful.
The other thing about being freestanding is that, since machine code is executed by the host processor, there's no interpretation step. That's why you can write a better C compiler
in C. C code isn't a program, it's a
design which a C compiler uses to build a program out of raw assembly. You certainly couldn't write a better Perl inside Perl.
You can also write
other languages in C. Name any language -- Perl, PHP, Java, C#, awk, Python, sh -- and chances are, it was written in C.