Thread View: alt.msdos.programmer
3 messages
3 total messages
Started by stern
Tue, 11 Aug 1992 14:20
How is CLS implemented ?
Author: stern
Date: Tue, 11 Aug 1992 14:20
Date: Tue, 11 Aug 1992 14:20
6 lines
464 bytes
464 bytes
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>
Re: How is CLS implemented ?
Author: 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
Re: How is CLS implemented ?
Author: George Jetson
Date: Wed, 12 Aug 1992 15:28
Date: Wed, 12 Aug 1992 15:28
26 lines
1858 bytes
1858 bytes
In article <1992Aug11.223726.9385@caeco.mentorg.com> mike_gillmore@mentorg.com writes: >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. >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) etc. I don't think it is anywhere near this complicated. I just get the current mode, via INT 10, fn 0F, then set the current mode, via INT 10, fn 0. It's been a while, so don't quote me - you may have to do something with BX as well. But, as they say, it's in all the better books. ************************************************************************ Please don't drink the battery acid, it tastes bad and will hurt you. Also, don't bite the tyres, especially when the bike is moving. (Our lawyers made us put this in this manual.) - pynq@quads.uchicago.edu, who is still costing the net hundreds, if not thousands, of dollars, every time he posts - ************************************************************************
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads