How to make screen blink in MS-DOS with TSR program?


Hi . I have written an MS-DOS based screensaver program by hooking timer and keyboard interrupt. After 10 seconds the screen is cleared and on clicking any button from the keyboard the contents of dos screen are shown. I want to know how can I make this screen to blink i.e. alternate between cleared screen and screen with text shown when no button is pressed for 10 seconds. If you need further information I can describe what I am trying to achieve. Here is my written code: #include #include void interrupt (*oldTimer)(); void interrupt (*oldKey)(); void interrupt newTimer(); void interrupt newKey(); char far *scr = (char far*) 0xB8000000; int i, t=0, m=0; char charscr[4000]; void main() { oldTimer=getvect(8); oldKey=getvect(9); setvect(8,newTimer); setvect(9,newKey); getch(); keep (0,1000); } void interrupt newTimer() { t++; if((t>=182)&&(m==0)) { for (i=0;i
Posted On: Friday 7th of December 2012 08:41:28 PM Total Views:  388
View Complete with Replies

RELATED TOPICS OF C Language PROGRAMMING LANGUAGE




how to make a DLL function accessible from different instances of a class

Hi all, I'm wondering how to make a dynamically loaded DLL functions accessible from multiple instances of a class. The first instance of a class loads a DLL function like this one: header file class Foo { typedef HANDLE (CALLBACK* ...
VIEWS ON THIS POST

164

Posted on:

Saturday 10th November 2012
View Replies!

interesting makefile issue

hi, We have a big project thats built on several platforms and has a huge number of files - common and platform specific files. It compiles well if compiled through command line by its makefile. But we would like to ...
VIEWS ON THIS POST

307

Posted on:

Saturday 10th November 2012
View Replies!

makefile and header files

Hi , Not strictly a C++ question but I am sure this is a common compile issue :-) I have a generic makefile (see below) that I would like update such that if I make some changes to a header ...
VIEWS ON THIS POST

144

Posted on:

Saturday 10th November 2012
View Replies!

What is the correct grammar to make a function call by using static member data which is a pointer to a ordinary class member function?

I have class member data which is a pointer to class member function. However, I'm fail to compile the code. What is the correct grammar to make a function call by using static member data which is a pointer to ...
VIEWS ON THIS POST

154

Posted on:

Saturday 10th November 2012
View Replies!

Linking error (cygwin, make, windows, sql)

