Assembly Language Programming

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

ASSEMBLY LANGUAGE PROGRAMMING

Computer Program & Programming Languages: A Review


- Computer program is a set of instructions that, when executed, causes the computer to behave in a
predetermined manner. Without programs, computers are useless and can do nothing. Most people are
confused that computers are intelligent devices and can do anything; but this concept is wrong. Computer can
do anything, but only after it has appropriate program(s). Without programs, it cannot even add two numbers.
Computer Programming Languages
C, C++, Pascal, BASIC, FORTRAN, COBOL, LISP, etc.
Types or Levels of Programming Languages

LOW - LEVEL LANGUAGE


LOW - LEVEL LANGUAGE - programming language in which each statement or instruction is directly translated
into a single machine code.
MACHINE – LEVEL LANGUAGE - is a language that a computer actually understands. The least possible level at
which we can program a computer is in its own native machine code, consisting of strings of 1's and 0's, and are stored
as binary numbers.
Advantages of Machine Language

 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.

Advantages of Assembly Language

 Writing a program in assembly language is more convenient than writing one in


machine language. Instead of binary sequence, as in machine language, a
program in assembly language is written in the form of symbolic instructions.
Disadvantages of Assembly Language

 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

You might also like