fpc/packages/rtl-console/tests/video1.pp
nickysn 90113ef819 + added simple test for the video unit
git-svn-id: branches/unicodekvm@48483 -
2021-02-01 05:10:39 +00:00

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.