home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / GFXFX2.ZIP / SCR_VGA.PAS < prev    next >
Pascal/Delphi Source File  |  1995-02-14  |  859b  |  34 lines

  1.  
  2. program vga_scroll; { SCR_VGA.PAS }
  3. { Basic VGA scroll, by Bas van Gaalen }
  4. uses u_vga,u_kb;
  5. const
  6.   yo=23*8;
  7.   color=7;
  8.   txt:string='This is just an example of a very basic graphics scroll...   ';
  9.  
  10. procedure scroll;
  11. var txtidx,curchar,bitpos,pixline,col:byte;
  12. begin
  13.   txtidx:=1;
  14.   repeat
  15.     curchar:=byte(txt[txtidx]); txtidx:=1+txtidx mod length(txt);
  16.     for bitpos:=7 downto 0 do begin
  17.       vretrace;
  18.       for pixline:=0 to 15 do begin
  19.         move(mem[u_vidseg:(yo+pixline)*320+1],mem[u_vidseg:(yo+pixline)*320+0],320);
  20.         col:=byte(((mem[seg(font^):ofs(font^)+curchar shl 4+pixline]) shr bitpos)
  21.           and 1)*(32+txtidx and $1f+pixline+bitpos);
  22.         putpixel(319,yo+pixline,col);
  23.       end;
  24.     end;
  25.   until keypressed;
  26. end;
  27.  
  28. begin
  29.   setvideo($13);
  30.   getfont(font8x16);
  31.   scroll;
  32.   setvideo(u_lm);
  33. end.
  34.