CSI 2121 Principles of Assembly Language Programming
(3 hours of lecture per week, 1.5 hours of lab per week, 3 credits).
Assembly language fundamentals, addressing modes, number
representations, arithmetic and logic instructions, program control instructions,
array processing. Procedures, parameters passing, stack operations and
interfacing with high-level language. System
functions interrupts, and input/output operations.
Prerequisite:
CSI2111. Corequisite: CSI2167.
Professor
Jelber Sayyad
sayyad-csi2121@site.uottawa.ca
This
email address is dedicated to CSI2121 and should be used for all matters
related to this course.
Office: SITE 4027
Course material
Important Announcements
Important announcements (of important events like exams, assignments...)
will be sent to the class by email. To received these emails, you must
be registered to this course.
Office Hours
Wednesday, 14:30 to 16:00
Time table (Winter 2003)
LEC 1 - Wednesday 13:00 - 14:30 STE H0104
LEC 2 - Friday
11:30 - 13:00 STE H0104
First
Lab on Tuesday January, 14, 2003
LAB 1 - Wednesday 08:30 - 10:00 STE 0131
LAB 2 - Tuesday 17:30 - 19:00 STE 0130
LAB 3 - Wednesday 17:30 - 19:00 STE
0130
You must attend all lectures (LEC), and only
one laboratory group (LAB)
Time and location of the mid-term exam
Date: March 2, 2003 Time:
11:00 AM Room: MNT 203.
Your TAs
Mohak Shah mshah@site.uottawa.ca
LAB
Victor Jin vjin@site.uottawa.ca
Wednesday 2:30-4:00 SITE 3014
Waylan Wang wenlwang@site.uottawa.ca
Friday 2:30-4:00
CBY-B405
Evaluation
-
Exam component: 75% of your final mark.
-
Assignment component: 25% of your final mark.
-
There will be two exams. The final exam will count for 2/3 of the exam
component of your mark and the mid-term exam will count for 1/3 of the
exam component.
-
Your mid-term exam mark WILL NOT be
replaced by your final exam mark.
-
If your exam component (1/3 from midterm + 2/3 from final exam) is less
than 50%, then your mark will be determined according to the same calculation
but without exceeding the the maximum of D. Note
that D+ is the passing mark.
General philosophy of this course
In the previous course, CSI 2111/2511, you have learned
the subject of computer
architecture by following a "bottom-up" approach.
By starting from basic hardware
components (transistors and logic gates) to construct
more sophisticated circuits
(flip-flops, registers, multiplexers, decoders,
adders...), you have seen how the
processor, memory and a whole computer system is
structured. Conversely, this course
examines computer architectures by following a "top-to-bottom"
strategy. It builds
from the knowledge you have about high-level languages
like C/C++ or Pascal, and
teaches computer architectures from the programmer's
point of view. Hence you will
learn the actions that the processor must do to
perform the tasks that are formulated in a
high-level language. This implies, that you need
to learn the set of "basic actions" that
a processor can do: its
instruction set, and
how a high-level language compiler
decomposes the high-level language commands into
machine-level instructions.
However, this can be achieved only by learning the
instruction set of a processor at the
symbolic (and humanly understandable) level: the
assembly
language level .
Consequently, you will learn how to program a processor
in assembly language in order
to perform the tasks that are normally formulated
in high-level language. We will use
the Pentium processor from Intel and the TASM32
assembler from Borland.
Objectives
-
Understand the differences between machine language, assembly language,
and high level languages.
-
Become familiar with the instruction set of a processor, namely the Intel's
Pentium.
-
Understand how high-level language commands are broken into processor-level
instructions.
-
Acquire a good understanding of interrupts and exceptions.
Course content
-
Introduction and computer architecture basics.
-
Number systems and data representation.
-
Registers, variables, arrays, and addressing modes.
-
Integer arithmetic and logical operations.
-
Flow control instructions.
-
Procedures, the stack, activation records, and parameter passing.
-
Floating point representation and arithmetic.
-
High-level language interface.
-
Assembling, linking, and loading of a program.
-
Input and Output (programmed I/O, interrupt-driven I/O, and DMA).
-
Interrupts and Exception Handling.
References
All the material you need for this course is available in the lecture notes.
Most of these notes are provided courtesy of Professor Mario Marchand.
Occasional extra notes will be provided per need as we progress through
the course. Hence there is no compulsory textbook for this course. Here
is a list of suggested references:
-
Randall Hyde, The Art of Assembly
Language Programming . This is an excellent book with lots of
information and it is available for free on the web! Also, the 32-bit version
is now available! A gold mine!
-
Karen Miller, An Assembly Language Introduction to Computer Architecture
, Oxford University Press (1999). A very good book to learn data representation
and basics of computer architectures. Moreover, it uses only clean 32-bit
protected-mode programming with the flat memory model but, unfortunately,
it is too short on the instruction set.
Intel's Literature Center
Consult
Intel's
literature center to get the definitive information about Intel's processors.
In particular, consult Intel's Architecture Software Developers Manual
Vol 1, 2, and 3 of the desired processor.