home *** CD-ROM | disk | FTP | other *** search
/ Delphi Programming Unleashed / Delphi_Programming_Unleashed_SAMS_Publishing_1995.iso / chap17 / direct / direct.pas
Pascal/Delphi Source File  |  1995-03-20  |  820b  |  19 lines

  1. program Direct;
  2.  
  3. { Program copyright (c) 1995 by Charles Calvert }
  4. { Project Name: DIRECT }
  5.  
  6. var
  7.   Video: array[0..3999] of Byte absolute $B800:$0000; {Address Video Screen}
  8.   A: Byte;     { Character and attribute to write to the screen            }
  9.   i: Integer;  { Counter                                                   }
  10.  
  11. begin
  12.   A := 65;                                  { Initialize character to 'A'  }
  13.   for i := 0 to 3999 do begin               { Iterate through video memory }
  14.     Move(A, Video[i], 1);                   { Write to video memory        }
  15.     if ((i + 1) mod 160 = 0) then Inc(A);   { Increment character          }
  16.   end;                                      { end loop                     }
  17.   ReadLn;                                   { Pause so user can see result }
  18. end.
  19.