什么是字符表的内存地址在DOS? [英] What is The Memory Address of Character Table In DOS?

查看:283
本文介绍了什么是字符表的内存地址在DOS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是字符表的DOS中,我们可以通过操纵每个字符的像素创建新字体和符号的地址?

我知道BIOS的中断改变它,但我只需要字符表的内存地址在dos下直接访问。


解决方案

我不记得它是怎么做的话(我二十年前做这个东西),但你可能想看看的 FreeVGA项目。按照文本模式文档可以的选择自己地址(还挺;请参阅字符映射表选择寄存器)。访问该寄存器是这里解释说。

您可能也想看看这个presentation 这与这个主题以及涉及(并可能更容易COM prehend)。

编辑: 这里有一个贴子,介绍了如何更换单个字符。他使​​用 INT 10H,AX = 1100H (的替代文档)来交换一个角色,但在CX寄存器实际上你可以告诉多少个字符,应更换。 这里是一个非常COM prehensive INT 10H 功能的。

编辑2: 另一个不错的文档

修改3:在过去的链接文件,有这样的:


  

有关向字符发生器RAM的直接访问编程


  
  

下面的序列设置访问character-的EGA和VGA
    发电机的记忆。见EGA I / O端口的相关信息。


 出3c4H,0402H面膜章;使能写映射2
出3c4H,0704H内存模式章;阿尔法,分机号负责,非交错
出3ceH,0005H图形模式章;非交错访问
出3ceH,0406H图形杂章;焦炭根内存映射到A000:0
出3ceH,0204H图形ReadMapSelect章;让阅读的chargen RAM


  

这些输出的数量后,将字体数据在A000开始:0和的第一个字节
    对于文字字体数据开始在人物的ASCII值* 32。
    读或写字体数据之后,按以下顺序还原
    在EGA / VGA正常运营:


 出3c4H,0302H面膜章;禁止写入映射2
出3c4H,0304H内存模式章;阿尔法,分机号负责,交错
出3ceH,1005H图形模式章;交错访问
出3ceH,0e06H图形杂章;再生缓冲B800:0
出3ceH,0004H图形ReadMapSelect章;禁止阅读的chargen RAM

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

这篇关于什么是字符表的内存地址在DOS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