Assembly language is one level above than machine language. The second generation programming languages comprise, consists of assembly languages that use the concept of codes for writing programs. Similar to the machine language, the programmer of assembly language needs to have internal knowledge of the CPU registers and instructions set before developing a program. For example, To move the contents of the CPU register, a1 to another CPU register, b1 the following assembly language instruction can be used.
Mob b1, a1
The above code shows the use of a symbolic name, mob, in an assembly language instruction. The symbolic name, mob, instructs the processor to transfer the data from one register to another. Using this symbolic name, a value also be moved to a particular CPU register. Unlike the machine language programs, the programs written in the assembly language cannot be directly executed by the CPU of the computer system because they are not written in the binary form. As a result, some mechanism is needed to convert the assembly language programs into machine understandable form. A software program called assembler is used to accomplish this purpose.
The set of symbols and letters form the Assembly Language, and a translator program is required to translate the assembly Language to machine language. This translator program is called 'Assembler'.
Example:
The machine code is,
11110010 01110011 11010010 00010000 01110000 00101011
This could be expressed in an assembly language statement as,
PACK 210(8,13), 02B (4,7)
So, Assembly language does not replace machine language to execute, as it must be converted to machine code. It uses meaningful and readable symbols. ADD is used for addition, SUB for subtraction, M UL for multiplication and so on. These are called codes. It is also called source code program.
Advantages Assembly Language
1. It is easy to develop, understand and modify the programs developed in these languages as compared to those developed in the first generation programming languages.
2. The programs written in these languages are less prone to errors, and therefore can be maintained with great case.
3. The detection and correction of errors is relatively easy in these languages in comparison to the first generation programming languages.
4. They are more standardized and easier to use than machine language.
Disadvantages Assembly Language
1. It is a machine dependent language. i.e. a program written for one computer might not run in other computers with different hardware configuration.
2. The programs developed in these languages are not portable, as these languages are machine dependent.
3. The programmer of these languages needs to have through knowledge of the internal architecture of the CPU for developing a program.
4. The assembly language programs, like the machine language programs, still result in poor productivity.
5. Assembly language programs are still complex.
6. To execute, it is slow, less efficient than machine language.
HIGH LEVEL LANGUAGE
High level languages assisted programmers by reducing further the number of the computer operating details they had to specify, so that they could concentrate more on the logic needed to solve the problem. High level languages are basically symbolic languages that use English words and/or mathematical symbols rather than mnemonic codes. Each instruction in the high level language is translated into many machine language instructions that the computer can understand. Higher level languages are simple languages that use English and mathematical symbols.
You must be logged in to post a comment.