Mail Archives: djgpp/1997/08/04/05:35:26

From: "Bertel k. Brander" <bertel AT post4 DOT tele DOT dk>
Newsgroups: comp.os.msdos.djgpp
Subject: movedata
Date: Sat, 02 Aug 1997 02:12:04 +0200
Lines: 56
Message-ID: <>
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp


I am writing a program in C which has to scroll the text mode screen
real fast.
So, I found the movedata function and used it as:

             0xb8000 + Cols*2,
             Cols * (Rows - 1) * 2);

To scroll the screen up.

Where Cols is 80 and Rows is the number of lines to scroll, and 0xB8000
is the start address
of the text mode screen.

And everything works fine.

But then I tried 

             0xb8000 + Cols*2,
             Cols * (Rows - 1) * 2);

To scroll the screen down, and strange things happends.

Then I got the source code for movedata and found that it works a bit

for(a = 0; a < length; a++)
  *dest++ = *src++;

Which means that it will only work if dest and src does not overlap or
if dest < src.

My question is now: 
Is it possible to make a movedata function which will work even if src <
If so, has someone done it, if so I would like to have a copy.
I dont know enough about asm programming to do it myself.

I guess that I could use memmove, but then i have two problems: 1. How
ot make
the _dos_ds:0xB8000 into a pointer? 2. It is not as fast as movedata.

Is there any other fast ways to scroll the screen? I have tryed the int
0x10 function  6/7,
it works, but are not fast enough.

Thanks in advance.

bertel AT post4 DOT tele DOT dk

- Raw text -

  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019