[go: up one dir, main page]

0% found this document useful (0 votes)
37 views19 pages

COAL Lec01 Introduction

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1/ 19

Computer Organization and

Assembly Language

Course Instructor:
Mehr un Nisa

1
Overview
• Introduction to Computer
Organization
• Welcome to Assembly Language
• Assembly Language
Applications
• Virtual Machine Concepts

2
What do you know

 Computer Organization

 Assembly Language

3
Computer Organization

 Refers to Operational units and their


interconnections
 i.e. hardware details
 Control Signals
 Interfaces between computer and peripherals
 Memory technology

4
5
Assembly Language
• Why am I learning Assembly Language?
• What background should I have?
• What is an assembler?
• What hardware/software do I need?
• What types of programs will I create?
• What will I learn?

6
Welcome to Assembly Language

 Assemble parts of computer components

 Lies in between HLL and machine


language

 Collection of Mnemonics(ADD, SUB, MOV,


CALL)

7
Assembly Language Applications

• Some representative types of applications:


– Business application for single platform
– Hardware device driver
– Business application for multiple platforms
– Embedded systems & computer games

8
Comparing ASM to High-Level Languages

9
Virtual Machine Concept

 Virtual Machines
 Specific Machine Levels

10
Virtual Machines
 Virtual machine concept
 Programming Language analogy:
 Each computer has a native machine language (language

L0) that runs directly on its hardware


 A more human-friendly language is usually constructed

above machine language, called Language L1

• Programs written in L1 can run two different ways:


• Interpretation – L0 program interprets and executes L1
instructions one by one
• Translation – L1 program is completely translated into an L0
program, which then runs on the computer hardware

11
Translating Languages
English: Display the sum of A times B plus C.

C++: cout << (A * B + C);

Assembly Language: Intel Machine Language:


mov eax,A A1 00000000
mul B F7 25 00000004
add eax,C
03 05 00000008
call WriteInt
E8 00500000

12
Specific Machine Levels

(descriptions of individual levels


follow . . . )

13
High-Level Language
 Level 4
 Application-oriented languages
 C++, Java, Pascal, Visual Basic . . .
 Programs compile into assembly
language (Level 4)

14
Assembly Language
• Level 3
• Instruction mnemonics that have a one-to-
one correspondence to machine language
• Programs are translated into Instruction
Set Architecture Level - machine
language (Level 2)

15
Instruction Set Architecture (ISA)
 Level 2
 Also known as conventional
machine language
 Executed by Level 1 (Digital Logic)

16
Digital Logic
• Level 1
• CPU, constructed from digital logic gates
• System bus
• Memory
• Implemented using bipolar transistors

17
Levels

HLL

Assembly Code

Object file

Machine code

Hardware

18
Q/A

19

You might also like