Chapter One - Copy (2)
Chapter One - Copy (2)
Assembly Language
Chapter-1: Introduction to
Microprocessors and Microcomputer
Systems
Prepared By
Ashebir K
Lecturer, Department of Computer Science
Jinka University(JKU)
1.1 Overview
2
1.1 Overview
• Computer organization
– Encompasses all physical aspects of computer systems.
– E.g., circuit design, control signals, memory types.
– How does a computer work?
• Computer architecture
– Logical aspects of system implementation as seen by the
programmer.
– E.g., instruction sets, instruction formats, data types,
addressing modes.
– How do I design a computer?
3
1.1 Overview
What is Microprocessor?
The term micro means extremely small and processor
means the thing that accelerates tasks.
So in general sense the term microprocessor means an
extremely small thing that can accelerate different tasks as
ordered. But the actual definition of microprocessor is
slightly different than this.
A microprocessor is a tiny electronic chip containing
transistors found inside a computer’s central processing
unit and other electronic devices. Its basic function is to
take input, process it and then provide appropriate output.
4
Microcomputer Systems
Overview
Introduction to the architecture of microcomputers
and IBM PC
• SYSTEM UNIT
• I/O DEVICES OR PERIPHERALS
Keyboard
Display Unit
Disk drives
• INTEGRATED-CIRCUIT (IC)
Contains transistors. Digital circuits
[0’s& 1’s]
Binary Digits/ Bits: 0 or 1
Components (cont’d…)
• CPU:
Brain of the computers
Controls all the operations
A single chip processor (microprocessor)
Address Contents
The address of a memory byte Contents are NOT unique as
is FIXED and different from they deal with current data.
other addresses( unique).
Serial Parallel
30
1.6 The Computer Level Hierarchy
31
1.6 The Computer Level Hierarchy
32
1.6 The Computer Level Hierarchy
33
1.6 The Computer Level Hierarchy
34
1.6 The Computer Level Hierarchy
35
1.6 The Computer Level Hierarchy
36
1.7 The von Neumann Model
37
Programming Languages
• Assembly language:
Symbolic names are used to represent operations, registers and
memory locations(i.e. MOV AX, A)
Assembly program must be converted into machine language using
assembler.
• High-Level language:
Allows programmer to write program in more natural language text.
A Compiler is needed to translate high-level programs into machine
language
Example of Languages
Advantages
High-level Assembly
• So close to the machine
• Closer to natural language. language. So programs are
So, algorithm conversion in faster and shorter.
easier.
• Reading or writing to specific
• Less instruction and time memory location, I/O ports is
required than assembly easy.
language.
• It can be a sub program of a
• Programs can be executed in high-level language.
any machine
• Going into more details like
how computer thinks.
Adding Two numbers
.MODEL SMALL ; Size of the program
.STACK 100H ; Stack segment [ Temporary storage of addresses]
.DATA ; Define data
A DW 2 ; initialize variables [A=2]
B DW 5
SUM DW ? ; Uninitialized values
.CODE ; Code segments
MAIN PROC ; main procedure starts
MOV AX,@DATA ; initialize DS
MOV DS, AX
; add numbers
MOV AX,A ; instruction. AX has A
ADD AX,B ; AX has A+B
MOV SUM, AX ; SUM = A+B
; exit to DOS
MOV AX, 4CH
INT 21H
MAIN ENDP
ENDP MAIN