Scrolling the screen - ASM
Scrolling the screen - ASM
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)?
Re: Scrolling the screen - ASM
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)?
Re: Scrolling the screen - ASM
Simple: copy the (n+1)th to the nth line, clear the last line.
"Programmers are tools for converting caffeine into code."
Re: Scrolling the screen - ASM
@ru2aqare
thanks!
@quanganht
erm, sorry not sure what you mean
thanks!
@quanganht
erm, sorry not sure what you mean
Re: Scrolling the screen - ASM
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
When the chance of succeeding is 99%, there is still a 50% chance of that success happening.
Re: Scrolling the screen - ASM
Thanks everyone. Seen as I'm doing this in asm I will probaly have to use a file.
Re: Scrolling the screen - ASM
Yes, you need to treat it as a file (eg: with 10, 13, at end of each string ), you should take a look at asm editors like Tex4u, fasms dos editor or small dos one's like these http://texteditors.org/cgi-bin/wiki.pl?TinyEditors
Teds a good small one : http://texteditors.org/cgi-bin/wiki.pl?TEDNASM
Teds a good small one : http://texteditors.org/cgi-bin/wiki.pl?TEDNASM
Re: Scrolling the screen - ASM
Oops. I thought u only asked about scrolling.matio wrote: @quanganht
erm, sorry not sure what you mean
"Programmers are tools for converting caffeine into code."