Instructions:
Please read the
following instructions carefully before submitting assignment. It should be clear that your assignment will not get any
credit if:
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 assignment is submitted after due date.
§
The submitted assignment does not open or file
is corrupt.
The submitted assignment does not open or file
is corrupt.
§
You have not followed
steps described in Detailed Instructions
of the problem statement.
You have not followed
steps described in Detailed Instructions
of the problem statement.
§
Assignment is copied (partial or full) from any
source (websites, forums, students, etc.) Strict action will be taken in this
regard.
Assignment is copied (partial or full) from any
source (websites, forums, students, etc.) Strict action will be taken in this
regard.
Note:You
have to upload only .doc or .docx file.
Assignment in any other format (extension) will not be accepted and will be
awarded with zero marks.
have to upload only .doc or .docx file.
Assignment in any other format (extension) will not be accepted and will be
awarded with zero marks.
Objectives:
The objective of
this assignment is to provide hands-on experience of System Programming
concepts including:
this assignment is to provide hands-on experience of System Programming
concepts including:
·
Hard DiskInterrupts
Hard DiskInterrupts
·
Reading Hard Disk Block
Reading Hard Disk Block
·
Invoking Interrupts
Invoking Interrupts
·
File Pointer
File Pointer
Problem Statement:
Q: Write C program to perform a block read operation using
interrupt 13H/42H. Follow the instructions given below: [Note that we are using
DAP data structure which is used by extended int 13H service].
interrupt 13H/42H. Follow the instructions given below: [Note that we are using
DAP data structure which is used by extended int 13H service].
[DOWNLOAD##download##]
Instructions:
1)
Include all header files and declare string
arrays to input low and high word.
Include all header files and declare string
arrays to input low and high word.
2)
Declare DAP structure and file pointer.
Declare DAP structure and file pointer.
3)
Get low double word from the user,
temporarily store it in character array st, and assign this value to lbalod.
Get low double word from the user,
temporarily store it in character array st, and assign this value to lbalod.
4)
Get high double word from the user,
temporarily store it in character array st, and assign this value to lbahid.
Get high double word from the user,
temporarily store it in character array st, and assign this value to lbahid.
5)
Finally, generate the interrupt 0x13
Finally, generate the interrupt 0x13
6)
Open file through fopen()
Open file through fopen()
7)
Write the read block of hard disk to file.
Write the read block of hard disk to file.
Note: Your assignment
solution will be in this Word file (.doc or .docx)containing code of C.
solution will be in this Word file (.doc or .docx)containing code of C.
Best of Luck!