Как можно узнать текущий цвет фона (TextBackGround) и цвет текста(TextColor)?
Цвет_фона := (TextAttr and 112) div 16;
Цвет_текста := (TextAttr and 15);
Type
Ekr = array[1..4000] of Byte;
Ma : Ekr absolute $B800:$0000;
Function GetChar(x,y : Byte) : Byte;
Begin
GetChar:=Ma[160*(y-1)+x*2-1];
End;
Function GetAttr(x,y : Byte) : Byte;
Begin
GetAttr:=Ma[160*(y-1)+x*2];
End;
Procedure SetChar(x,y,c : Byte);
Begin
Ma[160*(y-1)+x*2-1]:=c;
End;
Procedure SetAttr(x,y,a : Byte);
Begin
Ma[160*(y-1)+x*2]:=a;
End;