Professional Documents
Culture Documents
Computer Organization
&
Assembly Language Programming
Dr Adnan Gutub
aagutub ‘at’ uqu.edu.sa
[Adapted from slides of Dr. Kip Irvine: Assembly Language for Intel-Based Computers]
Most Slides contents have been arranged by Dr Muhamed Mudawar & Dr Aiman El-Maleh from Computer Engineering Dept. at KFUPM
Outline
Welcome to Assembly
Assembly-, Machine-, and High-Level Languages
Assembly Language Programming Tools
Programmer’s View of a Computer System
Basic Computer Organization
Required Background
The student should already be able to program confidently in at
least one high-level programming language, such as Java or C.
Basic Concepts Computer Organization and Assembly Language
slide 3/43
Grading Policy
Attendance 10%
Quizzes 25%
Midterm Exam 25%
Final Exam 40%
Attendance Policy
Attendance will be taken regularly.
There will be a 0.5% grade deduction for every unexcused absence.
Excuses for officially authorized absences must be presented no later than two weeks
following resumption of class attendance.
Late students can attend, but every 3 late records will be assumed to hold marks as one
absent.
Basic Concepts Computer Organization and Assembly Language
slide 4/43
Next …
Welcome
Assembly-, Machine-, and High-Level Languages
Assembly Language Programming Tools
Programmer’s View of a Computer System
Basic Computer Organization
Data Representation
Flash Movie
High-Level Language: D = A * B + 10
Source Object
File Assembler File
Operating System
Level 3
Instruction Set
Architecture Level 2
Microarchitecture Level 1
Each level
Digital Logic hides the
Level 0 details of the
level below it
ALU CU clock
control bus
address bus
ALU
Registers
Control unit
ALU Flash Movie
Performs arithmetic
and logic instructions
Control unit (CU)
Generates the control signals required to execute instructions
Implementation varies from one processor to another
Address Space is
the set of memory
locations (bytes) that
can be addressed
100
Processor-Memory
Performance Gap:
(grows 50% per year)
10
1983
1986
1987
1990
1991
1982
1984
1985
1988
1989
1992
1993
1994
1995
1996
1997
1998
1980
1999
2000
1980 – No cache in microprocessor
1995 – Two-level cache on microprocessor
Basic Concepts Computer Organization and Assembly Language
slide 39/43
The Need for a Memory Hierarchy
Widening (expand) speed gap between CPU and main memory
Processor operation takes less than 1 ns
Main memory requires more than 50 ns to access
Bigger
Main Memory (1 – 2 GB) Faster Memory Bus
I/O Bus
Disk Storage (> 200 GB)
Disk, Tape, etc
Access time: milliseconds
Basic Concepts Computer Organization and Assembly Language
slide 41/43
Magnetic Disk Storage
Disk Access Time =
Seek Time +
Rotation Latency +
Transfer Time
Read/write head
Sector
Actuator
Recording area
Track 2
Seek Time: head movement to the Track 1
Track 0