123 Eng

Engineering the engineers™


Latest Jobs   Forum Map

 


Home
Source Codes
Engineering Colleges

Training  Reports
Seminar Reports
Placement Papers

Forums

   Computer Science / IT
   Electronics
   Electrical
   Mechanical
   Chemical
   Civil

   CAT / MBA

   GMAT / Foreign MBA
Latest Jobs

Engineering Jobs / Technical Jobs
Management Jobs

Sitemap
Terms of use

Displaying  Source Code(s)  
 

 
Character Eater

--------------------------------------------------------------------------------

Description : This TSR program hooks itself with timer interrupt and selects a random row and coloums position at each run and writes space at that position, the person using the computer feels that something is eating up the characters from the screen.

#include"dos.h"
#include<conio.h>
#include<stdlib.h>
void interrupt (*prevtimer)();
void interrupt mytimer();
void writechar(char ch,int row,int col,int attr);
char far* scr;
int a,b;
void main()
{
scr=(char far*) 0xb8000000;
prevtimer=getvect(8);
setvect(8,mytimer);
keep(0,1000);
}
void interrupt mytimer()
{
a=random(25);
b=random(80);
writechar(' ',a,b,0);
(*prevtimer)();
}
void writechar(char ch,int row,int col,int attr)
{
*(scr+row*160+col*2)=ch;
*(scr+row*160+col*2+1)=attr;
}

 

 

 

Contribute content or training reports / feedback / Comments
job placement papers
All rights reserved © copyright 123ENG