在装配中更改鼠标颜色

时间:2017-03-25 13:18:55

标签: assembly x86 cursor mouse dos

我在组装中做了一些绘画,我希望用户选择他想要绘制的颜色,所以我希望鼠标根据用户现在使用的颜色来改变颜色。

如果不创建自己的鼠标,我怎么能这样做? int 33h可以帮助我吗?

1 个答案:

答案 0 :(得分:0)

你应该试试这个:

MyFirstBlock:
mov ah, 09h ; Bored stuff...
mov cx, 80h ; 80h covers only the text and 1000h the entire remain screen
mov al, 20h ; More bored stuff...
mov bl, 4fh ; This is the color, try with CMD, Ex. 00 is black-black.
int 10h ; Call VGA to display block

然后,用call MyFirstBlock调用它,这是显示单个块的代码,使用你打印功能:

mov si, MyEmptyText
call YouFunctionThatPrintTTYCharacters

MyEmptyText: db ' ', 0

整个代码:

MyFirstBlock:
mov ah, 09h ; Bored stuff...
mov cx, 80h ; 80h covers only the text and 1000h the entire remain screen
mov al, 20h ; More bored stuff...
mov bl, 4fh ; This is the color, try with CMD, Ex. 00 is black-black.
int 10h ; Call VGA to display block
; call MyFirstBlock is useless so dont put it!, until you are in a diferent file...
mov si, MyEmptyText
call YouFunctionThatPrintTTYCharacters

MyEmptyText: db ' ', 0

%INCLUDE "SomeBasicFunctions.asm"

我等待这将是你问题的答案。

哦和int 33h我认为他只在MS-DOS中工作,或者没有?,我从未使用它,而是使用它。