CS401 CURRENT FINALTERM SOLVE PAPER 

Int 21 creat or free memory

In x86 assembly language, the INT 21h instruction is used to make a software interrupt to the DOS (Disk Operating System) interrupt handler. The INT 21h interrupt is a versatile way to perform various functions related to input/output, file manipulation, memory allocation, and more within DOS.

Interrupt gate descriptor

An interrupt gate descriptor in x86 architecture is a data structure in the Interrupt Descriptor Table (IDT) that specifies the location (offset and segment selector) of an interrupt handler routine, along with attributes like privilege level and type. It helps manage and execute interrupt service routines effectively.

 

Int 10 main 10h ki service write krna the

MOV AH, 0Ah          ; AH = 0Ah for scrolling function

MOV AL, lines_to_scroll  ; AL = Number of lines to scroll (1 or more)

MOV BH, color_attribute ; BH = Color attribute for new lines

MOV CH, start_row     ; CH = Starting row for scrolling region

MOV CL, start_col     ; CL = Starting column for scrolling region

MOV DH, end_row       ; DH = Ending row for scrolling region

MOV DL, end_col       ; DL = Ending column for scrolling region

 

INT 10h               ; Call the BIOS video interrupt

 

; Your code continues...

 

Cs401

Sun-sparc has _24 register are in register window.

Int 10 window scroll up window is a type of video services used in which mode _Graphics.

Illustrate the difference between in naming convection of Pascal and   c.


The "window scroll up" video service (INT 10h) is primarily used in Text mode, not in Graphics mode.

Difference in naming conventions between Pascal and C: Pascal uses "CamelCase" (capitalized words) for naming, while C uses "snake_case" (lowercase words separated by underscores). For example, in Pascal: ScrollWindowUp, and in C: scroll_window_up.

 

 

BIOS stands for and describe the service used is 13.

BIOS stands for "Basic Input/Output System." It's firmware embedded in a computer's motherboard that initializes hardware components during boot and provides low-level functions for hardware interactions. Service 13 (INT 13h) is a BIOS service used for disk-related operations like reading and writing sectors on storage devices.

PIC stands for and describe it's instructions etc.

PIC stands for "Programmable Interrupt Controller." It's a hardware device used to manage and prioritize interrupts in computer systems. It allows the system to handle multiple interrupt sources and distribute them to the CPU. PIC instructions involve configuring interrupt sources, assigning priority levels, and enabling or disabling interrupt lines.

 

 

Cs401

Mcqs moazz file sy...

Int 10 services

The INT 10h services are BIOS interrupt services for video-related tasks. They include functions for controlling cursor position, displaying characters, changing video modes, and scrolling text on the screen in text mode. These services are often used in assembly programming for managing text-based output and screen manipulation.

Int 21 services

The INT 21h services are DOS interrupt services used in x86 assembly programming for various input/output and file manipulation tasks. They provide functions for reading and writing files, creating directories, managing files, and interacting with the console. These services are essential for interacting with the underlying operating system in DOS-based environments.

Interrupt number and handler

An interrupt number is a unique identifier assigned to different types of hardware or software events in a computer system. An interrupt handler is a software routine associated with a specific interrupt number. When an interrupt occurs, the corresponding handler is executed to manage the event, which can range from hardware events like keyboard input (interrupt number 9) to software events like system calls (interrupt number 0x80 in x86 Linux).

Why program crashed on pressing esc key

Pressing the "Esc" key can lead to a program crash due to unhandled keyboard interrupts. If the program doesn't have an interrupt handler to manage keyboard events, pressing "Esc" might trigger an unexpected behavior or crash. This happens because the default response to unhandled interrupts can cause the program to terminate or behave unpredictably.

Priority interrupt


A priority interrupt is a mechanism where the system assigns levels of urgency to different types of interrupts. When multiple interrupts occur simultaneously, the one with the highest priority is processed first. This ensures critical tasks are addressed promptly, minimizing delay and optimizing system responsiveness.

Gdt structure

The Global Descriptor Table (GDT) is a data structure in x86-based systems that holds segment descriptors. Each descriptor defines the attributes and memory access rights of a memory segment, such as code, data, or stack. It consists of entries with fields like base address, limit, access rights, and flags, enabling memory segmentation and protection


REPE or REPNE

 

REPE (repeat while equal) and REPNE (repeat while not equal)

REPE and REPNE prefixes are used in SCOS. (imp)

 

VESA instructions

VESA:

( video electronics standard association) VESA VBE 2.0 standard linear frame buffer mode,  allows direct access to   video memory

VESA defined modes:

4117 (1024X768),

16 bit color:

5:6:5 format

5bits:  red

6 bits: green

5 bits: blue  total 64 k colours

 

Device driver

Device drivers are operating system extensions that become part of the operating system and extend its services to new devices. Device drivers in DOS are very simple. They just have their services exposed through the file system interface. Device driver file starts with a header

 

Scheduler or context

·         The Task Scheduler enables applications to use one or more scheduler instances to schedule work. The concurrency::Scheduler class represents a scheduler instance and encapsulates the functionality that is related to scheduling tasks. A thread that is attached to a scheduler is known as an execution context, or just context.