Introduction to Assembly Language



This is a tutorial of Introduction to Assembly Language, You will know about assembly language and its various features. You will also know exactly why you should learn assembly language?

Various features of assembly language, advantages and disadvantages of assembly language, and much more. Let's start with the Introduction.


Introduction to Assembly Language

Assembly language is a computer programming language (a language that is used to make computer programs). It was introduced by David John Wheeler.

It is a low-level programming language (closer to machine). Machine can understand assembly language in a better way than that of a high-level language.

The language which enables instructions to be described by letters rather than numbers is called assembly language. It is also called as Symbolic Language. 



The program which is written in this language is known as an assembly language program or symbolic program. This programming language uses Mnemonics in place of 0's and 1's (binary code) to represent opcode

This language uses symbolic addressing capabilities due to which it simplifies the programming process because the programmer does not need to remember the exact location of data. 

The programmer can express an address number to symbolic data by using symbolic addressing. 

Example:
                      MOV  5,   AC      10101011
                      MOV  6,   BC      11010011
                      ADD  AC,  BC      10101011

Assembly language uses a translating program for translating assembly language program into machine language. This translating program which translates the assembly language program into machine language is called an assembler. 

The assembler is a system program that is supplied to the computer system. A symbolic program written in assembly language is called a source program. 

The source program is then converted into machine language by the assembler and this converted program is then referred to as object program. 

Assemblers are designed in such a way that it catches errors automatically. If we use an invalid mnemonics or name that has not be defined before. The assembler will print out an error indication. 


Why to learn Assembly Language?

1. You should learn assembly language for a better understanding of software and hardware instructions.

2. It helps in the optimization of processing time.

3. Embedded programming.

Let's understand these reasons in a simple way. Say when you move the mouse of a computer, then its cursor also moves accordingly on the screen. This is so because of the interaction of the software and the hardware.

When you write something with the keyboard, then it gets printed on the computer screen. Have you ever wonder why does this happen and how does this happen?



How does the CPU access the written words and where it has stored the data and how it prints the same data on the screen. These all can be known by learning the assembly language.

Assembly language helps you understand the software and hardware interaction more deeply. It is a machine-specific language.


A high-level language program is converted into assembly code by the compiler. The assembly code is then converted into an object file that contains source code by the assembler.

The source code is then converted into the machine code with the help of a linker and library file. then it causes the hardware to perform tasks according to the program.

When we use assembly language or low-level language to write a program then it reduces the time that is utilized on converting high-level language code to assembly code.

Hence, assembly language helps in optimizing the processing time. 


Features of Assembly Language

1. It is based on Mnemonics rather than numeric operation code or numeric opcode.
2. Data is declared by making use of decimal notation.
3. It helps in specifying the symbolic operand.


Advantages of Assembly Language over Machine Language

1. Easier to Understand and Use: Assembly language is easier to understand and use because mnemonics are used instead of numeric opcodes. Symbolic programming is easier to write than that of machine language programs.

2. Easier to Modify: Assembly language programs are easier to modify than that of machine language programs. This is so because assembly language is easier to understand and hence it becomes easy for a programmer to correct and modify the instructions when required.

3. Easy to Locate and Correct Errors: When there are some errors in the assembly language program, they are easier to find and correct because of the use of mnemonics instead of numeric opcodes. 

4. Easily Relocatable: In assembly language programs, we can easily move programs from one section of memory to another section.


Disadvantages of Assembly Language

1. Assembly language is machine-dependent. That's why programs written for one model of a computer cannot be executed on another one. This means that it is not portable from one machine to another. 

2. An assembly language programmer must be an expert who knows all about the logical structure of the computer.

3. It is difficult to write assembly language programs. This also takes too much time to write the programs.
Previous
Next Post »

Comment Below: ConversionConversion EmoticonEmoticon