We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>
The objective of this assignment is to provide hands-on experience of:
§ Understanding system programming concepts including accessing hard disk and reading its contents using BIOS
§ Hands on experience of using Virtual Box and working with DOS environment
As in the case with previous two assignments, you should use Virtual Box and run Windows 98 on it to solve this assignment. Instructions of how to install Virtual Box and Windows 98 are given in Announcement page and Downloads section of this course.
For any query about the assignment, contact at CS609@vu.edu.pk
Write a C program that will access your hard disk, read its contents, and then write these contents in a file.
1) In this program, you will use biosdisk() function to access and read hard disk. It accepts a total of 7 parameters; their details are given below:
2) command parameter should be 2, which indicates that you want to read from the hard disk
3) Drive number will be fixed to 0x80 which indicate that you want to access first fixed hard disk
4) Head number, Track number and Sector number will be provided at runtime by the user. The program should prompt the user to enter these values. During execution of the program, give following values to these parameters:
Head Number = 1
Track Number = 1
Sector Number = 1
5) Buffer size should be fixed to 512 bytes
6) The name of the file on which data from hard disk will be written, should also be provided at run time by the user. During execution, you must give your VUID as file name. Also, open the file in write binary mode.
7) After invoking biosdisk() function, you have to check high byte of its return code to see if reading the specified hard disk area was successful or not. If high byte contains 0, it means function was successful. Only then you should write data on the file
8) In either case, (successful or unsuccessful) print a message accordingly: e.g. “Data is successfully written” or “Error in reading disk” etc.
9) After execution, navigate to the Bin folder and highlight newly created file (single click on the file) by your name and take screenshot. There’s no need to open the file. As we’re using Virtual Box and Windows 98, this file’s location will be C:\CS609\BorlandC\Bin
10) Your solution file will be a single Word file containing 3 things:
I. Complete code written in Word
II. Screenshot of the program after complete execution (use getchar() function to temporarily halt the screen)
III. Screenshot of generated file as described in instruction number 9
+ Click Here To Join also Our facebook study Group...How to Join Subject Study Groups & Get Helping Material?..
.+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)
+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)
THANKS Asad Mehmood please tell me k lec 26 k elwa aur kon sa lecture study krna chahiye for this assignment ??? kindly reply soon Short time
I think lecture 26 mein jo phla pora program hai wo r name etc k liye last assignment lines of code mein sy any views???????????????
please koi bta dy k assignmnt kaisy solv krni....
very easy assignment! :)
Then please share your ideas...
easy hai to kr dein na
Dear fellows whole assignment is given in handouts you just need to pay attention on instructions given in assignment file.
for an idea I am sharing sudo code for that it may help you
inlcude neccessory header files e.g bios,dos,conio etc
create variable headno,secno,trkno,buf,file name etc... also create object of FILE pointer
in main just loop through inputs from user for above required varibales as per mentioned in instruction no 6 of given assignmen.
use biosdk function some of its parameteres has already been given in assignment in instruction number 2, 3 and 4. after that display message which is also given in assignment instruction number 8. thats all