0% found this document useful (0 votes)
376 views23 pages

Computer Organization and Assembly Language

This document provides an introduction to a course on computer organization and assembly language. It discusses that the course will look at the lower-level details of how computers work by examining computer organization, architecture, and the assembly language of the Intel 8088 processor. It outlines the course materials, evaluation methods, academic integrity policy, and provides some introductory definitions and diagrams related to computer components, organization, and the role of assembly language.

Uploaded by

Areeb Saqib Butt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
376 views23 pages

Computer Organization and Assembly Language

This document provides an introduction to a course on computer organization and assembly language. It discusses that the course will look at the lower-level details of how computers work by examining computer organization, architecture, and the assembly language of the Intel 8088 processor. It outlines the course materials, evaluation methods, academic integrity policy, and provides some introductory definitions and diagrams related to computer components, organization, and the role of assembly language.

Uploaded by

Areeb Saqib Butt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 23

Computer Organization and

Assembly Language
Introduction
About Me

Noshaba Nasir
Assistant Professor

Department of Computer Science

FAST-NU- LHR

[email protected]

Office Location: Opposite Lab 4


What is the course about?
• This course is about looking at lower level details of how computers
works.
• In order to do so, we will see computer organization and architecture.
• You will also learn assembly language for Intel 8088 processor.
• At this point you have taken a course on High level language (C++), so
its good time to get started looking at
• How processor (CPU) is organized?
• How program is executed on processor?
• How processor interacts with memory and I/O devices?
Books
• Assembly Language Programming Lecture Notes by Bilal Hashmi (BH).
• Assembly Language for x86 Processors Seventh Edition Kip R. Irvine
(KI)
• Computer Organization and Architecture Designing for Performance
Tenth Edition by William Stallings (WS)
Tentative Evaluation and Grading Policy
• You will be evaluated on quizzes, 2 mid term exams, 1 final exam and
multiple assignments.
• Quizzes can be unannounced.
• Tentative Percentage Grade Distribution:

• QUIZZES 10
• MIDTERMS 30
• FINAL 45
• ASSIGNMENTS 15
Academic Integrity
• Plagiarism and Cheating against academic integrity. Both parties involved in
such cases will face strict penalty (negative marking, F grade, DC)
• CODE/ ASSIGNMENT SHARING is strictly prohibited.
• Keep in mind that by sharing your code/assignment you are not helping
anyone rather hindering the learning process or the other person.
• No excuse will be entertained if your work is stolen or lost. To avoid such
incidents
• Keep back up of your code on safe online storage, such as Google Drive, Drop box or
One drive.
• Do not leave your work on university lab computer, transfer your work to online
storage and delete from the university lab computer (empty recycle bin as well)
Question
• What specifications do you look at when you see a computer (lets say
a laptop)?
Some Definitions
• Computer Architecture
• The architecture of a computer is a logical description of its components and its basic
operations. 

• Computer Organization
• Computer organization refers to the operational units and their interconnections that
realize the architectural specifications

• For example, it is an architectural design issue whether a computer will have a multiply
instruction. It is an organizational issue whether that instruction will be implemented
by a special multiply unit or by a mechanism that makes repeated use of the add unit
of the system
Basic Components of Computer
• Section 1.1 BH
Another diagram

Source KI
Processor
• Processor: The processor reads in instructions and data, writes out
data after processing, and uses control signals to control the overall
operation of the system. It also receives interrupt signals

• ALU, CU & Registers are 3 Distinct CPU Elements


Memory
• Memory: Typically, a memory module will consist of N words of equal
length. Each word is assigned a unique numerical address (0, 1, c , N-
1). A word of data can be read from or written into the memory. The
nature of the operation is indicated by read and write control signals.
The location for the operation is specified by an address.
Buses
• A bus is a communication pathway connecting two or more devices. For example
Processor to/from Memory, I/O to/from processor, I/O to/from Memory
• The group of bits that the processor uses to inform the memory about which
element to read or write is collectively known as the address bus.
• Another important bus called the data bus is used to move the data from the
memory to the processor in a read operation and from the processor to the
memory in a write operation.
• The third group consists of miscellaneous independent lines used for control
purposes. For example, one line of the bus is used to inform the memory about
whether to do the read operation or the write operation. These lines are
collectively known as the control bus
A word about registers
• Registers are named storage locations in the CPU that hold
intermediate results of operations.
• As they are located inside CPU they are fastest to access.
• Each processor has limited number of registers.
How instructions are executed
Where is Assembly Language?
• Up till now the instruction you provided to your computer were in
High level language, for example code in C++.
• But processor doesn’t understand these high level languages. Its only
understands 0 or 1. Called machine Language.
• Example of machine instruction to add two registers is

• Not very meaningful to us humans, image remembering a something


like this for so many more instructions!!
Still, where is Assembly Language?
• There are many different types of processors out there, and so many high
level programming languages (HLL) are well.
• The processors don’t provide a direct way to convert each HLL to machine
language.
• But each processor comes with its own assembly language, which is much
like human readable machine language.
• So assembly language lies between HLL and machine language.
• Some compilers convert code to assembly before
• Example of assembly language instruction to add two registers is
Compiler and Assembler
• Some compilers will first convert
the code to assembly language and
then to machine language (or
object code)
• Some compilers will directly
convert the code to machine
language (or object code)
• The object code generated is for
particular type of processor.
Example:
• add.cpp file
• gcc -S -o add.s add.cpp
• The above command will save the assembler source code of add.cp
file in add.s file
Why need Assembly language?
• To better understand the processor.
• An assembly language program describes exactly what the hardware should
do, step by step, in terms of the basic operations of the hardware. In a high
level programming language like C or Java a programmer is mostly unaware of
computer architecture. 
• This can also help in code optimization in terms of space and time.
• In some processors it might not be feasible to code in high level
languages.
Intel 8086 Processor
• There is not just one language called "assembly language.“ Each processor family
(such as Intel, VAX, MIPS, Alpha, ...) has its own architecture, organization and
machine instructions and a corresponding assembly language.
• Learning about one processor and its assembly language is good enough to know
how things work.
• In this course we will work with intel 8088 16 bit processor, which is a part of
inter x86 family of processors.
• You will not work with the real processor but with
emulator DosBox
• Other tools you will need are assembler and debugger
Reading and References
• Reading
• Section 1.1.1 Kip Irvine
• Section 1.1 Bilal Hashmi

• References
• Chapter 1 KI
• Chapter 3 WS
• Chapter 1 BH
• Chapter 1 https://chortle.ccsu.edu/assemblytutorial/index.html

You might also like