mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-05 08:45:59 +02:00
* fix bug report #1934
This commit is contained in:
parent
4dcd96747e
commit
cc4b947871
@ -2,6 +2,10 @@ program example2;
|
|||||||
|
|
||||||
uses video,keyboard;
|
uses video,keyboard;
|
||||||
|
|
||||||
|
{$ifndef cpu86}
|
||||||
|
{$error This example only works on intel 80x86 machines}
|
||||||
|
{$endif}
|
||||||
|
|
||||||
Var
|
Var
|
||||||
P,PP,D : Integer;
|
P,PP,D : Integer;
|
||||||
K: TKeyEvent;
|
K: TKeyEvent;
|
||||||
@ -9,10 +13,10 @@ Var
|
|||||||
Procedure PutSquare (P : INteger; C : Char);
|
Procedure PutSquare (P : INteger; C : Char);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
VideoBuf^[P]:=Ord(C)+($07 shr 8);
|
VideoBuf^[P]:=Ord(C)+($07 shl 8);
|
||||||
VideoBuf^[P+ScreenWidth]:=Ord(c)+($07 shr 8);
|
VideoBuf^[P+ScreenWidth]:=Ord(c)+($07 shl 8);
|
||||||
VideoBuf^[P+1]:=Ord(c)+($07 shr 8);
|
VideoBuf^[P+1]:=Ord(c)+($07 shl 8);
|
||||||
VideoBuf^[P+ScreenWidth+1]:=Ord(c)+($07 shr 8);
|
VideoBuf^[P+ScreenWidth+1]:=Ord(c)+($07 shl 8);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
@ -2,6 +2,10 @@ program testvideo;
|
|||||||
|
|
||||||
uses video,keyboard,vidutil;
|
uses video,keyboard,vidutil;
|
||||||
|
|
||||||
|
{$ifndef cpu86}
|
||||||
|
{$error This example only works on intel 80x86 machines}
|
||||||
|
{$endif}
|
||||||
|
|
||||||
Var
|
Var
|
||||||
i : longint;
|
i : longint;
|
||||||
k : TkeyEvent;
|
k : TkeyEvent;
|
||||||
|
@ -5,6 +5,11 @@ Interface
|
|||||||
uses
|
uses
|
||||||
video;
|
video;
|
||||||
|
|
||||||
|
{$ifndef cpu86}
|
||||||
|
{$error This example only works on intel 80x86 machines}
|
||||||
|
{$endif}
|
||||||
|
|
||||||
|
|
||||||
Procedure TextOut(X,Y : Word;Const S : String);
|
Procedure TextOut(X,Y : Word;Const S : String);
|
||||||
|
|
||||||
Implementation
|
Implementation
|
||||||
@ -20,7 +25,7 @@ begin
|
|||||||
If P+M>ScreenWidth*ScreenHeight then
|
If P+M>ScreenWidth*ScreenHeight then
|
||||||
M:=ScreenWidth*ScreenHeight-P;
|
M:=ScreenWidth*ScreenHeight-P;
|
||||||
For I:=1 to M do
|
For I:=1 to M do
|
||||||
VideoBuf^[P+I-1]:=Ord(S[i])+($07 shr 8);
|
VideoBuf^[P+I-1]:=Ord(S[i])+($07 shl 8);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
Loading…
Reference in New Issue
Block a user