You are on page 1of 24

CSC2201 Computer

Organization and Assembly


Language
Instructor Mr. Saqib Sadiq
Course Description

• This course covers the fundamental concepts of Computer organization and


Assembly language.
• The topics include: Octal and hexadecimal number systems, ASCII codes,
Assembly language programming. Instruction formats and types, memory
and I/O instructions, arithmetic instructions, addressing modes, stack
operations, procedures, conditional processing, shift and rotate instructions
along with Multiplication and division. Advance procedures and interrupt
handling. Practice of assembly language programming.
Course Objectives

• The main objective of this course is to introduce the organization of


computer systems and usage of assembly language for optimization and
control.
• Emphasis should be given to expose the low-level logic employed for
problem solving while using assembly language as a tool.
• At the end of the course the students should be capable of writing
moderately complex assembly language subroutines and interfacing them
to any high level language.
Learning Outcomes

• Discuss and write programming code for the basic arithmetic and logic
operations available in assembly language;
• Write assembly language code demonstrating how 8, 16-bit values can be
used.;
• Discuss and illustrate with programming code the use of branching, flags,
stacks, procedures, and interrupts;
• Solve a given problem by writing programs in assembly language
Teaching and Learning Methodology

• All sessions will be conducted in the classroom. Students will be presented


with theory portion.
• Discussion will be held in order to clarify the concepts related to the topic on
the whiteboard.
• An exercise will be given to help reinforce the concepts.
• Assignments and quizzes will be given to test the students’ knowledge.
Mark(s) Distribution

For D Grade
Marks Head Total Frequency Total Exempted Marks /Frequency Total Marks /Head Learning Outcomes
Holder(s)

Quiz 3 1 5 10 Included

Assignment 3 1 5 10 Included

Final Paper 1 0 35 35 Included

Mid Term Paper 1 0 20 20 Included

Project 1 0 20 20 Included

Class Participation 1 0 5 5 Included

Total Marks 100 100 (For DGs)


Course Resource(s)
• Text Book
• Assembly Language for x86 Processors, 6th Edition, Kip R. Irvine, Prentice Hall, 2010
• Reference Book(s)
• Computer Organization and Design, 3rd Edition, David Peterson, Morgan Kaufman,
2005
• Programming Tool(s)
• Emu8086®, https://download.cnet.com/Emu8086-Microprocessor-Emulator/3000-
2069_4-10392690.html
• Virtual representation of the 8086 micro-processor
• Originally Manufactured by the Intel corp.
Session One
Lesson Plan

• Introduction to Computer Organization


• Welcome to Assembly Language
• Assemble-link-execute cycle
• Assembly Language Applications
• Virtual Machine Concepts
Introduction to Computer Organization

• Components of a micro-computer system


• Formed by Integrated-Circuits (IC)
• Central Processing Unit (CPU), Memory circuits & I/O circuits
• I/O is used for interfacing with the external world
• We will discuss input/output later in the course
• While memory is the processor’s internal world
Introduction to Computer Organization

Central
Memory
Processing
Circuits
Unit

Input/output
Circuits

• The whole working of the computer is performing an operation by the


processor on data, which resides in memory
• Can you identify the IC from this diagram?
Introduction to Computer Organization

• Bonus content!
• To get a better understanding of these concepts, I urge you to watch the following TED
Ed video on YouTube:
• https://www.youtube.com/watch?v=AkFi90lZmXA
• We will be further discussing the concepts presented in the video
Session One
Lesson Plan

• Introduction to Computer Organization


• Welcome to Assembly Language
• Assemble-link-execute cycle
• Assembly Language Applications
• Virtual Machine Concepts
Welcome to Assembly language

• Primary purpose of using AL is to increase efficiency


• Compilers of high-level languages (for example JAVA) act as translator
• Everything eventually becomes machine language
• AL removes the middle man, in this context we mean the compiler
• This allows the programmer to have privileged access to the underlying hardware
Welcome to Assembly language

• Assembly Language is a low-level programming language. It helps in


understanding the programming language to machine code.
• Assembly Language mainly consists of mnemonic processor instructions or
data and other statements or instructions.
• Assembly language helps programmers to write human-readable code that
is almost similar to machine language. Machine language is difficult to
understand and read as it is just a series of numbers.
Welcome to Assembly language

• The learning of assembly language is still important for programmers. It


helps in taking complete control over the system and its resources. By
learning assembly language, the programmer can write the code to access
registers and retrieve the memory address of pointers and values.
• Learning Assembly language helps in understanding the work of processors
and memory.
Session One
Lesson Plan

• Introduction to Computer Organization


• Welcome to Assembly Language
• Assemble-link-execute cycle
• Assembly Language Applications
• Virtual Machine Concepts
The Assemble-Link-Execute Cycle
Session One
Lesson Plan

• Introduction to Computer Organization


• Welcome to Assembly Language
• Assemble-link-execute cycle
• Assembly Language Applications
• Virtual Machine Concepts
Assembly language Applications

• If you have ever installed a physical device on your computer you have used
assembly
• Your device (e.g. printer, camera etc.) can not work with out a device driver.
That device driver is most likely written in assembly
• It is also present in your operating system’s kernel.
• I will be giving an assignment that further elaborates this point
Session One
Lesson Plan

• Introduction to Computer Organization


• Welcome to Assembly Language
• Assemble-link-execute cycle
• Assembly Language Applications
• Virtual Machine Concepts
Virtual Machine Concepts

• We will be using a virtual processor to practice our assembly language


coding.
• This is a safer approach, for if we use our actual processors we may very well
damage them
• In the coming sessions we will be exploring the emulator further to see how
this virtual machine works and how we can interact with it.
Summary

• Today we examined the importance of AL


• The benefits it provides
• Components of a micro-computer
• How assembly language can be applied
• We looked at the Assemble-Link-Execute cycle
• We talked about running our code on a virtual processor
Today’s Practical

• Please ensure you have installed a copy of Emu8086 on your workstation.


• You will need this tool to complete tutorials for this course.
Thanks

• Any questions?
• Feel free to reach out
• saqib.sadiq@szabist.pk

You might also like