Skip to content

CS609 - System Programming

12 Topics 76 Posts
  • 0 Votes
    3 Posts
    601 Views
    wajiha AsifW
    Solution://Header Files #include<stdio.H> #include<DOS.H> #include<BIOS.H> void interrupt (*oldint65)(); //To store current interrupt char far *scr=(char far* ) 0xb8000000; void interrupt newint65();//NewInt prototype void main() { oldint65 = getvect(0x65); setvect(0x65, newint65); getch(); keep(0, 1000); } void interrupt newint65() {clrscr(); *scr=8; (*scr)=0x174D; (*(scr+2))=0x1743; (*(scr+4))=0x1731; (*(scr+6))=0x1739; (*(scr+8))=0x1730; (*(scr+10))=0x1734; (*(scr+12))=0x1730; (*(scr+14))=0x1736; (*(scr+16))=0x1734; (*(scr+18))=0x1730; (*(scr+20))=0x1734; }

    429e7ece-92cc-4cef-a09c-e90f8b391518-image.png
    3e679fbc-5b4c-4ac1-a4c8-107d83737325-image.png

  • 0 Votes
    2 Posts
    586 Views
    Ganza NadiG

  • 0 Votes
    2 Posts
    216 Views
    M

    Please discuss idea solution

  • 0 Votes
    4 Posts
    130 Views
    zareenZ

    Defragmentation is the process of locating the noncontiguous fragments of data and rearranging the fragments and restoring them into fewer fragments or into the whole file.
    In terms of computer performance File fragmentation directly affects the access and write speed of that hard disk. All computers suffer from fragmentation. We use defragmentation to resolve this issue.Performance of system degraded during defragmentation but improve after it’s completion as compared to previous

  • 0 Votes
    3 Posts
    145 Views
    zareenZ

    Solution:

    // Header Files #include<stdio.h> #include<conio.h> #include<BIOS.H> #inlcude<DOS.H> void interrupt (*oldTimer)(*void); // To store current Timer vector void interrupt newTimer(); //New Timer Function char far *scr= (char far *)0xB8000000; //Screen segment int in, t=0; void main() { clrscr(); oldTimer=getvect(8); setvect(8,newTimer); getch(); } void interrupt newTimer(); { *(scr+t)=0x2A; t++; if(t>=126) { for(i=0;i<4000;i+=2) { *(scr+i)=0x20; // Blank screen *(scr+i+1)=0x07; } t=0; } (*oldTimer)(); } }
  • 0 Votes
    2 Posts
    262 Views
    zaasmiZ
    #include <dos.h> #include <conio.h> char st [80]; int SendKbdRate(unsigned char data , int maxtry) { unsigned char ch; do { do { ch=inport(0x64); }while (ch&0x02); outport(0x60,data); do { ch = inport(0x64); }while (ch&0x01); if (ch==0xfa) { puts("success\n"); break; } maxtry = maxtry - 1; } while (maxtry != 0); if (maxtry==0) return 1; else } return 0; void main () { //clrscr(); SendKbdRate(0xf3,3); SendKbdRate(0x68,3); gets(st); }
  • 0 Votes
    4 Posts
    204 Views
    zaasmiZ

    CS609 Assignment 1 Solution Idea!..

    #include<BIOS.H> #include<DOS.H> char st1[80] ={"Virtual University of Pakistan$"}; char st2[80] ={"Washi Ali$"}; char st2[80] ={"Tufail$"}; void interrupt (*oldint65)( ); void interrupt newint65( ); void main() { oldint65 = getvect(0x65); setvect(0x65, newint65); keep(0, 1000); } void interrupt newint65( ) { switch (_AH) { case 0: _AH = 0x09; _DX = (unsigned int) st1; geninterrupt (0x21); break; case 1: _AH = 0x09; _DX = (unsigned int) st2; geninterrupt (0x21); break; case 2: _AH = 0x09; _DX = (unsigned int) st3; geninterrupt (0x21); break; } } }```
  • 1 Votes
    16 Posts
    3k Views
    mehwishM

    @zareen said in CS609 Quiz No.2 Solution and Discussion:

    What are the 3 types of viruses?

    Resident Virus. Resident viruses live in your RAM memory. …

    Multipartite Virus. …

    Direct Action Virus. …

    Browser Hijacker. …

    Overwrite Virus. …

    Web Scripting Virus. …

    Boot Sector Virus. …

    Macro Virus.

  • 0 Votes
    2 Posts
    172 Views
    M

    @zaasmi said in CS609 GDB1 Solution and discussion:

    By increasing the surface area of hard disk there is an increase of data storage. Do you think whether there is any negative impact of increasing surface area as well?

    Yes, by increasing the surface area of hard disk there is an increase of data storage negative impact of increasing surface area as well As a greater amount of magnetic media can reside on the hard surface of the disk also because the surface area of the disk is increased by increasing the number of platters.
    Increasing the surface area clearly increases the amount of data that can reside on the disk as more magnetic media no resides on disk but it might have some drawbacks like increased seek time in case only one disk platter is being used.

  • CS609 GDB.1 Solution and Discussion

    Unsolved
    1
    0 Votes
    1 Posts
    457 Views
    No one has replied
  • 0 Votes
    4 Posts
    533 Views
    cyberianC

    @moaaz
    Another Idea solution

    #include <bios.h> #include <dos.h> FILE *fp; unsigned char buf[1024]; unsigned char st[60]; unsigned char headno[10]; unsigned char secno[10]; unsigned char trackno[10]; void main (void) { int i; for (i=0; i<1024; i++) buf[i]=0; gets(st); fp=fopeon(st,”wb”); printf(“Head”); gets(headno); puts(headno); printf(“/nsector ”); gets(secno); puts(secno); printf(“/ntrack ”); gets(trackno); puts(trackno); i = biosdisk(2, 0x80, atoi(headno), atoi(trackno), atoi(trackno), 2,buf); } if(*(((char *)(&i))+1)= =0) { fwrite(buf,2,1024,fp); fclose(fp); } else { printf(“Cannot Read Error# = %x” i); }
  • 0 Votes
    15 Posts
    982 Views
    zaasmiZ

    9f5810eb-0c32-4205-8f2b-894e50cfa5b1-image.png

    93c64ca9-1ff9-475b-8be6-96cfe6a4fc60-image.png

    a762131e-cb91-48d1-a6c8-bac370387520-image.png
    e8e167c2-502e-4cf7-8562-9a1890246115-image.png
    12cb9b85-379a-4e3d-b101-ac53c91f692c-image.png
    abb5cfcf-2123-4e2d-9520-6849c2db7577-image.png
    543f71b6-cf6a-4203-9efb-a858b05c0adb-image.png
    714b0213-3a82-4bfd-a2e9-be71dd503c49-image.png
    4c8d94cc-265b-49a3-8f9d-e556b10ba69e-image.png
    be408044-865b-4532-a90b-a8fc1862d363-image.png