Google


Get this widget!










Is Assembly Language Dead?

Teacher began the lecture with: “No one really need to know this stuff, and you will never use it, but its required by this program so we’ve got to struggle through the next several weeks studying the material. Sounds familiar? To write great code requires one to write efficient code. Writing efficient code requires good algorithm choices and a good implementation of those algorithms. Learning/knowing assembly language, will help a programmer understand how the underlying hardware works thereby forcing em to think in assembly language (For example, data representation, memory organization, elements of computer architecture, how input/output operates, etc, ). This knowledge will make the programmer aware of the problems with certain inefficient sequences so they can avoid them in their high-level code.

Most problems which require the use of assembly language - such as operating systems and device drivers - have been solved already or are being solved by specialists in the companies that produce such products. Complex problems are best solved by languages that allow you to think on an absract level. If you write the program in a high level language and it’s just not fast enough, then you can consider C++ or assembly language.

Computers have become so fast that most problems these days can be solved by super-high level programming languages like PHP and Python. So why trouble yourself with C++ or Assembly language? Most young programmers do not understand memory blocks and how high-level language assigns an address to the variable, which part of the memory address the variables are stored, also the computer/chip architecture.

All these are very important to know. But the high level language has addressed these issues and provides a platform for young programmer to concentrate on the task at hand rather to understanding all these architecture and memory management.

Another problem with software is maintenance, 99% of software lifetime is spent on maintenance. If assembly language is used the problem will be getting professionals to support these systems. Moreover, assembly language is architecture dependent and probably OS dependent, which can cause portability or interoperatebility issues.

Think about all the high-level languages. New ones are constantly being developed. What do the compilers generate? An executable that is actually a mass of hexcode or some intermediate bytecode that requires the knowledge of ASM to create. Even if your compiler is not written in low level Assembly, you need the knowledge to write an efficient, quick compiler. Mission critical, real-time embedded systems, where human life is in danger e.g. vehicular braking systems, manned space flights. All make a lot of use of ASM.

ASM will remain relevant as long as the primary computing model is the micro-computer as we know it(i.e. binary model with low/high voltage indicating 0/1). Chip makers will only consider a change to binary model/ASM if totally necessary. Even if the computing model finally towards physics(quantum), what we will get will be a revision of ASM to handle the new types of processors.

Assembly language is very powerful if you know how to use it but very time consuming, you are dealing at the lowest level of instruction with interrupts into the operating system and any mistake in code would hang up the system. These days you don’t really need to kill yourself programming in assembly as most high level programming languages can handle almost any task you can think of, but knowledge of it could come in handy if you do need to program devices with limited memory.

ASM is not that daunting either (so you might as well just learn it), you need to learn about 33 instructions to be able to get anything done and understand the microprocessor architecture). ASM also improves your logical thinking (so what have you got to lose but one more language on that CV!). It gives an understanding of what happens “behind the scenes” when programming. Also really good for debugging C output!

In assembly, you will learn to implement all the possible addressing modes of your processor. If there is some addressing mode that doesn’t exist, you can emulate it with multiple instructions. Once you get around to accessing data in assembly, using lookup tables, or modifying data passed to a subroutine, you will quickly learn about indirect addressing modes and a smart teacher can quickly make the connection between that and all pointer stuff.

assembly is not quite a language . . as is C. .

For example, for a class, we each had to design a 4-bit microprocessor. To limit the amount of “help” you could get from other classmates and to make it a more individual project, we were each assigned slightly different architectures and limited to certain units. , for example, some people could use a hardwired control unit, others a microprogrammed one. Also, the types of buses, tri-state buffers vs muxes, etc were specified.

The control unit is essentially where you generate all the control signals that make the math and logic units of the processor function correctly and store their results in the right places. It essentially implements the possible instructions of your processor. This means all of us had to create the binary signals that would make each function get the correct operands, perform the correct operations, and store the result in the correct places.

So, the bit pattern that forms those signals are grouped in a manner up to the designer. So, for example, the bits which control stuff could be arranged like this:

[Logic funtion select] | [math function select] | [ input register] | [output register]

Of course, even for my 4-bit processor, it was more complex than that. But, my point is that for each “function” your processor can do, there is one and only one combination of those bits that will do it. So, A + B -> A yields one combination and A + A -> A yields another. These combinations are typically called OPCODES or machine code. Assembly language is a means to write text that another program translates to the opcodes of your specific processor.

ASM is a human-readable notation for the machine language that a specific computer architecture uses. Machine language, a pattern of bits encoding machine operations, is made readable by replacing the raw values with symbols called mnemonics. Its simply a _lower_ level language, learn what you don’t know fully.


0 Responses to “Is Assembly Language Dead?”

  1. No Comments

Leave a Reply







 Subscribe in a reader

Enter your email address:

Delivered by FeedBurner

WidgetBucks - Trend Watch - WidgetBucks.com

UserOnline