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

Attachments:

Replies to This Discussion

share the solution.

girls ki posts par reply karnay walo...kabi kabi boys ki post par bi kar dia karo :P

Solution to question no 1.

Sr.No

Parameter

Value

1

Drive number

0

2

Unit number within device driver

0

3

Bytes per sector

0200H = 512 bytes

4

Highest sector number within a cluster

4

5

Shift count to convert clusters into sectors

0

6

Number of reserved sectors at beginning of drive

0005

7

Number of FATs

2

8

Number of root directory entries

1E = 30

9

Number of first sector containing user data

45 = 69

10

Highest cluster number

0C45 = 3141

Bhai bilal 2nd ka bhi solution bata de 

Bhai Bilal ap ye bata sakte ho Q.1 ka jo solved hai wo handout k konse page num se kia hai Plz thank u

thanks bt 2nd question zara smj nhn a rha

mje nai arha second Quesiton???????

kindly share here

question no 2 lecture 30 mn hai page 238 pe,, ab koi ye btao k exactly yhi solution hai ya change krna hai?

nai mje se nai horha

plz koi 2nd ka bhi solution upload kr den???

mery khial mn ye wala ans ay ga. but not confirmed.

koi to solve kray.

ye handouts k page # 239 py hai.

void main ()
{
char st[15];
unsigned long int lbaindex;
unsigned int cylinder, head , sector, temp;
puts ("Enter the LBA address");
gets (st);
lbaindex = atol(st);
getdrvparam (0x80,&rb);
cylinder = lbaindex / (rb.heads*rb.sectors);
temp = lbaindex % (rb.heads*rb.sectors);
head = temp / rb.sectors;
sector = temp % rb.sectors + 1;
printf ("Heads = %d sectors = %d
cylinders = %d" , head, sector, cylinder);
}

ya sahii hai ya ghalatt koyi tu bataooooo plzzz

QUESTION NO.2

 

SOLUTION:-

 

#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) and tempbuffer;

geninterrput (0x13);

printf(“Heads= % Id\n sectors = % Id \n

Tracks/cylinder = Id\n Bytes per sectors =

% d\n Block count Low word =

%d\n Block count Hi word = % Id \n =,

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

tempbuffer.bytesPerSectors, tempbuffer.lowCount, tempbuffer.highCount, tempbuffer.configPointer;

}

RSS

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

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