Fast text scrolling

{
Hi, I've been working with different methods of scrolling the screen
from the current values of the video mem at $B800 to another 4000 byte
array. So far, I have only figured out vertical scrolling. If anyone
knows a way to do horizontal/diagonal scrolling, I would be very
thankful if someone posted something..I haven't found any really
decent text (ones that work with EGA or VGA, not just VGA) scrollers
that work with horizontal.

Here is my fast scroll demo prog, it scrolls the current text screen
with another garbly screen up and down really fast.. it works by doing
scrolling two lines at a time.

Quote
}

program scrollsamp;

uses crt; { uhhh for readkey.. yeah }

type
  tscreen = array[1..25, 1..80, 1..2] of byte;  {y,x,byte/attr}

var
  scr: tscreen absolute $B800:$0000;  { the color screen }
  screen1, screen2: ^tscreen;         { current / garble screens }

procedure scroll(screen: tscreen; direction: byte);
var
  w: word;
begin
  { direction: 0 = down, 1 = up }
  case direction of
    0: begin
         move(scr[1,1,1], scr[2,1,1], 4000 - 160);
         move(screen[25,1,1], scr[1,1,1], 160);
         for w := 12 downto 1 do
         begin
           move(scr[1,1,1], scr[3,1,1], 4000 - 320);
           move(screen[(w * 2) - 1,1,1], scr[1,1,1], 160);
           move(screen[(w * 2),1,1], scr[2,1,1], 160);
         end;
       end;
    1: begin
         for w := 1 to 12 do
         begin
           move(scr[3,1,1], scr[1,1,1], 4000 - 320);
           move(screen[(w * 2) - 1,1,1], scr[24,1,1], 160);
           move(screen[(w * 2),1,1], scr[25,1,1], 160);
         end;
         move(scr[2,1,1], scr[1,1,1], 4000 - 160);
         move(screen[25,1,1], scr[25,1,1], 160);
      end;
  end;
end;

var
  c: char; { for readkey }
  b: boolean; { which screen it's on; screen1 = true }

begin
  new(screen1);
  new(screen2);
  move(scr, screen1^, 4000); { move cur screen into screen1 }

  fillchar(screen2^, 2000, 5);
  fillchar(screen2^[13,41,1], 2000, 6);  { make cool screen2 }

  b := true; { starting on screen1 }

  while true do
  begin
    if keypressed then break;
    b := b xor true;
    case b of
      true:  scroll(screen1^, 1);
      false: scroll(screen2^, 0);
    end;
  end;
  readkey; { dispose key in buffer }
  dispose(screen1);
  dispose(screen2);
end.