CS401_Short_Notes_Chapter_9.pdf

Verified academic study resource for CS401 (Computer Architecture & Assembly Language) under the Computer Science at Virtual University of Pakistan. This PDF document (Official Lecture Handouts & Highlighted Notes) covers Complete Course Handouts (Lectures 1 to 45) spanning approximately 450 pages across 8 curriculum modules, and is indexed for student examination review with instant in-browser preview and 100% free direct download.

Course
CS401 – Computer Architecture & Assembly Language
Faculty
Computer Science
Format
PDF
Type
Handout
Coverage
Complete Course Handouts (Lectures 1 to 45)

Virtual University examiners construct 100% of objective MCQs and subjective marking schemes directly from the official CS401 handouts.

What this file covers — CS401 syllabus roadmap

  1. Core Architecture, Syntax & Primitive Data Structures — Lectures 1 to 6 (Pages 1 to 65). 15% Objective Marks (8–10 MCQs)
  2. Conditional Branching, Loops & Logical Control Flow — Lectures 7 to 12 (Pages 66 to 140). 18% Exam Marks (MCQs + 2-Mark Short Questions)
  3. Memory Management, Pointers, Arrays & Functions — Lectures 13 to 18 (Pages 141 to 215). 22% Exam Marks (High Yield for Midterms)
  4. Midterm Consolidation, Strings & Algorithm Synthesis — Lectures 19 to 22 (Pages 216 to 280). Midterm Exam Culmination (Lectures 1–22 Scope)
  5. Object-Oriented Paradigms: Classes & Data Abstraction — Lectures 23 to 29 (Pages 281 to 360). 16% Final-Term Marks (Core OO Concepts)
  6. Inheritance Hierarchies & Dynamic Polymorphism — Lectures 30 to 36 (Pages 361 to 435). 20% Final-Term Marks (Virtual Functions & V-Tables)
  7. Templates, Standard Library & Persistent File I/O — Lectures 37 to 41 (Pages 436 to 510). 14% Final-Term Marks (Generic Code & Streams)
  8. Final-Term Examination Dossier & Capstone Synthesis — Lectures 42 to 45 (Pages 511 to 585). Final-Term Exam Synthesis (Lectures 23–45 Scope)

Frequently asked questions

Where can I download CS401_Short_Notes_Chapter_9.pdf for free?

You can preview and download "CS401_Short_Notes_Chapter_9.pdf" (CS401 PDF, ~450 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs401-short-notes-chapter-9-pdf-2) with 100% free high-speed downloads and zero registration requirements.

What syllabus chapters and lectures are covered in this CS401 file?

This document covers Complete Course Handouts (Lectures 1 to 45) across 8 distinct lecture units (Lectures 1 to 6, Lectures 7 to 12, Lectures 13 to 18, Lectures 19 to 22, Lectures 23 to 29, Lectures 30 to 36, Lectures 37 to 41, Lectures 42 to 45), featuring comprehensive definitions, solved objective questions, and examiner marking rubrics.

What is the passing criteria for CS401 under the VU 20% Two-Half Rule?

Under official Virtual University regulations, students must score at least 20% in the First Half (Quizzes, Assignments, GDBs, and Midterm combined) AND independently at least 20% in the Final-Term examination paper. Scoring under 20% in the final exam results in an automatic F grade regardless of earlier marks.

Are CS401 solved past papers and handouts verified for 2026 exams?

Yes. All CS401 materials on MIHORA VU—including Moaaz, Waqar Siddhu, and team archives—are reviewed against the current VU syllabus to help students prepare for 2026 Midterm, Final-Term, and online quiz examinations.

Inside this file

                                SUPERSTARWEBTECH.BLOGSPOT.COM
                        CS401-ASSEMBLY LANGUAGE AND PROGRAMMING
                             CS401 CHAPTER NO 9 (LECTURE 24-27)
                   PREPARED BY: HTTPS://SUPERSTARWEBTECH.BLOGSPOT.COM/

Short Notes Chapter 9 (Lecture 24-27):
INT pin:
There is a single pin outside the processor called the INT pin that is used by external hardware
to generate interrupts.
PIC:
Since there are many devices generating interrupts and there is only one pin going inside the
processor and one pin cannot be technically derived by more than one source a controller is
used in between called the Programmable Interrupt Controller (PIC).

   •   It has eight input signals and one output signal.
   •   It assigns priorities to its eight input pins from 0 to 7
   •   The eight input signals to the PIC are called Interrupt Requests (IRQ).
   •   The eight lines are called IRQ 0 to IRQ 7. These are the input lines of the 8451.
