CS401_Short_Notes_Chapter_8.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_8.pdf for free?

You can preview and download "CS401_Short_Notes_Chapter_8.pdf" (CS401 PDF, ~450 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs401-short-notes-chapter-8-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 8 (LECTURE 22-23)
                   PREPARED BY: HTTPS://SUPERSTARWEBTECH.BLOGSPOT.COM/

Short Notes Chapter 8 (Lecture 22-23):
Interrupts are asynchronous and unpredictable.
Asynchronous means that the interrupts occur, independent of the working of the processor,
i.e. independent of the instruction currently executing.
Synchronous events are those that occur side by side with another activity.
Why interrupts must be asynchronous?
Interrupts must be asynchronous as they are generated by the external world which is unaware
of the happenings inside the processor. True interrupts that occur in real time are
asynchronous with the execution. Also, it is unpredictable at which time an interrupt will come.
Unpredictable means the time at which an interrupt will come cannot be predicted, while
asynchronous means that the interrupt has nothing to do with the currently executing
instruction and the current state of the processor.
The 8088 processor divides interrupts into two classes:

   •   Software interrupts and
   •   Hardware interrupts
Hardware interrupts are the real interrupts generated by the external world while Software
interrupts on the contrary are not generated from outside the processor
The interrupt call loads new values in CS, IP, and FLAGS.
How an interrupt is generated?
To generate an interrupt the INT instruction is used. The routine that executes in response to
an INT instruction is called the interrupt service routine (ISR) or the interrupt handler.
What is hooking and interrupt?
The software interrupt mechanism in 8088 uses vectored interrupts meaning that the address
of the interrupt routine is not directly mentioned in an interrupt call, rather the address is
lookup up from a table. 8088 provides a mechanism for mapping interrupts to interrupt
handlers. Introducing a new entry in this mapping table is called hooking an interrupt.
Syntax of the INT instruction: is very simple. It takes a single byte argument varying from 0-
255.
A few interrupt numbers in the start are reserved and we generally do not use
them. They are related to the processor working.

                                  SUPERSTARWEBTECH.BLOGSPOT.COM
                         CS401-ASSEMBLY LANGUAGE AND PROGRAMMING
                              CS401 CHAPTER NO 8 (LECTURE 22-23)
                    PREPARED BY: HTTPS://SUPERSTARWEBTECH.BLOGSPOT.COM/

For example: INT 0 is the divide by zero interrupt.
Interrupt Vector table:
The correlation process from the interrupt number to the interrupt handler uses a table called
interrupt vector table.
Location & Structure of IVT:
Its location is fixed to physical memory address zero. Each entry of the table is four bytes long
containing the segment and offset of the interrupt routine for the corresponding interrupt
number. The first two bytes in the entry contain the offset and the next two bytes contain the
segment.
INT 1 vector occupies location 4, 5, 6, and 7 and similarly vector for INT 2 occupies locations 8,
9, 10, and 11
Reserved Interrupts:
INT 0, Division by zero
Meaning the quotient did not fit in the destination register. INT 0 is automatically generated by
a DIV when a specific situation arises, there is no INT 0 instruction.
INT 1, Trap, Single step Interrupt
This interrupt is used in debugging with the trap flag. If the trap flag is set the Single Step
Interrupt is generated after every instruction.
By hooking this interrupt, a debugger can get control after every instruction and display the
registers etc. 8088 was the first processor that has this ability to support debugging.
INT 2, NMI-Non Maskable Interrupt
Real interrupts come from outside the processor. INT 0 is not real as it is generated from inside.
For real interrupts there are two pins in the processor, the INT pin and the NMI pin. The
processor can be directed to listen or not to listen to the INT pin.
The NMI pin which informs about fatal hardware failures in the system and is tied
to interrupt 2. INT pin can be masked but NMI cannot be masked.
INT 3, Debug Interrupt
The only special thing about this interrupt is that it has a single byte opcode and not a two-byte
combination where the second byte tells the interrupt number. This allows it to replace any
instruction whatsoever. It is also used by the debugger.

                                SUPERSTARWEBTECH.BLOGSPOT.COM
                        CS401-ASSEMBLY LANGUAGE AND PROGRAMMING
                             CS401 CHAPTER NO 8 (LECTURE 22-23)
                   PREPARED BY: HTTPS://SUPERSTARWEBTECH.BLOGSPOT.COM/

INT 4, Arithmetic Overflow, change of sign bit
The overflow flag is set if the sign bit unexpectedly changes as a result of a mathematical or
logical instruction.
However, the overflow flag signals a real overflow only if the numbers in question are treated
as signed numbers.
So, this interrupt is not automatically generated but as a result of a special instruction INTO
(interrupt on overflow) if the overflow flag is set. Otherwise the INTO instruction behaves like a
NOP (no operation).
BIOS AND DOS INTERRUPTS
Since the manufacturer knows the hardware, it burns the software to control its hardware in
ROM. Such software is called firmware and access to this firmware is provided through
specified interrupts. This basic interface to the hardware is called BIOS (basic input output
services).
BIOS has the responsibility of testing the basic hardware including video, keyboard, floppy
drive, hard drive etc. and a special program to bootstrap.
Bootstrap means to load OS from hard disk and from there OS takes control and proceeds to
load its components and display a command prompt in the end.
There are two important programs;

   •   BIOS and
   •   OS
BIOS AND OS COMPARISON:

   •   OS services are high level and build upon the BIOS services.
   •   BIOS services are very low level.
   •   BIOS services provide a hardware independent layer above the hardware and OS

More CS401 files

All CS401 files · Midterm Prep 2026 · MCQs Bank