Skip to content
VUBuddy

CS401 Final Term Premium Conceptual Preparation by ZB Zaib

Computer Architecture and Assembly Language Programming PDF 176 KBUpdated 23 Oct 2026
Final term past paper CS401 Final Term Premium Conceptual Preparation by ZB Zaib PDF 176 KB
vubuddy.com
Type
Final term past paper
Course
CS401 Computer Architecture and Assembly Language Programming
Size
PDF 176 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 176 KB

You get 3 free files a day on the website. Add the Chrome extension for 30 a day.

Unlimited downloads in the Android app Get it free on Google Play

Preview text

Text from pages 1, 2, 3 of 14. Download the file for all 14 pages.

CS401: Computer Architecture & Assembly · Language Programming · Premium Final Term Conceptual Study Guide · Quranic Motivation (Roman English) · File Introduction

  • This file follows the Final Term syllabus only (Topic 9.1, Page 105 to 184).
  • Lessons are deeply explained to ensure conceptual clarity.
  • Definitions are written in very simple English for easy understanding.
  • Daily life examples are used to explain technical assembly concepts.
  • VU exams are conceptual; focus on " How" and " Why" rather than just " What".
  • Students must read LMS handouts at least three times.
  • This file supports LMS handouts; it does not replace them.

Lesson-wise Content (In the Name of Allah)

Topic 9.1: Hardware Interrupts

Concept: Hardware interrupts are signals sent by external devices (like keyboard, mouse, or timer) to the processor. When a device needs attention, it "interrupts" the processor's current work. The processor stops, handles the request, and then goes back to its original task.

The processor is always busy executing instructions. If a key is pressed, the keyboard controller sends a signal to the Programmable Interrupt Controller (PIC). The PIC then “Insaan ke liye wahi kuch hota hai jis ke liye woh khud mehnat aur koshish karta hai.”Reference: Surah An-Najm, Ayah 39 tells the processor that a device needs help. The processor uses an Interrupt Vector Table (IVT) to find the address of the code (ISR) that knows how to handle that specific device.

Topic 9.2: I/O Ports

Concept: I/O ports are like "mailboxes" or "doors" through which the processor talks to hardware devices. Every device has a specific port number (address).

Unlike memory which stores data, I/O ports are used to control hardware. The processor uses special instructions like IN (to read from a device) and OUT (to send data to a device). In the IBM PC, there are 65,536 possible I/O ports.

Topic 9.3: Terminate and Stay Resident (TSR)

Concept: A TSR is a special type of program that, after it finishes its initial execution, stays in the computer's memory (RAM) and continues to work in the background.

Normally, when a program ends, its memory is freed for other programs. But a TSR uses a special DOS service ( INT 21h, Service 31h ) to tell the operating system: "I am done for now, but keep my code in memory because I need to respond to interrupts later." Example: Imagine you are reading a book (Processor executing a program). Suddenly, your doorbell rings (Hardware Interrupt). You put a bookmark in your book (Save current state), go to the door to check who it is (Execute ISR), and after talking to the person, you come back and start reading from where you left off (Resume program).

Example: Think of a large apartment building. Each apartment has a mailbox (I/O Port). If the manager (Processor) wants to give a message to a specific resident (Hardware Device), he puts it in that specific mailbox. If he wants to receive a message, he checks that mailbox.

Example: Think of a security guard at a bank. He arrives in the morning (Program starts), sets up his chair (Initialization), and then just sits there (Stays Resident). He isn't actively "working" until someone tries to enter (Interrupt), then he acts, and goes back to sitting.

Topic 10: Video Services & BIOS/DOS Interrupts

Concept: Instead of writing complex code to control the screen or hardware directly, we use " Services" provided by BIOS (Basic Input/Output System) and DOS.

BIOS interrupts (like INT 10h for video) are built into the hardware's ROM. DOS interrupts (like INT 21h ) are provided by the Operating System. These services make a programmer's life easy because they handle the difficult hardware details for us.

Topic 11: Serial and Parallel Ports

Concept: These are ways to connect external devices like printers (Parallel) or modems (Serial) to the computer.

  • Parallel Port: Sends multiple bits of data at the same time (like an 8-lane highway). It is fast but only for short distances.
  • Serial Port: Sends data one bit at a time (like a single-lane road). It is slower but can work over long distances.

Conceptual Questions (Short & Long)

Q1. Why do we push all registers at the start of an ISR?

Answer: We push registers to save their current values. Since an interrupt can happen at any time, the registers might be holding important data for the main program. If the ISR changes them, the main program will crash when it resumes. Example: If you want to travel to another city, you don't build a car yourself (Direct Hardware Access). Instead, you call a taxi service (BIOS/DOS Interrupt). You just tell the driver where to go, and he handles the engine, steering, and roads for you.

Example: Parallel: 8 people walking side-by-side through a wide gate. Serial: 8 people walking one after another through a narrow door.

All CS401 files →
CS401 Computer Architecture and Assembly Language Programming All CS401 handouts, past papers, quizzes and MCQs in one place. Open course page

Get more out of VUBuddy, for free

Android app Free on Google Play
  • Unlimited downloads
  • The explanation behind every MCQ answer
  • Study offline on slow data
Get the Android app
Chrome extension Free on the Chrome Web Store
  • 30 downloads a day instead of 3
  • Sign in and buy Pro Semester here
Add to Chrome

One Pro Semester membership works in both the extension and the app.