We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

Instructions: Please read the following instructions carefully before submitting assignment. It should be clear that your assignment will not get any credit if:  The assignment is submitted after due date.  The submitted assignment does not open or file is corrupt.  Assignment is copied (partial or full) from any source (websites, forums, students, etc.) Note: After solving both questions, you have to upload only a single .doc or .docx file. There is no need to send .EXE file for Question 2. Write code in a Word file. Assignment in any other format (extension) will not be accepted and will be awarded with zero marks. Lectures Covered: This assignment covers Lecture # 29 to Lecture # 32. Objective: The objective of this assignment is to provide hands on experience of:  Understanding system programming concepts including BIOS Parameter Block and Drive Parameter Block.  Reading dump of main memory and extracting information from it  Reading various parameters of hard disk using interrupt 21/32H For any query about the assignment, contact at CS609@vu.edu.pk Question 1: [10 marks] Drive Parameter Block (DPB) is a data structure maintained by operating system in the main memory. The operating system translates information from BIOS Parameter Block (BPB) and stores it in DPB. Suppose we have accessed DPB through undocumented service 21/32H. The dump of the memory, having contents of DPB for a FAT12 system is given below: Read this dump file, and fill the table by calculating/finding following parameters: Sr. No. Parameter Value 1 Drive number 2 Unit number within device driver 3 Bytes per sector 4 Highest sector number within a cluster 5 Shift count to convert clusters into sectors 6 Number of reserved sectors at beginning of drive 7 Number of FATs 8 Number of root directory entries 9 Number of first sector containing user data 10 Highest cluster number Question 2: [5 marks] The following program uses interrupt 13/48H to get parameters of removable/portable disk drive. Complete the program as instructed below. [NOTE: we are using a buffer called TempBuffer for storing result]. Instructions for Question 2:  The drive you are going to access must be a removable or portable drive. (Assume that you have already inserted it in your system before running this program)  Set the size of TempBuffer to 60 bytes  Load the segment address of TempBuffer in appropriate register before invoking interrupt  Print Heads, Sectors, Cylinder, and count of Bytes per Sector from TempBuffer (after invoking interrupt) on the screen using printf() function #include #include struct TempBuffer { int size; int flags; long int cylinders; long int heads; long int sectors; long int lowCount; long int highCount; int bytesPerSector; long int configPointer; } tempbuffer; void main() { // write your code here } Best of Luck!

Share This With Friends......

+ Click Here To Join also Our facebook study Group.

This Content Originally Published by a member of VU Students.

+ Prohibited Content On Site + Report a violation + Report an Issue

..How to Join Subject Study Groups & Get Helping Material?..

Views: 4082

See Your Saved Posts Timeline


Replies to This Discussion

Print Heads, Sectors, Cylinder, and count of Bytes per Sector from TempBuffer

ko print krvana hy..

ap ny sab ko print krva dya hy.

mery khial mn sirf etna ay ga.

void main()





_SI=(int) and tempbuffer;

geninterrput (0x13);

printf(“Heads= % Id

\n sectors = % Id

\nTracks/cylinder = Id

\n Bytes per sectors =% d


tempbuffer.heads, tempbuffer.sectors, tempbuffer.cylinders,



Sir kia ye run b ho raha hai mery pass to error a raha hai ap plz confirm kr dain taky assignment send ki ja sakye

TIme is very short sir

bro code kia notepad me type kerna hia kia???

MS word mai sir


#include <dos.h>

struct TempBuffer


int size;

int flags;

long int cylinders;

long int heads;

long int sectors;

long int lowcount;

long int highcount;

int bytesPersector;

long int configpointer;



void main()






_SI=(int) &Tempbuffer;


printf("heads=%d\n sectors=%d\n Tracks/cylinders=%d\n Byte s per sector=%d\n Block count Low word=%d\n Block count Hi Word=%d\n",Tempbuffer.heads, Tempbuffer.sectors, Tempbuffer.cylinders,Tempbuffer.bytesPersector,Tempbuffer.lowcount,Tempbuffer.highcount,Tempbuffer.configpointer);



is it correct?



© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service