程序集 x86:隐藏光标

Assembly x86: Hiding Cursor

我正在为 OS 创建一个选择页面。我想隐藏 VGA 光标以获得更好的视图。我找到了一些方法,比如将 VGA 光标移出屏幕。但是还有别的办法吗?我正在使用 BIOS.

您可以使用 int 10h BIOS 中断功能代码 01h(在 AH 中)来设置光标形状。

函数的参数如下:

CH = Scan Row Start, CL = Scan Row End

Normally a character cell has 8 scan lines, 0-7. So, CX=0607h is a normal underline cursor, CX=0007h is a full-block cursor. If bit 5 of CH is set, that often means "Hide cursor". So CX=2607h is an invisible cursor.

Some video cards have 16 scan lines, 00h-0Fh.

Some video cards don't use bit 5 of CH. With these, make Start>End (e.g. CX=0706h)

此文档来自https://en.wikipedia.org/wiki/INT_10H