Mail Archives: djgpp/1997/07/24/12:26:26
You wrote:
>Can anyone tell me a easy why to redefine the text mode character set
>and restore it afterwards.
A way, yes. Easy, depends on your point of view.
First, have the new font somewhere in your program. It's stored as one byte
per scan line per character. You may be able to get a font editor to output
this.
Move the font into DOS memory. Depending on its size, it may fit the
transfer buffer, or you can use __dpmi_allocate_dos_memory. Then use
dosmemput to do the move.
Then, do an INT 10 with:
- AX = 0x1100
- ES:BP -> your font in real-mode memory
- CX = # of characters to load (256 for all of them)
- DX = character to start at (probably 0)
- BL = which block to load (0)
- BH = bytes per character (16 for 8x16 font, 14 for 8x14, etc)
You can put it back with INT 10/AH = 0/AL = 3, or do textmode(_CO80) after
#including <conio.h>
Source: Ralf Brown's Interrupt List R53
HTH
Nate Eldredge
eldredge AT ap DOT net
- Raw text -