I have created a clear screen utility which clears the console screen and also color up the background and foreground colors. But I have written it using DOS interrupts, Could someone enlighten me about how to use the api's and which one to use. Or if somebody has written a similar program could you please help me out.

I have attached the program source which I have coded,

Posted on 2002-09-21 05:40:12 by sajen

Have a look in the example code in MASM32 and in the MASM32 library. The code style to do this is different to DOS and uses console specific API calls. Its a different basis to DOS but it still does much the same thing without using the DOS interrupts.


Posted on 2002-09-21 07:16:05 by hutch--
As an alternative, the win32 API has console output functions (FillConsoleOutputAttribute for eg.) that you can use directly.

Check them out on MSDN.
Posted on 2002-09-21 07:58:01 by Thanatos

Thanx for the tip, Hutch and Thanatos

Let me try to code a 32 bit clr version.

Posted on 2002-09-23 01:59:19 by sajen
When you download the clr.zip, unzip it to c:\clr\ and then open msdos prompt change it over to the c:\clr\ directory and type it

o - > 'o' as in oscar

There is a small bug when ever you run the first time clr accepts the color option as 00 so you may get a black background and black foreground so you won't be able to see anything on screen. So please type in the above command. Iam Sorry...

Posted on 2002-10-02 23:29:33 by sajen