Why Would Anyone Learn Assembly language?
Amazing! You’re actually reading this. That puts you into one among three categories: a student who is being forced to read these things for a category, someone who picked up this book accidentally, or one of the few who actually have an interest in leaming assembly language.
So why would anyone leam this stuff, anyway? Well, there are several reasons which come to mind:
i) Your major requires a course in assembly language; i.e., you’ re here against your will
ii) A programmer where you work quit. Most of the ASCII text file left behind was written in programming language and you were elected to take care of it
iii) Your boss has the audacity to insist that you write your code in the assembly against your strongest wishes.
iv) Your programs run just a little too slow or are a little too large and you think assembly language might help you get your project under control.
v) You want to understand how computers actually work.
vi) You’re interested in leaming how to write efficient code.
vii) You want to try something new.
Well, whatever the reason you’re here, welcome to Electrical Dost. Let’s take a look at the subject you’re about study.
1) What’s Wrong With Assembly Language?
Assembly language has a pretty bad reputation. The common impression about programming language programmers today is that they’re all hackers or misguided individuals who need enlightenment. Here are the explanations people give for not using assembly:
i) Assembly is hard to leam.
ii) Assembly is hard to read and understand.
iii) Assembly is hard to debug.
iv) Assembly is hard to maintain.
v) Assembly is hard to write.
vi) Assembly language programming is time consuming.
vii) Improved compiler technology has eliminated the need for assembly language.
viii) Today, machines are so fast that we no longer need to use assembly.
ix) If you need more speed, you should use a better algoithm rather than switch to assembly language.
x) Machines have such a lot memory today, saving space using assembly isn’t important.
xi) Assembly language is not portable.
2) What’s Right With Assembly Language?
An old joke goes something like this: “There are three reasons for using assembly language: speed, speed, and more speed.” Even those that absolutely hate programming language will admit that if speed is your primary concem, assembly language is the way to go. Assembly language has several benefils:
i) Speed. Assembly language programs are generally the fastest programs around.
ii) Space. Assembly language programs are often the smallest.
iii) Capability. You can do things in assembly which are difficult or impossible in HLLs
iv) Knowledge. Your knowledge of assembly language will help you wite better programs, even when using HLLs.