C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Code Snippets » General »

Adds text to current dislay line while person is typing and increases


Posted Date: 16 Sep 2009    Resource Type: Code Snippets    Category: General
Author: joseph sajMember Level: Gold    
Rating: 1 out of 5Points: 2



This code shows how to add text to current dislay line while person is typing and increases the cursor position


#include<dos.h>
void interrupt our();
void interrupt (*prev)();
void writechar(char ch,int row,int col,int attr);
int a,b,kp,run=0;
char far *scr;
void main()
{
scr=(char far*) 0xb8000000;
prev=getvect(9);
setvect(9,our);
keep(0,500);
}
void interrupt our()
{
kp++;
if(kp==5)
{
run++;
_AH=3;
_BH=0;
geninterrupt(0x10);
a=_DH;
b=_DL;
if(run==1)
writechar('M',a,b,7);
if(run==2)
writechar('S',a,b,7);
if(run==3)
{
writechar('P',a,b,7);
run=0;
}
b++;
_AH=2;
_BH=0;
_DH=a;
_DL=b;
geninterrupt(0x10);
kp=0;
}
(*prev)();
}
void writechar(char ch,int row,int col,int attr)
{
*(scr+row*160+col*2)=ch;
*(scr+row*160+col*2+1)=attr;
}



Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
Adds text to current dislay line while person is typing and increases  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Adds text to current dislay line while person is typing and increases
Previous Resource: Blinking text in DOS, compiled with Turbo C
Return to Discussion Resource Index
Post New Resource
Category: General


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use