Along time ago I wrote a stupid C program. This program was designed for one purpose; to freak someone out. It was suppose to operate under DOS and use ANSI characters to display what appeared to be the workings of a giant count down clock. What it did at the end of the count down was the users guess. The program would then spit out words like, "Not ready reading drive C". This of course was a good way to make anyone feel somewhat upset. I gave this program to a few friends as a joke. Of course, it was received well, as they knew I would never intentionally due harm to their computer. However, this was not always the case. (One program I wrote added a few nasty lines to your autoexec.bat file and win.ini) Since then, I've learned that this type of behavior is look quite down upon. But it's still something I look back at and say that those days were more about learning something new, rather then doing harm. I guess you grow out of it... or maybe it's the fact that getting in trouble is just as motivating to quit. At any rate, here is a sample program I wrote that counts down and ummm... well.. you’ll see. Don't worry; it's not some horrible program.
It was written in C using Borland C++ version 3.1 (1997). Try it out and 'C'.
The program in action...
What's left over when it's done...
#include < stdio.h >
#include < conio.h >
#include < stdlib.h >
#include < dos.h >
main()
{
textbackground(BLACK);
textcolor(LIGHTGRAY);
clrscr();
unsigned bbb;
unsigned aaa,ccc,ddd,eee,fff,yyy;
aaa = 126; bbb = 196; ccc = 157; ddd = 30; eee = 2; fff = 234;
yyy = 177;
textbackground(RED);
textcolor(WHITE);
cputs(" ");
cputs(" ");
gotoxy(1,1);
printf("WARNING: ALL DATA WILL BE ERASED ON THIS DRIVE IN SECONDS!");
gotoxy(1,2);
printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c
%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c
%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c",bbb,bbb,bbb,bbb,bbb,bbb,
bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,
bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,
bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,
bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb);
printf("High Speed Format Start...");
_setcursortype(_NOCURSOR);
int i;
for(i = 9; i >= 0; i--)
{
gotoxy(51,1);
printf("%i ",i);
int ii;
for(ii = 99; ii >= 0; ii--)
{
delay(10);
gotoxy(38,12);
printf("%i.%i",i,ii);
}
delay(20);
}
_setcursortype(_NORMALCURSOR);
printf("\n\n\n\n\n\n\nDeleting...");
delay(500);
{
char *command = "CD\\";
system(command);
}
{
char *command = "DIR/S/B *.";
system(command);
}
// DIR/S/B *.
textbackground(BLACK);
textcolor(LIGHTGRAY);
bbb = 163;
printf("Done\n\n Volume in drive C is SCREWED\n Volume Serial Number is B812-9334\n Directory of C:\\ \n\nfile not found\n\t\t\t%c%c%c%c%c%c%c bytes free\n\nC:\\",yyy,aaa,bbb,ccc,ddd,eee,fff);
int selection, selection1, selection3;
start: ;
getch();
not_ready: ;
printf("\nNot ready reading drive C");
printf("\nAbort, Retry, Fail?");
selection = getche();
if(selection == 97)
{
printf("\n");
printf("invalid fixed disk CODE:072");
f_disk_error1: ;
goto f_disk_error1;
}
if(selection == 65)
{
printf("\n");
printf("invalid fixed disk CODE:072");
f_disk_error: ;
goto f_disk_error;
}
if(selection == 114)
{
goto not_ready;
}
if(selection == 82)
{
goto not_ready;
}
{
char drive_letter, drive_letter1 ;
loop: ;
printf("\nCurrent drive is no longer valid>");
scanf("%s", &drive_letter);
printf("\nNot ready reading drive %s", drive_letter);
printf("\nCurrent drive is no longer valid>");
scanf("%s", &drive_letter1);
printf("\nNot ready reading drive %s", drive_letter1);
goto loop;
}
}
It's not the most efficient code on earth, (not much of my code ever was back then) but it's just something I thought would be entertaining to look at, or laugh at anyway.
Let me know if you've written code that was designed to freak others out. Thanks for reading!
--George