PDA

View Full Version : cs502 assignment no 3 spring 2011 idea solution JUne



Vuhelper
06-12-2011, 02:59 AM
cs609 operating system



Assignment [Total Marks 18]



Q No. 1

#include <dos.h>

#include <bios.h>



char st[4096]="Virtual University of Pakistan\0";

char st1[4096]="Knowledge beyond boundaries";



void main (void)

{

}

In the above code you are required to calculate the segment and offset address of the two strings st and st1.

[8]

Q No. 2



Write the C program that should read the Master Boot Record using the biosdisk() function and write this block at the location “D:\MBR.txt”. [10]





If you are not able to read the data from hard disk then do the following step.

Boot your system in MS DOS and try to run your program to access the hard disk.



Note: For Question No. 1 and Question No. 2 make two separate files Q1.c and Q2.c and send these two files in zip format.