How to Read Drive Parameter Block (DPB) of current drive of your system,

Vu Old Solved Programming Based Assignments Codes are Available in this Section .
Post Reply
User avatar
ALI RAZA
★★★★★★★★★★★★★
★★★★★★★★★★★★★
Posts: 174
Joined: Fri Dec 22, 2017 8:10 am
Location: Lahore
Has thanked: 6 times
Been thanked: 7 times
Contact:
Status: Offline

How to Read Drive Parameter Block (DPB) of current drive of your system,

Post by ALI RAZA » Tue Oct 02, 2018 10:35 am

Read Drive Parameter Block (DPB) of current drive of your system, and extract information from its memory dump.

Detailed Instructions:
1) Drive Parameter Block (DPB) is a data structure maintained in main memory by the operating system (OS). The OS translates information in BIOS Parameter Block (BPB) – a hard disk drive data structure – into DPB. There is one DBP for each drive in the system (if system has multiple drives), hence creating a chain of DPBs.
2) In this assignment, you will access contents of DBP of current drive (the drive in which you’re currently working, most probably, C drive), using undocumented service 21 / 32H.
3) You should open Windows Command Prompt (CMD) and print your full Name and Student ID using echo statement.
4) After echoing Name and your Student ID, enter in Debug mode. [Please see NOTE at the end of this assignment]
5) Within the Debug mode, use assemble command to move service number in AH register and load interrupt 21 instruction on next memory address.
6) Execute both instructions using proceed command and note down returned far address of DPB.
7) Finally, take memory dump starting from far address of DBP (as given in instruction # 6) using dump command, and then fill the following table by the help of dump file: (remember to take a screenshot )

Sr. # 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



8) Your assignment solution must be a single Microsoft Word file (.doc or .docx) containing following:
a. Screenshot of CMD. Your Student ID, Name, and memory dump must be clearly visible
b. Filled table as given in instruction # 7
9) Assignment without screenshot will not be accepted and will be given zero marks.

NOTE: How to enter CMD in Debug Mode:

1. For 32 bit Windows:
a) If you are running 32 bit Windows, locate Command Prompt in All Programs. Usually, its location is: Start > All Programs > Accessories > Command Prompt
b) Right click it and select “Run as Administrator”. Now type debug and press Enter

2. For 64 bit Windows:
a) If you are running 64 bit Windows, then you’ve to download two files from Downloads section of LMS: (1) DOSBox (2) Debugger-for-64-bit-Windows.zip
b) Install DOSBox on your system. It has a straight-forward and simple installation process. Also extract Debugger-for-64-bit-Windows.zip folder and paste the extracted application in any of the available drives (for example, D:\)
c) Now, run DOSBox, and mount that drive in which you have pasted debug application (as described in b), using following command (assuming you’ve pasted application in D drive):
mount d D:\
d) After mounting, move into the drive by typing (assuming you’ve mounted D drive):
D: and press Enter
e) Now, run the application by typing debug.exe

3. In order to exit from Debug mode, use quit command and press Enter
Answer:
Image



Post Reply

Last 10 Members Who Visited This Topic

User avatar ALI RAZA (4)

  • Similar Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 1 guest