For example:

   •   IRQ 0 is derived by a timer device. The timer device keeps generating interrupts with a
       specified frequency.
   •   IRQ 1 is derived by the keyboard when generates an interrupt when a key is pressed or
       released.
   •   IRQ 2 is the cascading interrupt connected to the output of the second 8451 in the
       machine.
   •   IRQ 3 is connected to serial port COM 2.
   •   IRQ 4 is connected to serial port COM 1.
   •   IRQ 5 is used by the sound card or the network card or the modem.
   •   IRQ 6 is used by the floppy disk drive.
   •   IRQ 7 is used by the parallel port.
IRQ conflict:
An IRQ conflict means that two devices in the system want to use the same IRQ line.
Mapping:
Each IRQ is mapped to a specific interrupt in the system. This is called the IRQ to INT mapping.
IRQ 0 to IRQ 7 are consecutively mapped on interrupts 8 to F. This mapping is done by the PIC
and not the processor.

                                 SUPERSTARWEBTECH.BLOGSPOT.COM
                         CS401-ASSEMBLY LANGUAGE AND PROGRAMMING
                              CS401 CHAPTER NO 9 (LECTURE 24-27)
                    PREPARED BY: HTTPS://SUPERSTARWEBTECH.BLOGSPOT.COM/

End of Interrupt:
At the end of servicing the interrupt the handler should inform the PIC that it is completed so
that lower priority interrupts can be sent from the PIC. This signal is called an End of Interrupt
(EOI) signal and is sent through the I/O ports of the interrupt controller.
Every interrupt handler invoked because of an IRQ must signal an EOI otherwise lower priority
interrupts will remain disabled.
I/O PORTS
For communicating with peripheral devices, the processor uses I/O ports. There are only two
operations with the external world possible, read or write.
We have the IN and OUT instructions to read or write from the peripheral address space.
When MOV is given the processor selects the memory address space, when IN is given the
processor selects the peripheral address space.
IN and OUT instructions
The IN and OUT instructions have a byte form and a word form but the byte form is almost
always used. The source register in OUT and destination register in IN is AL or AX depending on
which form is used.
The port number can be directly given in the instruction if it fits in a byte otherwise it has to
be given in the DX register. Port numbers for specific devices are fixed by the IBM standard.
For example: 20 and 21 are for PIC, 60 to 64 for Keyboard, 378 for the parallel port etc.
A few examples of IN and OUT are below:
in al, 0x21
mov dx, 0x378
in al, dx
out 0x21, al
mov dx, 0x378
out dx, al
PIC Ports
Programmable interrupt controller has two ports 20 and 21. Port 20 is the control port while
port 21 is the interrupt mask register which can be used for selectively enabling or disabling
interrupts.

                                   SUPERSTARWEBTECH.BLOGSPOT.COM
                        CS401-ASSEMBLY LANGUAGE AND PROGRAMMING
                             CS401 CHAPTER NO 9 (LECTURE 24-27)
                   PREPARED BY: HTTPS://SUPERSTARWEBTECH.BLOGSPOT.COM/

How the keyboard controller communicates with the processor?
Keyboard is a collection of labeled buttons and every button is designated a number (not the
ASCII code). This number is sent to the processor whenever the key is pressed. From this
number called the scan code the processor understands which key was pressed.
For each key the scan code comes twice, once for the key press and once for the key release.
Both are scan codes and differ in one bit only. The lower seven bits contain the key number
while the most significant bit is clear in the press code and set in the release code.
Parallel port views:
The parallel port has two views:

   •   The connector that the external world sees and
   •   The parallel port controller ports through which the processor communicates with the
       device connected to the parallel port.
Parallel port connector:
The parallel port connector is a 25pin connector called DB-25. Different pins of this connector
have different meanings. Some are meaningful only with the printer**. This is a bidirectional
port so there are some pins to take data from the processor to the parallel port and others to
take data from the parallel port to the processor.
Important pins for our use are

   •   The data pins from pin 2 to pin 9 that take data from the processor to the device.
   •   Pin 10, the ACK pin, is normally used by the printer to acknowledge the receipt of data
       and show the willingness to receive more data. Signaling this pin generates IRQ 7 if
       enabled in the PIC and in the parallel port controller.
   •   Pin 18-25 are ground and must be connected to the external circuit ground to provide
       the common reference point otherwise they won’t understand each other voltage
       levels.
This is the external view of the parallel port. The processor cannot see these pins. The
processor uses the I/O ports of the parallel port controller.
The first parallel port LPT1 has ports designated from 378 to 37A. The first port 378 is the data

More CS401 files

All CS401 files · Midterm Prep 2026 · MCQs Bank