home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 8
/
CDASC08.ISO
/
NEWS
/
554
/
JUILLET
/
VGACHARS.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-10-07
|
3KB
|
91 lines
{─ Fido Pascal Conference ────────────────────────────────────────────── PASCAL ─
Msg : 125 of 320
From : Jack Moffitt 1:124/1301.0 27 Jul 93 18:02
To : Dustin Nulf
Subj : Remaping a Program's Cha
────────────────────────────────────────────────────────────────────────────────
DN> >and finally call int 10h. if you need some source, i can probably whip
DN> >up another unit for you..
DN>That would be nice, Jack! :)
ok.. here you are
___-------CUT HERE------8<--------------------}
unit VGAChars;
{ VGA Chars v1.0
Author: Jack Moffitt
Purpose: Change the default character set to a user defined font.
Date: 07-26-93
This is unit is donated to the public domain. Please feel free to
manipulate this info in any way you see possible without prior permission
from the author. }
interface
procedure LoadNewCharSet(SegCharSet, OfsCharSet, Start, Count: word);
procedure ReloadDefaults;
implementation
uses Crt;
{ LoadNewCharSet will load a new user defined font given three parameters.
CharSet is a pointer to the new CharSet.
Start is the ascii value of the starting char to replace.
Count is the number of chars to replace. }
procedure LoadNewCharSet(SegCharSet, OfsCharSet, Start, Count: word);
begin
asm
mov ax, SegCharSet { Initialize the pointer to ES:BP }
mov es, ax
mov ax, 1100h { Function 11h; SubFunction 00h }
mov bx, 1000h { 16 bytes per character (1 for each line) }
mov cx, Count { Set how many characters to replace }
mov dx, Start { Specify where to start replacing }
mov bp, OfsCharSet { Carried over from above, has to be done or else
Count and Start will be corrupted! }
int 10h
end;
end;
{ ReloadDefaults will restore the normal character font. }
procedure ReloadDefaults;
begin
textmode(co80); { Restore old font }
end;
end.
___----------AND AGAIN---------------
hope this does what you wanted.. just change the db's in the dummy
procedure and that's all.. i got the idea of the dummy procedure from
the author of SPCFONT.ZIP.. it takes up less of your datasegment
otherwise you'd take almost 4k redifining the whole character set. Each
set of 16 bytes represents ONE chacter. each byte is a binary slice of
the char. i did it like:
255 = FFh = 11111111b so it's : 11111111
11111111
11111111
11111111
11111111
11111111
11111111
11111111
11111111
11111111
on down to the 16th byte. I believe this only works on ega/vga
computers. try it out.. you can do some pretty neat tricks.. (just
like all of nortons utilities!)...