[Back to SCREEN SWAG index] [Back to Main SWAG index] [Original]
{
Read the character visible on the screen
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º º°
º AVONTURE CHRISTOPHE º°
º AVC SOFTWARE º°
º BOULEVARD EDMOND MACHTENS 157/53 º°
º B-1080 BRUXELLES º°
º BELGIQUE º°
º º°
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ°
°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
}
Procedure ReadCar (X, Y : Word; Var Attr : Byte; Var Carac : Char);
Var
Car : ^char;
Attribut : ^Byte;
AdressP : Word Absolute $0040:$004E; { Address of the screen page }
Begin
New (car); { Allocate memory for the character }
{ Get the character from the screen video memory -for the active video
page- }
Car := Ptr($B800,(Y*160 + X Shl 1 + AdressP Shl 12));
Carac := car^;
New (attribut); { Allocate memory for the character color attribute }
{ Get the color attribute of the character -for the active video page- }
Attribut := Ptr($B800,(Y*160 + X Shl 1 + 1 + AdressP Shl 12));
Attr := attribut^;
End;
[Back to SCREEN SWAG index] [Back to Main SWAG index] [Original]