Showing posts with label CS609. Show all posts
Showing posts with label CS609. Show all posts

Thursday, January 12, 2012

cs609 4 CS609-System Programming assignment solution fall 2012

CS609-System Programming

Assignment No. 4

[Fall 2011]

Deadline

Your assignment must be uploaded/submitted at or before Monday 16, January 2012.

Uploading instructions

View the assignment submission process document provided to you by the Virtual University to upload the assignment.
  • Your assignment must be in .doc format.(Any other formats like scan images, PDF, Zip, rar, bmp, docx etc will not be accepted)
  • Save your assignment with your ID (e.g. mc060402111.doc).
  • No assignment will be accepted through email.

Marking Rules

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 corrupted.
·        Your assignment is copied from internet, handouts or from any other student (Strict disciplinary action will be taken in this case).
Note:

·    You should consult recommended books to clarify your concepts.
·    It’s better for you to submit the assignment well before the deadline.
·    Do not put any query at MDB about this assignment, if you have any query then  email at CS609@vu.edu.pk



Assignment                                                                 [Total Marks 20]



Q No. 1
            Following is the memory dump of Drive Parameter Block that is retrieved using undocumented service 32 of Int 21h.  Following DPB (Drive Parameter Block) gives information about the logical drive which has FAT16 File system. 


After reading the above dump of DPB (Drive Parameter Block), fill in the following table with required values.
                                


Detail of DPB dump
Of FAT16 Volume

Value In Hexadecimal
Value In decimal
Logical Drive Letter.

07 = H drive
07
Unit No.

07
07
Bytes per Sector.

0200
512
Highest Sector No. within a cluster.

1F
31
Sector Per Cluster
1F+1=20
32
Shift count.

05
05
Reserved sectors.

0004
0004
Number of Fats

2
2
Root Directory Entries
0200
512
First Sector Containing user Data

0138
312
Highest Cluster Number

893B
35131
No of sectors per FAT

8A
138
Sector number of First Directory
0118
280

                                                                                                    

Thursday, November 3, 2011

CS609-System Programming Assignment No. 1 Fall 2011

Assignment                                                                 [Total Marks 20]

Q No. 1
Write the C Program that should print the 25 rows of DOS screen with different colors, i.e. your DOS screen should be displayed in such a way that every two consecutive rows should have different colors.  Following is the sample output of your program.

You can print the 25 rows of DOS screen with any colors but the two consecutive rows should have different colors so that we can identify them from each other.

Solution:






#include<BIOS.H>
#include<DOS.H>
#include<conio.h>
unsigned int far *vga=0xb8000000;
void main()
{
int i,j;
clrscr();
j= 0x0020;
for(i=1; i<=2000; i++)
{
(*(vga+i-1))=j;
if(i%80==0)
{
j=j+4096;
}
}
getch();
}