<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>http://wiki.foofun.cn//index.php?action=history&amp;feed=atom&amp;title=Text_UI</id>
	<title>Text UI - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.foofun.cn//index.php?action=history&amp;feed=atom&amp;title=Text_UI"/>
	<link rel="alternate" type="text/html" href="http://wiki.foofun.cn//index.php?title=Text_UI&amp;action=history"/>
	<updated>2026-04-06T21:05:03Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>http://wiki.foofun.cn//index.php?title=Text_UI&amp;diff=234&amp;oldid=prev</id>
		<title>2022年1月13日 (四) 06:04 Zhang3</title>
		<link rel="alternate" type="text/html" href="http://wiki.foofun.cn//index.php?title=Text_UI&amp;diff=234&amp;oldid=prev"/>
		<updated>2022-01-13T06:04:15Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh-Hans-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2022年1月13日 (四) 06:04的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l14&quot;&gt;第14行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第14行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;文本UI使用最多的VGA视频模式是 “VGA mode 3”。 这是最常用的，因为它允许直接内存访问包含每个字符及其关联属性的线性地址。 VGA mode 3提供了80个字符宽的文本界面，每个屏幕25个字符行，尽管在现代计算机上 [[Drawing In a Linear Framebuffer|绘制线性帧缓冲区]] 是优选的，并且通常是强制性的。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;文本UI使用最多的VGA视频模式是 “VGA mode 3”。 这是最常用的，因为它允许直接内存访问包含每个字符及其关联属性的线性地址。 VGA mode 3提供了80个字符宽的文本界面，每个屏幕25个字符行，尽管在现代计算机上 [[Drawing In a Linear Framebuffer|绘制线性帧缓冲区]] 是优选的，并且通常是强制性的。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= = 视频存储器 = =&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== 视频存储器 ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;在VGA模式3中，线性文本缓冲区位于0xB8000的物理位置。 在该地址之间进行读写将直接处理屏幕上的文本。 要从X和Y坐标访问屏幕上的特定字符，使用以下公式很简单:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;在VGA模式3中，线性文本缓冲区位于0xB8000的物理位置。 在该地址之间进行读写将直接处理屏幕上的文本。 要从X和Y坐标访问屏幕上的特定字符，使用以下公式很简单:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Zhang3</name></author>
	</entry>
	<entry>
		<id>http://wiki.foofun.cn//index.php?title=Text_UI&amp;diff=233&amp;oldid=prev</id>
		<title>2022年1月13日 (四) 06:03 Zhang3</title>
		<link rel="alternate" type="text/html" href="http://wiki.foofun.cn//index.php?title=Text_UI&amp;diff=233&amp;oldid=prev"/>
		<updated>2022-01-13T06:03:10Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh-Hans-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2022年1月13日 (四) 06:03的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;第1行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第1行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;b&amp;gt; 文本用户界面 &amp;lt;/b&amp;gt; 或 &amp;lt;b&amp;gt;TUI&amp;lt;/b&amp;gt; 是一种用户界面，其中所有输出都以文本形式呈现，与 [[GUI | 图形用户界面]] 相反，图形用户界面使用图形和文本来显示输出。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;b&amp;gt; 文本用户界面 &amp;lt;/b&amp;gt; 或 &amp;lt;b&amp;gt;TUI&amp;lt;/b&amp;gt; 是一种用户界面，其中所有输出都以文本形式呈现，与 [[GUI | 图形用户界面]] 相反，图形用户界面使用图形和文本来显示输出。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= = 知名度和用途 = =&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== 知名度和用途 ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;早在gui普及之前的DOS时代，几乎所有应用程序都使用某种文本UI。 其中一些很简单，显示菜单或不可移动的面板，但其他一些包括功能齐全的窗口系统，如 [https://en.wikipedia.org/wiki/ Turbo_Pascal Turbo Pascal IDE] 或ms-dos编辑应用程序 (你不能从维基上的截图中看出，但是文件窗口实际上是可调整大小和可移动的，并且它们是堆叠的)。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;早在gui普及之前的DOS时代，几乎所有应用程序都使用某种文本UI。 其中一些很简单，显示菜单或不可移动的面板，但其他一些包括功能齐全的窗口系统，如 [https://en.wikipedia.org/wiki/ Turbo_Pascal Turbo Pascal IDE] 或ms-dos编辑应用程序 (你不能从维基上的截图中看出，但是文件窗口实际上是可调整大小和可移动的，并且它们是堆叠的)。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l9&quot;&gt;第9行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第9行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== 输入 ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== 输入 ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;文本用户界面中的输入主要涉及使用 [[Command_Line | 命令行]] [[shell]]，通常是通过 [[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;键盘&lt;/del&gt;]] 输入命令。 确实存在其他方法，例如可以向上和向下滚动的基于文本的菜单，并提示要求用户按下特定键以发生特定事件。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;文本用户界面中的输入主要涉及使用 [[Command_Line | 命令行]] [[shell]]，通常是通过 [[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;keyboard&lt;/ins&gt;]] 输入命令。 确实存在其他方法，例如可以向上和向下滚动的基于文本的菜单，并提示要求用户按下特定键以发生特定事件。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== 视频模式 ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== 视频模式 ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Zhang3</name></author>
	</entry>
	<entry>
		<id>http://wiki.foofun.cn//index.php?title=Text_UI&amp;diff=232&amp;oldid=prev</id>
		<title>Zhang3：创建页面，内容为“&lt;b&gt; 文本用户界面 &lt;/b&gt; 或 &lt;b&gt;TUI&lt;/b&gt; 是一种用户界面，其中所有输出都以文本形式呈现，与  图形用户界面 相反，图形用户界面使用图形和文本来显示输出。  = = 知名度和用途 = = 早在gui普及之前的DOS时代，几乎所有应用程序都使用某种文本UI。 其中一些很简单，显示菜单或不可移动的面板，但其他一些包括功能齐全的窗口系统，如 [https://en.wikipedi…”</title>
		<link rel="alternate" type="text/html" href="http://wiki.foofun.cn//index.php?title=Text_UI&amp;diff=232&amp;oldid=prev"/>
		<updated>2022-01-13T06:02:01Z</updated>

		<summary type="html">&lt;p&gt;创建页面，内容为“&amp;lt;b&amp;gt; 文本用户界面 &amp;lt;/b&amp;gt; 或 &amp;lt;b&amp;gt;TUI&amp;lt;/b&amp;gt; 是一种用户界面，其中所有输出都以文本形式呈现，与 &lt;a href=&quot;/index.php?title=GUI&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;GUI（页面不存在）&quot;&gt; 图形用户界面&lt;/a&gt; 相反，图形用户界面使用图形和文本来显示输出。  = = 知名度和用途 = = 早在gui普及之前的DOS时代，几乎所有应用程序都使用某种文本UI。 其中一些很简单，显示菜单或不可移动的面板，但其他一些包括功能齐全的窗口系统，如 [https://en.wikipedi…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;b&amp;gt; 文本用户界面 &amp;lt;/b&amp;gt; 或 &amp;lt;b&amp;gt;TUI&amp;lt;/b&amp;gt; 是一种用户界面，其中所有输出都以文本形式呈现，与 [[GUI | 图形用户界面]] 相反，图形用户界面使用图形和文本来显示输出。&lt;br /&gt;
&lt;br /&gt;
= = 知名度和用途 = =&lt;br /&gt;
早在gui普及之前的DOS时代，几乎所有应用程序都使用某种文本UI。 其中一些很简单，显示菜单或不可移动的面板，但其他一些包括功能齐全的窗口系统，如 [https://en.wikipedia.org/wiki/ Turbo_Pascal Turbo Pascal IDE] 或ms-dos编辑应用程序 (你不能从维基上的截图中看出，但是文件窗口实际上是可调整大小和可移动的，并且它们是堆叠的)。&lt;br /&gt;
&lt;br /&gt;
随着图形UI的兴起，基于文本的用户界面在爱好者操作系统项目中仍然是实用的，因为它们是最容易实现的界面类型，并且仍在大型和商业操作系统中使用，对于这些操作系统图形用户界面是不必要的，例如，在大型服务器中。 文本用户界面也很容易快速输出结果或调试数据，并输入命令来测试新功能，而不是编写复杂的图形应用程序。&lt;br /&gt;
&lt;br /&gt;
如今，基于文本的UI主要用于pseudo-ttys，使用 [[Terminals|VT escape sequences]] 而不是直接VGA缓冲区。 最著名的例子是Midnight Commander (DOS下的Norton Commander的Linux克隆) 和 [https://vtm.netxs.online/ VTM] (功能齐全的桌面环境)。 这些UIs的最大优点是可以在基于tty的简单SSH隧道上使用，无需其他协议。 有关基于curses的文本接口的详细信息不在此页的范围之内，该页面仅关注 [[VGA Hardware|VGA]] 缓冲区文本接口。&lt;br /&gt;
&lt;br /&gt;
== 输入 ==&lt;br /&gt;
文本用户界面中的输入主要涉及使用 [[Command_Line | 命令行]] [[shell]]，通常是通过 [[键盘]] 输入命令。 确实存在其他方法，例如可以向上和向下滚动的基于文本的菜单，并提示要求用户按下特定键以发生特定事件。&lt;br /&gt;
&lt;br /&gt;
== 视频模式 ==&lt;br /&gt;
文本UI使用最多的VGA视频模式是 “VGA mode 3”。 这是最常用的，因为它允许直接内存访问包含每个字符及其关联属性的线性地址。 VGA mode 3提供了80个字符宽的文本界面，每个屏幕25个字符行，尽管在现代计算机上 [[Drawing In a Linear Framebuffer|绘制线性帧缓冲区]] 是优选的，并且通常是强制性的。&lt;br /&gt;
&lt;br /&gt;
= = 视频存储器 = =&lt;br /&gt;
在VGA模式3中，线性文本缓冲区位于0xB8000的物理位置。 在该地址之间进行读写将直接处理屏幕上的文本。 要从X和Y坐标访问屏幕上的特定字符，使用以下公式很简单:&lt;br /&gt;
&lt;br /&gt;
position = (y_position * characters_per_line) + x_position;&lt;br /&gt;
&lt;br /&gt;
每个字符在内存中占用两个字节的空间。 第一个字节分为两个部分，前景色和后彩。 第二个字节是要打印的字符的8位ASCII值。&lt;br /&gt;
&lt;br /&gt;
== 颜色 ==&lt;br /&gt;
&lt;br /&gt;
每个字符都有一个颜色字节。 此颜色字节以前景色和背面颜色分开。&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
字节的布局，使用标准的调色板:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Bit 76543210&lt;br /&gt;
    ||||||||&lt;br /&gt;
    |||||^^^-fore colour&lt;br /&gt;
    ||||^----fore colour bright bit&lt;br /&gt;
    |^^^-----back colour&lt;br /&gt;
    ^--------back colour bright bit OR enables blinking Text&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
它很容易以十六进制值写入BL，半字节(Nibbles 4位)颜色 。 &amp;lt;br&amp;gt;&lt;br /&gt;
For Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 0x01 sets the background to black and the fore colour to blue&amp;lt;br&amp;gt;&lt;br /&gt;
 0x10 sets the background to blue and the fore colour to black &amp;lt;br&amp;gt;&lt;br /&gt;
 0x11 sets both to blue.&lt;br /&gt;
启动时 [[BIOS]] 设置的默认显示颜色为0x0F: 背景为0 (黑色)，前景为7 (白色) + 8 (亮度)。&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
在文本模式0中，可以使用以下标准调色板。 您可以使用VGA命令更改此调色板。&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
! Number&lt;br /&gt;
! Colour&lt;br /&gt;
! Name&lt;br /&gt;
! Number + bright bit&lt;br /&gt;
! bright Colour&lt;br /&gt;
! Name&lt;br /&gt;
|- &lt;br /&gt;
| 0&lt;br /&gt;
| style=&amp;quot;background: #000000&amp;quot; | &lt;br /&gt;
| Black&lt;br /&gt;
| 0+8=8&lt;br /&gt;
| style=&amp;quot;background: #555555&amp;quot; | &lt;br /&gt;
| Dark Gray&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| style=&amp;quot;background: #0000AA&amp;quot; | &lt;br /&gt;
| Blue&lt;br /&gt;
| 1+8=9&lt;br /&gt;
| style=&amp;quot;background: #5555FF&amp;quot; | &lt;br /&gt;
| Light Blue&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| style=&amp;quot;background: #00AA00&amp;quot; | &lt;br /&gt;
| Green&lt;br /&gt;
| 2+8=A&lt;br /&gt;
| style=&amp;quot;background: #55FF55&amp;quot; | &lt;br /&gt;
| Light Green&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| style=&amp;quot;background: #00AAAA&amp;quot; | &lt;br /&gt;
| Cyan&lt;br /&gt;
| 3+8=B&lt;br /&gt;
| style=&amp;quot;background: #55FFFF&amp;quot; | &lt;br /&gt;
| Light Cyan&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| style=&amp;quot;background: #AA0000&amp;quot; | &lt;br /&gt;
| Red&lt;br /&gt;
| 4+8=C&lt;br /&gt;
| style=&amp;quot;background: #FF5555&amp;quot; | &lt;br /&gt;
| Light Red&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| style=&amp;quot;background: #AA00AA&amp;quot; | &lt;br /&gt;
| Magenta&lt;br /&gt;
| 5+8=D&lt;br /&gt;
| style=&amp;quot;background: #FF55FF&amp;quot; | &lt;br /&gt;
| Light Magenta&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| style=&amp;quot;background: #AA5500&amp;quot; | &lt;br /&gt;
| Brown&lt;br /&gt;
| 6+8=E&lt;br /&gt;
| style=&amp;quot;background: #FFFF00&amp;quot; | &lt;br /&gt;
| Yellow&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| style=&amp;quot;background: #AAAAAA&amp;quot; | &lt;br /&gt;
| Light Gray&lt;br /&gt;
| 7+8=F&lt;br /&gt;
| style=&amp;quot;background: #FFFFFF&amp;quot; | &lt;br /&gt;
| White&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== 控制台类示例 ==&lt;br /&gt;
文本控制台类的文档记录很多且易于理解的示例来自Brandon的内核教程，该教程可在 http://osdever.net/bkerndev/Docs/printing.htm 获得&lt;br /&gt;
&lt;br /&gt;
== C打印字符的代码 ==&lt;br /&gt;
以下C代码将在X和Y坐标处打印一个字符:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void WriteCharacter(unsigned char c, unsigned char forecolour, unsigned char backcolour, int x, int y)&lt;br /&gt;
{&lt;br /&gt;
     uint16_t attrib = (backcolour &amp;lt;&amp;lt; 4) | (forecolour &amp;amp; 0x0F);&lt;br /&gt;
     volatile uint16_t * where;&lt;br /&gt;
     where = (volatile uint16_t *)0xB8000 + (y * 80 + x) ;&lt;br /&gt;
     *where = c | (attrib &amp;lt;&amp;lt; 8);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 滚动 ==&lt;br /&gt;
滚动是通过将第二行字符复制到第一行字符上，将第三行复制到第二行字符上等来实现的。 然后用空字符清除最后一行文本 (通常是前/后颜色分别为7和0的空白)。 在文本模式0中，这通过将字符80-159复制到存储器位置0-79、160-239到80-159等来实现。&lt;br /&gt;
&lt;br /&gt;
== 虚拟终端 ==&lt;br /&gt;
虚拟终端与物理屏幕大同小异，但不是向参考屏幕的线性文本缓冲区写入文本，而是将文本写入存储在存储器中的线性文本缓冲区。 每个虚拟终端都有自己的文本缓冲区，当前在屏幕上显示的终端将其缓冲区复制到视频缓冲区以在屏幕上显示。 具有多个虚拟文本缓冲区具有其他优点，例如仅具有多个缓冲区的一部分同时输出到屏幕上。&lt;br /&gt;
&lt;br /&gt;
== 缓冲数据 ==&lt;br /&gt;
当使用基于文本的接口时，直接将文本写入视频存储器可能最终开始产生问题，特别是当处理键盘输入、处理来自菜单的输入或处理多个文本模式控制台时。 通常可以通过将字符和颜色数据写入单独的缓冲区 (未解析)，并定期将缓冲区刷新到屏幕来克服此问题。 有多种方法可以实现文本缓冲区; 一个简单的解决方案可能具有一个平坦的内存块，在将文本和颜色字节复制到屏幕之前存储在该内存块中，尽管更高级的方法可能包括每行缓冲区，平面缓冲区或跟踪更新的线或屏幕部分的系统。&lt;br /&gt;
&lt;br /&gt;
==另见==&lt;br /&gt;
* [[VGA Hardware]]&lt;br /&gt;
* [[Text Mode Cursor]]&lt;br /&gt;
&lt;br /&gt;
===外部链接===&lt;br /&gt;
* [https://vtm.netxs.online/ VTM] Text-based Desktop Environment that uses curses and VT codes&lt;br /&gt;
&lt;br /&gt;
[[Category:Text UI]]&lt;br /&gt;
[[Category:Video]]&lt;/div&gt;</summary>
		<author><name>Zhang3</name></author>
	</entry>
</feed>