Scrolling the screen - ASM
Posted: Sat Nov 28, 2009 6:27 am
When you scroll the screen up it moves each line up, but this means the that data is lost. Is there a way for it to keep everything that has been on the screen (buffer)?
The Place to Start for Operating System Developers
http://f.osdev.org/
The answer is exactly that - a buffer that contains the lines you've scrolled out of the screen. Of course to keep everything you would need infinity amounts of memory, so you can keep things "on screen" only until you run out of memory.matio wrote:When you scroll the screen up it moves each line up, but this means the that data is lost. Is there a way for it to keep everything that has been on the screen (buffer)?
quanganht just gave you a way to scroll to the screen, but did not answer your question. The answer is indeed what ru2aqare said. I guess the best way would be to either dynamically allocate a buffer (you could even allow the user to specify how many lines of history must be remembered) or you could just use a static buffer (of however many lines you wish to remember), but this might increase executable size considerably.matio wrote:@ru2aqare
thanks!
@quanganht
erm, sorry not sure what you mean
Oops. I thought u only asked about scrolling.matio wrote: @quanganht
erm, sorry not sure what you mean