mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-24 08:39:18 +02:00
25 lines
418 B
ObjectPascal
25 lines
418 B
ObjectPascal
program video1;
|
|
|
|
uses
|
|
video, keyboard;
|
|
|
|
var
|
|
k: TKeyEvent;
|
|
X, Y: Integer;
|
|
begin
|
|
InitKeyboard;
|
|
InitVideo;
|
|
repeat
|
|
for X := 0 to ScreenWidth - 1 do
|
|
for Y := 0 to ScreenHeight - 1 do
|
|
VideoBuf^[Y * ScreenWidth + X] := ((X + Y) mod 256) or $0700;
|
|
UpdateScreen(False);
|
|
|
|
k := GetKeyEvent;
|
|
k := TranslateKeyEvent(k);
|
|
until GetKeyEventChar(k) = 'q';
|
|
DoneVideo;
|
|
DoneKeyboard;
|
|
end.
|
|
|