Clearing half a screen fast

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!
Post Reply
mikefromca
Coder
Posts: 41
Joined: Wed Oct 16, 2019 11:28 am

Clearing half a screen fast

Post by mikefromca »

The way I cleared about half a screen in the past with QuickBasic for DOS is with these commands:

Code: Select all

for n% = 1 to 15
locate n%,1
print space$(80)
next n%
Now when I look at the output with DOSBOX running at 6000 clock cycles, the execution is slowish where I really notice the flicker when the screen clears.

I might have to roll out a fast assembly routine, unless someone knows how to clear half a screen much faster.

The reason why I need to do this is because I am making a live data logger and I need to see the data at a certain section of the screen, and without clearing part of the screen, I'll see incorrect (old data) as the amount of fresh data varies every time.
angros47
Veteran
Posts: 79
Joined: Mon Sep 08, 2008 12:52 pm
Contact:

Re: Clearing half a screen fast

Post by angros47 »

Code: Select all

VIEW PRINT 1 TO 15
CLS
mikefromca
Coder
Posts: 41
Joined: Wed Oct 16, 2019 11:28 am

Re: Clearing half a screen fast

Post by mikefromca »

Oh wow. and here I rolled out my own ASM routine. This forum doesn't want to email me when I get new posts.
Post Reply