谁教CPU“ A..B..C”? [英] Who Teaches the CPU 'A..B..C'?

查看:79
本文介绍了谁教CPU“ A..B..C”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不好意思,但是我似乎无法从互联网上找到满意的答案。我的意思是我们可以在PC的开始屏幕上看到字符 X显示在屏幕上。但是计算机如何知道位模式已转换为 x?谁给这样的定义?是BIOS,操作系统,CPU,显示驱动器还是应用程序?

Excuse my idiotic question, but I can't seem to find even one satisfying answer from the internet. I mean we can see character 'X' displayed on the screen right from the PC's start screen. But how would the computer know that the bit patterns is translated to 'x'? Who gives such definitions? Is it the BIOS, the OS, the CPU or the display driver or the apps?

推荐答案

这取决于在哪一刻,以及使用哪个操作系统,以及使用哪种硬件。对于当前x86 Linux wiki / Personal_computer rel = nofollow> PC 台式机:

It depends at which moment, and with which operating system, and on which hardware. For Linux on a current x86 PC desktop:

在早期启动时,它使用 VGA 驱动程序(和 BIOS 也有一些有限的显示功能)。 IIRC,原始的VGA卡具有一些包含固定宽度字体的ROM,并且仍在使用(在某些兼容模式下)。

At early boot time, it uses the VGA driver (and the BIOS also has some limited display functions). IIRC, the original VGA cards had some ROM containing a fixed width font, and that is still used (in some compatibility mode).

IIRC,图形卡具有用于BIOS和其初始VGA字体的ROM。但这仅在BIOS时或在早期引导过程中使用。

但是大多数情况下,Linux桌面使用其 X11 服务器 Xorg 。服务器管理字体,并使用图形视频卡(通常具有 GPU ),可以复制适当的位图 X11协议知道字体,但是今天大多数应用程序都使用客户端 Xft

But most of the time, a Linux desktop uses its X11 server Xorg. The server manages fonts, and display them using the graphics video card (which often has a GPU), probably by copying appropriate bitmaps. The X11 protocol knows about fonts, but today most applications use the client side Xft.

未来 Wayland 体系结构将在客户端使用字体。

The future Wayland architecture would have fonts on the client side.

您可能会看一下 OsDev ,它具有多个相关页面。

You might look on OsDev, it has several related pages.

低级图形库,例如 libSDL OpenGL (或 Xlib )具有以下功能:以任意字体绘制文本,例如最初 XDrawText XftDrawString 和Xft。

Low-level graphics libraries like libSDL or OpenGL (or Xlib) have functions to draw text in an arbitrary font, e.g. XDrawText originally, or XftDrawString with Xft.

高级图形用户界面工具包,例如 Qt Gtk 提供小工具带有文本显示,通常围绕其事件循环

High-level graphical user interface toolkits like Qt or Gtk provide widgets with text display, generally around their event loop.

在详细信息中,事情很复杂且特定于硬件(遗憾的是,某些图形卡制造商-例如 Nvidia -不发布其硬件规格-因此它必须为反向工程)。这就是为什么您使用一个可以为您提供一些抽象代码的操作系统的原因。

In the gory details, things are complex and hardware specific (and sadly, some graphics cards manufacturers -e.g. Nvidia- don't publish the specification of their hardware - so it needs to be reverse engineered). This is why you use an operating system which will provide you some abstraction to code on.

这篇关于谁教CPU“ A..B..C”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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