Assembly Language - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

Assembly Language

Description:

Skill Area 311 Part B Lecture Overview Assembly Code Assembler Format of Assembly Code Advantages Assembly Code Disadvantages Assembly Code High-Level Language Types ... – PowerPoint PPT presentation

Number of Views:465
Avg rating:3.0/5.0
Slides: 27
Provided by: Syst56
Category:

less

Transcript and Presenter's Notes

Title: Assembly Language


1
Assembly Language High-Level Language
  • Skill Area 311 Part B

Materials Prepared by Dhimas Ruswanto, BMm
2
Lecture Overview
  • Assembly Code
  • Assembler
  • Format of Assembly Code
  • Advantages Assembly Code
  • Disadvantages Assembly Code
  • High-Level Language
  • Types of High-Level Languages
  • Advantages Disadvantages High-Level Language

3
Assembly codeorAssembly language
4
What is an Assembly Code?
  • Symbolic instruction what humans can understand
  • Form of alphanumeric symbols known as mnemonic
    codes.
  • Can have maximum up to 5 letter combination
  • E.g.
  • ADD for addition
  • SUB for subtraction

5
Why Assembly Code?
  • Maps directly into machine language
  • Designed for a family of microprocessors

MOV AX, BXADD AX, 5A INC BX JMP 100
01010011110 11010110110 10011101010 01010101010
Compile
6
What is an Assembler?
  • A program that converts assembly code into
    machine code
  • Takes basic computer instructions and converts
    into a pattern of bits
  • Most popular assemblers
  • 1. MASM (Microsoft assembler program)
  • 2. TASM (Borland turbo assembler program)

7
What is an Assembler?
8
Instruction Format of Assembler
  • An assembly program consists of set of statements
  • Format
  • LABEL COMMENT are optional
  • OPCODE OPERAND(s) are mandatory

LABEL OPCODE OPERAND (s) COMMENT
AGAIN ADD R3,R3,R2 It will contain the product
9
Instruction Format of Assembler
  • OPCODE the thing the instruction is to do
  • OPERAND the thing it is supposed to do it to
  • LABEL a symbolic name which used to identify
    memory locations that are referred to explicitly
    in the program
  • COMMENT message intended only for human

10
Working
  • Programmer write a program using a sequence of
    assemble instructions.
  • This sequence of assembler instructions, known as
    the source code/source program, then specified to
    the assembler program when that program is
    started.
  • It translates a source code into machine
    language.
  • The output of the assembler program is called the
    object code or object program.

11
Assembler Instruction Sample
12
Advantages of Assembly Code
  • It is easier to understand and use as compared to
    machine language.
  • It is easy to locate and correct errors.
  • It is modified easily

13
Disadvantages of Assembly Code
  • Machine dependent
  • Since it is machine dependent therefore
    programmer should have knowledge of the hardware
    also

14
High-level language
15
What is High-Level Language?
  • High-Level language is 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.

16
Purpose of High-Level Language
  • To enable people (programmer) to write program
    easily and in their own native language
    environment (English).
  • Examples
  • C, C, Java, VB, HTML

17
Types of High-Level Languages
  • Languages have been developed for general purpose
    and specific purpose
  • Types of High-Level Languages
  • Algebraic Formula-Type Processing
  • Business Data Processing
  • String and List Processing
  • Object Oriented Programming Language (OOP)
  • Visual Programming Language

18
Algebraic Formula-Type Processing
  • Oriented towards the computational procedures for
    solving mathematical and statistical problem.
  • Examples
  • BASIC (Beginners All Purpose Symbolic
    Instruction Code)
  • FORTRAN (Formula Translation)
  • PL/I (Programming Language, Version 1)
  • ALGOL (Algorithmic Language)
  • APL (A Programming Language)

19
Business Data Processing
  • Emphasize their capabilities for maintaining data
    processing procedures and files handling
    problems.
  • Examples
  • COBOL (Common Business Oriented Language)
  • RPG (Report Program Generator)

20
String and List Processing
  • Used for string manipulation including search for
    patterns, inserting and deleting characters.
  • Examples
  • LISP (List Processing)
  • Prolog (Program in Logic)

21
Object Oriented Programming Language
  • In OOP, the computer program is divided into
    objects.
  • Examples
  • C
  • Java
  • HTML5

22
Visual Programming Language
  • Designed for building Windows-based applications.
  • Examples
  • Visual Basic
  • Visual C

23
Instruction Format
  • Simple English
  • printf(My name is Dhimas Ruswanto)
  • Algebraic Format
  • a2, b3
  • sumab
  • sum23
  • sum5

24
Advantages of High-Level Language
  • User-friendly
  • Similar to English with vocabulary of words and
    symbols
  • Easier to learn
  • Less time to write
  • Easier to maintain
  • Problem oriented rather than machine based
  • Can run on any computer for which there exists an
    appropriate translator

25
Disadvantages of High-Level Language
  • Need to be translated into the machine language
    by a translator, thus a price in computer time is
    paid.
  • The object code generated by a translator might
    be inefficient Compared to an equivalent assembly
    language program.

26
Summary
  • Assembly Code symbolic instruction that humans
    can understand
  • Assembly Code
  • LABEL OPCODE OPERANDS COMMENTS
  • Assembler A program that converts assembly code
    into machine code
  • High-Level language is basically symbolic
    languages that use English words and/or
    mathematical symbols rather than mnemonic codes.
  • Types of High-Level Languages
  • Algebraic Formula-Type Processing
  • Business Data Processing
  • String and List Processing
  • Object Oriented Programming Language (OOP)
  • Visual Programming Language
Write a Comment
User Comments (0)
About PowerShow.com