I am trying to compile a simple ODBC and C example on Windows XP SP2. I have Cygwin_NT 5.1. This is the code (obtained from http://www.easysoft.com/developer/la...rial.html#dm_f ...) i am attempting to compile. ODBCTest.c #include #include #include #include ...
VIEWS ON THIS POST

125

Posted on:

Sunday 11th November 2012
View Replies!

Re: where does it make business sense to use C++ instead of java?

On 27 Nov, 22:41, c...@mailvault.com wrote: > Choice is also limited by language constraints. With Java you have to > finish a class definition in the same file you start > it. IMO this is a good thing. The fact ...
VIEWS ON THIS POST

201

Posted on:

Sunday 11th November 2012
View Replies!

Re: How do you make a global const array that requires a function?

On 26 nov, 01:16, "Hak...@gmail.com" wrote: > The profundities are killing me! > > >std::tr1::array makeElementArray() > >{ > > std::tr1::array array; > > /* code */ > > return array; > >} > > So you ...
VIEWS ON THIS POST

131

Posted on:

Sunday 11th November 2012
View Replies!

Re: Named pipes make me crazy

"Remy Lebeau (TeamB)" \t\t\t/\t\t\t\t \t\t\t\t \t\t\t\t: news:4726154f$1@newsgroups.borland.com... > > "Andrew" wrote in message > news:472598b7$1@newsgroups.borland.com... > >> The problem is that if i dont receive data from client outright after >> connect i get an ERROR_IO_PENDING pseude ...
VIEWS ON THIS POST

124

Posted on:

Sunday 11th November 2012
View Replies!

can member operators be virutal? does it make sense?

I have never seen this in practice and interested in its pros, or ever existential (another words, standardized) possibility
VIEWS ON THIS POST

181

Posted on:

Sunday 11th November 2012
View Replies!

is it possible to make a map of objects?

hello, sorry to bother you with this but i can't seem to figure out why i can't do: struct SD { int from; int to; } sd; std::map ListOfWorkingSchedule;...
VIEWS ON THIS POST

204

Posted on:

Sunday 11th November 2012
View Replies!

An attempt to make a 'property' in C++

. Some languages contain so-called 'properties' - class members that behave in different ways depending on whether you read or modify them. I wonder whether is can be declared like this: class A{ ... int& Prop() { //When we write ...
VIEWS ON THIS POST

114

Posted on:

Monday 12th November 2012
View Replies!

NEWBIE: how to paste strings to make a command for system()

Hi all. Having several strings how do i combine them to construct a command; lets say to run the date command. string str = "14/10/08 19:06:09"; strDD = str.substr(0,2); strMM = str.substr(3,2); strAA = str.substr(6,2); strhh = str.substr(9,2); strmm = ...
VIEWS ON THIS POST

205

Posted on:

Saturday 24th November 2012
View Replies!

How to make IntelliSense work with WTL 8 classes

Hi all, My IntelliSense in VS2005 hasn't been working with WTL 8 classes. The project compiles fine but whenever I type SomeWTLClass. or SomeWTLClass-> it does not work. The status bar changes to: IntelliSense: 'Type of expression to the left ...
VIEWS ON THIS POST

136

Posted on:

Sunday 25th November 2012
View Replies!

How to modify the CMWC4096 PRNG to make an LCG of it?

I put the CMWC4096 PRNG of Prof. Marsaglia into a simple C++ class. It works as intended, ie. as a 32-bit PRNG. But my question is: what must be changed in the code to make an LCG of it < ...
VIEWS ON THIS POST

109

Posted on:

Sunday 25th November 2012
View Replies!

Double dispatch (makes no sense!)

I am trying to use double dispatch in the below code: #include class Box; class Sphere; class geometry_type { public: virtual void haps(geometry_type* other)=0; virtual void collideWith(Box* other)=0; virtual void collideWith(Sphere* other) = 0; }; class Box : public ...
VIEWS ON THIS POST

116

Posted on:

Sunday 25th November 2012
View Replies!

using swap to make assignment operator exception safe

, The following swap technique is used to make assignment operator exception safe (means even if there is exception, the current object instance's state is invariant). It used a temporary object "temp" in this sample, and assignment is made ...
VIEWS ON THIS POST

153

Posted on:

Sunday 25th November 2012
View Replies!

how to make a vector release its memory ?

I have a this setup: struct TAjListItem { void* Data; char Selected; TAjListItem() ata(0),Selected(0){} TAjListItem(const TAjListItem& Itm) { Data = Itm.Data; Selected = Itm.Selected; } }; typedef std::vector ListItemVec; the size of this vector is ususally arround 200-500, ...
VIEWS ON THIS POST

148

Posted on:

Sunday 25th November 2012
View Replies!

How to make std::strtod() *not* depend on locale?

I have made a program which parses strings in certain specified format. This string format can contain numerical values in the format understood by std::strtod(). The problem is: How std::strtod() interprets the string depends on locale. This messes things up. ...
VIEWS ON THIS POST

105

Posted on:

Sunday 25th November 2012
View Replies!

How to make inline work?

group First, I write same cases I've already known, I don't concern that specific compiler really do inline or not. Please check them if they are right, and add the cases I miss 1. // a.h inline void f() ...
VIEWS ON THIS POST

140

Posted on:

Monday 26th November 2012
View Replies!

The boost.variant library and boost::make_recursive_variant

We have this code: typedef boost::make_recursive_variant< int , std::vector< boost::recursive_variant_ > >::type int_tree_t; Use of the resultant variant type is as expected: std::vector< int_tree_t > subresult; subresult.push_back(3); subresult.push_back(5); std::vector< int_tree_t > result; result.push_back(1); result.push_back(subresult); result.push_back(7); int_tree_t var(result); According to documentation ...
VIEWS ON THIS POST

287

Posted on:

Monday 26th November 2012
View Replies!