Search This Blog

Wednesday, November 24, 2010

SYSTEM SHUTDOWN IN SOME FUNNY MANNER

JUST COMPILE AND RUN THIS C CODE........
its about accessing VDU memory and doing shut down.........

//this code was originally developed by MANUJ PALIWAL

#include(stdio.h)
#include(dos.h)
#include(conio.h)
#include(graphics.h)
#include(stdlib.h)
void main()
{char far *p;
char w[100];
int i,j,k;
int m=10;
p=(char far*) 0xb8000000L;//starting address of vdu memory
clrscr();
for(j=0;j<1000;j++)
for(i=0;i<7999;i++)
*(p+rand()*j)=*(p+i*rand());
delay(5);
for(k=0;k<7999;k++)
{*(p+rand()*k)=*(p+k*rand());
clrscr();
printf("\n\n\n");
sprintf(w,"\t\t\tyour computer\n\n\t\t\t\t is going to\n\n\t\t\t shutdownin %d secs",m--);
printf("%s",w);
if(m==-1)
{system("shutdown -s -t 0"); // command for system shutdown.
break;
}
for(k=0;k<1999;k++)
{*(p+rand()*k)=*(p+k*rand());
delay(1);
}
}
}

1 comment: