home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS 1
/
BBS#1.iso
/
for-dos
/
newtvsrc.arj
/
FONT.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1994-04-04
|
1KB
|
80 lines
{$F+,O+}
unit Font;
interface
procedure LoadFont;
procedure RestoreFont;
implementation
uses
Dos,
Drivers,
Graph;
const
VIDEO = $10;
procedure Font8x16; external;
{$L FONT8x16.OBJ}
procedure Font8x14; external;
{$L FONT8x14.OBJ}
procedure Font8x8; external;
{$L FONT8x8.OBJ}
procedure LoadFont;
var
Gd,Gm: Integer;
P: Pointer;
R: Registers;
begin
{ HideMouse;}
R.BX := 0;
if (ScreenMode and smFont8x8) = 0 then
begin
DetectGraph( Gd,Gm );
case Gd of
MCGA,VGA:
begin
P := @Font8x16;
R.BX := 4096;
end;
EGA,EGA64,EGAMono:
begin
P := @Font8x14;
R.BX := 3584;
end;
end;
R.CX := $100;
R.DX := 0;
end else
begin
P := @Font8x8;
R.BX := $800;
R.DX := 0;
R.CX := $100;
end;
if R.BX = 0 then Exit;
R.ES := Seg(P^);
R.BP := Ofs(P^);
R.AX := $1100;
Intr( $10,R );
{ asm
MOV AX,$1003
XOR BL,BL
INT $10
end;
ShowMouse;}
end;
procedure RestoreFont; assembler;
asm
mov ax,$03
int VIDEO
end;
end.