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

  1.  
  2. {$define cpu386}
  3.  
  4. program creditscroll; { SCR_UP.PAS }
  5. { Plain and simple scroll, by Bas van Gaalen }
  6. uses u_vga,u_mdx,u_kb;
  7. const
  8.   lines=45;
  9.   txt:array[0..lines-1] of string[30]=(
  10.    {.........|.........|.........|}
  11.     'This is a credits-scroll',
  12.     'in mode-q: 256x256x256.',
  13.     'That''s a chained mode, with',
  14.     'a lineair addressing sceme.',
  15.     'The graphics-screen is',
  16.     'initialized in the unit',
  17.     'umodeq. It''s enclosed in the',
  18.     'next message (I hope).','','',
  19.     'and so the credits go to','','',
  20.     '...Bas van Gaalen...','','',
  21.     'Btw: this is quite lame:',
  22.     'not even a hardware-scroll!',
  23.     'But it''s just to show the',
  24.     'nice overscan-mode...','',
  25.     'Uuuhm, can someone supply',
  26.     'some shit, to fill up this',
  27.     'text?','',
  28.     'Oyeah, before I forget,',
  29.     'mode-q is a tweaked mode,',
  30.     'and it plays a bit with the',
  31.     'VGA-registers!',
  32.     'So again: I won''t take any',
  33.     'responsebilty for this code!',
  34.     'It works fine on my ET-4000.','','','',
  35.     '','','','','','','','','','');
  36.  
  37. procedure moveup; assembler;
  38. asm
  39.   push ds
  40.   mov es,u_vidseg
  41.   mov ds,u_vidseg
  42.   xor di,di
  43.   mov si,0100h
  44. {$ifdef cpu386}
  45.   mov cx,255*256/4
  46.   db $66; rep movsw
  47. {$else}
  48.   mov cx,255*256/2
  49.   rep movsw
  50. {$endif}
  51.   pop ds
  52. end;
  53.  
  54. var i,j,slidx,txtidx:byte;
  55. begin
  56.   mdx_setmodex(mdx_256x256c,256);
  57.   getfont(font8x8);
  58.   txtidx:=0; slidx:=0;
  59.   repeat
  60.     for i:=1 to length(txt[txtidx]) do for j:=0 to 7 do
  61.       if ((mem[seg(font^):ofs(font^)+ord(txt[txtidx][i])*8+slidx] shl j) and 128)<>0 then
  62.         mem[u_vidseg:$fe00+i*8+(256-8*length(txt[txtidx])) div 2+j]:=32+txtidx+slidx+j;
  63.     vretrace;
  64.     moveup;
  65.     slidx:=(1+slidx) mod 8;
  66.     if slidx=0 then txtidx:=(1+txtidx) mod lines;
  67.   until keypressed;
  68.   setvideo(u_lm);
  69. end.
  70.