Professional Documents
Culture Documents
Assembly Language Programming
Assembly Language Programming
Assembly Language Programming
The CPU directly understands machine instructions, and hence no translation is required. Therefore, the
computer directly starts executing the machine language instructions, and it takes less execution time.
Disadvantages of Machine Language
Difficult to use: As computer instructions are written in binary forms, it is hard to write, understand, and
debug.
Machine dependent: The code written for one processor may be incompatible for other.
Difficult to debug and modify: Checking machine instructions to determine errors are about as tedious as
writing the instructions. It is difficult to modify the program.
ASSEMBLY LANGUAGE - a symbolic representation (called mnemonics) of machine
code. They are close to machine code, but the computer cannot understand them.
Hard to remember mnemonics: There are large numbers of mnemonics for a machine.
Machine dependent: Assembly language is specific to particular machine architecture.
Less efficient than machine language: The assembly language is to be translated into machine language
before execution.
HIGH - LEVEL PROGRAMMING
HIGH - LEVEL PROGRAMMING - is a programming language that is more user-friendly, to some extent
platform-independent and abstracts from low-level computer processor operations such as memory accesses. It is slow
in execution but is efficient for developing programs.
High Level Languages: C, C++, Java, VB, and VB.
Advantages of High-Level Language
Easy to use: The statements in high level language are much more like English language. Thus, they are easier
to understand than those written in assembly and machine language.
Portability: High level programming languages can be run on different machines with little or no change. It is,
therefore, possible to exchange software, leading to creation of program libraries.
Easy Debugging: Errors can be easily detected and removed.
Easy and Fast development of software: Since the commands of these languages are closer to the English
language, software can be developed with ease and speed.
Disadvantages of High-Level Language
More execution time: As the program written in high level language cannot directly generate executable code,
it must be translated into assembly language and then to machine language. Thus, it takes more time for
execution.
Needs own translator: Each language has its own translator to change high level language program into
machine language.
COMPLIER – translates a high-level source program into a form the machine can understand. The compiler takes the
source code as input and produces the machine language code (object code) for the machine on which it is to be
executed as output.
INTERPRETER - like compiler, is also translator which translates high level language into a machine level
language. The difference between compiler and interpreter is their working principle. The interpreter translates and
executes the program line by line.
Examples: QBASIC, PERL, PHP, ASP