Computer Organization and Assembly Language (CS2523)

Pre-requisite(s)

Operating Systems (CS-3413)

Recommended Book(s)

Computer Organization & Architecture By William Stallings
Using Assembly Language By Allen L. Wyatt

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 is 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 able to: Identify the major components of computer architecture, and explain their purposes and interactions. Simulate the internal representation of data, and show how data is stored and accessed in memory. Explain the relationships between hardware architecture and its instruction set, and simulate micro-programs. Explain the Instruction Execution Cycle. Explain the differences and relationships among high-level, assembly, and machine languages. Write well-modularized computer programs in an assembly language, implementing decision, repetition, and procedure structures. Write moderately complex assembly language subroutines and interfacing them to any high l

Course Learning Outcomes (CLO)

Course Objectives

Course Contents

Introduction to Computer Organization & Assembly Language

Introduction to computer organization & architecture
General introduction of the course
Assembly and Machine language
Compiler and assembler
Why learn assembly
Comparison of assembly and high level language
Programmer’s view of a computer system ( App. Program, assembly language, operating system, instruction set architecture, microarchitecture, digital logic)

Data Representation

Data representation
Binary numbers
Converting binary to decimal
Hexadecimal integers
Hexadecimal to binary
Decimal to hexadecimal
Integer storage sizes
Binary addition
Hexadecimal addition
Signed Integers(sign-magnitude, Biased representation)
Signed Integers (1’s complement, 2’s complement)
Dis advantages of signed magnitude.
Excess representation
floating point representation
Summary of number representation
2’s complement of hexadecimal ranges of signed integers
carry and overflow
character storage
Printable ASCII Codes
control characters.

Intel 8088 (IAPX 88) micro-processor

Introduction to the IAPX88 architecture
Registers (General Purpose, Pointer register, Segment register)
The 88 flag register and interruption of flags ( ZF, CF, SF, OF, AF, PF, IF)
Instruction groups (Data Movement, arithmetic and logic, control, special instructions)

Implementing assembly code

First assembly program
Tools debugger
Linker
Assembler
How to assemble and run the assembly program
Segmented memory model in IAPX88
Using the debugger to explain the segmented memory model
Discussion on the Command file
List file
Relative address and physical address.

Address calculation, Segmented memory model, Data Declaration

Offset, segment
physical address calculation
paragraph boundaries
overlapping segments
Exercise questions from the notes
Data declaration
difference between direct and in direct addressing
assembly programs showing different ways to represent data in the memory
Register addressing
memory addressing register to memory
memory to register
register to register
register to constant.
Segments, default segments in direct and indirect modes
[base + offset + index] method to calculate the effective address and using it with the associated segment to calculate the physical address.

 

Conditional Jumps, Un conditional Jumps

Comparisons & Conditions
CMP instructions
working of CMP
Flag table and possible conditions using flags
Conditional Jumps
Interpretation of flags using conditional jumps
Unconditional Jumps
Relative addressing
Short, Near, Far Jumps
Bubble Sort
Questions from exercises

Bit manipulation

Bit manipulations
Shifting and rotation
SHR,SHL,SAR,SAL,ROR,ROL,RCL,RCR

Register operations

Multiplication Algorithm
limitations in multiplication using MUL instruction
Extended shift operations
Add with carry operation
Subtract with carry
Improvement on the Multiplication algorithm using extended shift and adc operations
Masking operations Selective bit retrieval
selective bit set, selective bit inverse
Selective bit not

Subroutines

Subroutines using Stack introduction
Using Call
Ret instruction
Parameter Passing in the stack and stack operations
Writing bubble sort code for generic implementation of the subroutines
Questions from exercises

 Display Memory

Display memory concepts of the graphic card and introduction to the graphic memory area
Representing characters and representing numbers

Mapping of CLOs to Assessment Modules

Final Exam

Assignments 

Surprise Tests/Quizzes

Project

Midterm Exam