Semester: Spring 2019
CS609: System Programming
Assignment No. 03
Total Marks: 20
Due Date: July 16, 2019
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.
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.
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.
The objective of this assignment is to provide hands-on experience of System Programming concepts including:
• Hard Disk interrupts
• Hard Disk data reading
• Hard Disk BioDisk() function
For any assignment related query, contact at [email protected]
Q: Write a program which reads two physically addressed blocks from disk using biosdisk() function.
• Declare arrays to handle head, sector and track numbers to read from hard disk.
unsigned char headno;
unsigned char secno;
unsigned char trackno;
• Similarly declare a buffer of 1024 char to store data 2 blocks data etc.
• unsigned char buf;
• Use printf to print message of entering head no. i.e printf("Head ");
• Use gets function to get head no. from user i.e gets(headno);
• Use puts function to put headno in array of headno
• Use biodisk function to read two blocks i.e
• Similarly get and put sector and track numbers.
• Show error message in case of failure of biodisk() function.
Note: Your assignment file should be a single Word file (.doc or .docx) containing code only.
Best of Luck!