Article View: alt.msdos.programmer
Article #86Re: How is CLS implemented ?
From: Mike Gillmore (Consultant)
Date: Tue, 11 Aug 1992 22:37
Date: Tue, 11 Aug 1992 22:37
29 lines
1630 bytes
1630 bytes
In article <1992Aug11.142038.200@mble.philips.be>, stern@mble.philips.be writes: > Does anybody know how is implemented the CLS command ? > I mean the interrupt(s) used to completely reset the screen. > > Thanks a lot, > > -- Marc Stern <stern@mble.philips.be> I',m getting a little rusty (I just can't seem to remember all of the interrupt calls, with the appropriate register assignments) Get number of columns on the display Get number of rows on the display Set scroll window to (0, 0) and (columns-1, rows-1) Set display attribute to grey on black (as if everyone still has a Monochrome Display Adapter) Scroll (either up or down, it makes no difference)the entire window Pretty simple. For my CLS routine, instead of using the brain-dead method of grey on black for the text attributes, I first get the character *AND ATTRIBUTE* at the current cursor location, which I then use as the display attribute. Sorry that I can't supply more information regarding graphics modes, but I have not done any graphics programming for a VERY long time. -- Mike "Okie" Gillmore no .sig, no glory
Technical Details
Message-ID:
<1992Aug11.223726.9385@caeco.mentorg.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!news.mentorg.com!caeco!picard!gillmoreReferences:
<1992Aug11.142038.200@mble.philips.be>Show Full Headers
Complete Article Headers
Newsgroups: alt.msdos.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!news.mentorg.com!caeco!picard!gillmore From: gillmore@picard.slc.mentorg.com (Mike Gillmore (Consultant)) Subject: Re: How is CLS implemented ? Message-ID: <1992Aug11.223726.9385@caeco.mentorg.com> Sender: gillmore@picard (Mike Gillmore (Consultant)) Reply-To: mike_gillmore@mentorg.com Organization: Mentor Graphics Corp., Murray, Utah References: <1992Aug11.142038.200@mble.philips.be> Date: Tue, 11 Aug 1992 22:37:26 GMT Lines: 29