What is the address of character table in DOS where we can create new fonts and symbols by manipulating the pixels of the each character?
I know to change it with BIOS interrupts, but I only need the memory address of the character table in dos for direct access.
I can't remember how it was done any more (I did this stuff two decades ago), but you might want to look at the FreeVGA project. According to the text mode documentation you can select the address yourself (kinda; see the Character Map Select Register). Accessing that register is explained here.
You might also want to look at this presentation which deals with this topic as well (and is probably easier to comprehend).
Edit: Here's a post that explains how to replace a single character. He uses int 10h, ax=1100h (alternative documentation) to exchange a character, but in the CX register you can actually tell how many characters should be exchanged. Here's a very comprehensive list of int 10h
functions.
Edit 2: Found another nice documentation.
Edit 3: In the last linked documentation, there's this:
Programming for Direct Access to Character Generator RAM
The following sequence sets up the EGA and VGA for accessing character- generator memory. See EGA I/O Ports for related information.
out 3c4H, 0402H Mask reg; enable write to map 2
out 3c4H, 0704H Memory Mode reg ; alpha, ext mem, non-interleaved
out 3ceH, 0005H Graphics Mode reg; non-interleaved access
out 3ceH, 0406H Graphics Misc reg; map char gen RAM to a000:0
out 3ceH, 0204H Graphics ReadMapSelect reg; enable read chargen RAM
After these OUTs, the font data begins at a000:0 and the first byte of font data for a character begins at the character's ASCII value * 32. After reading or writing the font data, the following sequence restores the EGA/VGA to normal operations:
out 3c4H, 0302H Mask reg; disable write to map 2
out 3c4H, 0304H Memory Mode reg; alpha, ext mem, interleaved
out 3ceH, 1005H Graphics Mode reg; interleaved access
out 3ceH, 0e06H Graphics Misc reg; regen buffer to b800:0
out 3ceH, 0004H Graphics ReadMapSelect reg; disable read chargen RAM
If I remember correctly and the graphic cards didn't change too much (I played with that the last time more than 15 years ago), the font information isn't at a given memory address, it is loaded on the graphic card memory.
来源:https://stackoverflow.com/questions/6178276/what-is-the-memory-address-of-character-table-in-dos