Introduction to Assembly Language with Examples

Assembly programming language is a language closer to what machines can understand. Assembly language is an example of low level language. In an assembly language, each machine language instruction is assigned a code. So, instead of having to remember a string of 0’s and 1’s, the programmer would only need to remember short codes like ADD, SUB, DIV, JMP, MOV, HALT, GO called mnemonics.

High Level and Low Level Language

Assembly language is just abbreviation of machine language, so it also not user friendly. Programmers yet have to write long codes for small program. But many programs are written in assembly language as it is closer to machine language and execution time is faster.

Again, assembly language is also processor dependent or incompatible for different machine. Program written for MOTOROLA processor won’t work in INTEL processor.

Assembly Language is bunch of mnemonics which cannot be understood by computer directly, because we know computer only understands instruction in forms of 0’s and 1’s those mnemonics are translated into machine language or binary codes. The program which converts “ASSEMBLY level instruction” into “MACHINE level instruction” is known as “ASSEMBLER”.

Advantages of assembly language

Since mnemonics replace machine instruction it is easy to write, debug and understand is comparison to machine codes.

Useful to write lightweight application (in embedded system like traffic light) because it needs fewer codes than high level language.

Disadvantages of assembly language

Mnemonics in assembly language are in abbreviated form and in large number, so they are hard to remember.

Program written in assembly language are machine dependent, so are incompatible for different type of machines.

A program written in assembly language is less efficient to same program in machine language.

Mnemonics can be different for different machines according to manufacturers so assembly language suffers from the defect of non-standardization