video1.pp 418 B

123456789101112131415161718192021222324
  1. program video1;
  2. uses
  3. video, keyboard;
  4. var
  5. k: TKeyEvent;
  6. X, Y: Integer;
  7. begin
  8. InitKeyboard;
  9. InitVideo;
  10. repeat
  11. for X := 0 to ScreenWidth - 1 do
  12. for Y := 0 to ScreenHeight - 1 do
  13. VideoBuf^[Y * ScreenWidth + X] := ((X + Y) mod 256) or $0700;
  14. UpdateScreen(False);
  15. k := GetKeyEvent;
  16. k := TranslateKeyEvent(k);
  17. until GetKeyEventChar(k) = 'q';
  18. DoneVideo;
  19. DoneKeyboard;
  20. end.