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!

+ Click Here To Join also Our facebook study Group.

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


See Your Saved Posts Timeline

Views: 4093

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

Attachments:

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()

Clrscr();

_AH=0x48

_DL=0x80;

tempbuffer.size=60;

_SI=(int) and tempbuffer;

geninterrput (0x13);

printf(“Heads= % Id

\n sectors = % Id

\nTracks/cylinder = Id

\n Bytes per sectors =% d

\n

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

tempbuffer.bytesPerSectors;

}

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<bios.h>

#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;

}

Tempbuffer;

void main()

{

clrscr();

_AH=0x48;

_DL=0x80;

Tempbuffer.size=60;

_SI=(int) &Tempbuffer;

geninterrupt(0x13);

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);

getch();

}

 Zubair-Jamshaid
is it correct?

yes 

RSS

Today Top Members 

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

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