BBS: Inland Empire Archive Date: 11-04-92 (09:26) Number: 363 From: RICH GELDREICH Refer#: NONE To: QUINN TYLER JACKSON Recvd: NO Subj: Re: The case of the missi Conf: (2) Quik_Bas
Try this code out...
'Simple code to save & load the EGA/VGA font data. Rich Geldreich
'Run this program. You should notice no difference in the character
'fonts at all if this program actually works...
DEFINT A-Z
DECLARE SUB VOn ()
DECLARE SUB VOff ()
DECLARE SUB SaveChars (F$, srange%, erange%)
DECLARE SUB LoadChars (F$, srange%)
SaveChars "temp.bin", 0, 255 'Saves fonts 0 to 255 to temp.bin
LoadChars "temp.bin", 0 'Loads fonts 0 to 255 from temp.bin
SUB LoadChars (F$, srange)
VOn
BLOAD F$, srange * 32
VOff
END SUB
SUB SaveChars (F$, srange, erange)
VOn
BSAVE F$, srange * 32, ((erange - srange) + 1) * 32
VOff
END SUB
'Restores the EGA/VGA back to normal operation after VOn.
SUB VOff
OUT &H3CE, 4: OUT &H3CF, 1
OUT &H3CE, 6: OUT &H3CF, &HE
OUT &H3CE, 5: OUT &H3CF, &H10
OUT &H3C4, 2: OUT &H3C5, 3
OUT &H3C4, 4: OUT &H3C5, 3
END SUB
'Enables the EGA/VGA fonts for reading/writing. Each character font is
'32 bytes long. Use PEEK & POKE to modify the character set. Normal
'text mode operation must be restored by VOff: Don't get caught with
'your pants down!
SUB VOn
OUT &H3C4, 2: OUT &H3C5, 4
OUT &H3C4, 4: OUT &H3C5, 7
OUT &H3CE, 4: OUT &H3CF, 2
OUT &H3CE, 5: OUT &H3CF, 0
OUT &H3CE, 6: OUT &H3CF, 4
DEF SEG = &HA000
END SUB
Hope that works!
Rich
--- MsgToss 2.0b
* Origin: Computer Co-Op - Voorhees, NJ | Ted Hare (1:266/29)

Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET