我正在学校完成我的结局项目,在我的程序中鼠标是红色的(图形模式)。有没有办法将其改为常规? 我听说很容易,但我找不到它。
谢谢!
答案 0 :(得分:-1)
这是我更改光标形状的代码:
;FROM http://lateblt.tripod.com/asm.htm
.stack 100h
.data
my_cursor DB 11111111B, 11111001B
DB 11111111B, 11110000B
DB 11111111B, 11110000B
DB 11111111B, 11110000B
DB 11111111B, 11110000B
DB 11111111B, 11110000B
DB 00000111B, 11000000B
DB 00000011B, 10000000B
DB 00000011B, 10000000B
DB 00000111B, 11000000B
DB 00000111B, 11000000B
DB 00001111B, 11100000B
DB 00011111B, 11110000B
DB 00011111B, 11111000B
DB 00011111B, 11111000B
DB 00011111B, 11111000B
DB 00000000B, 00000110B
DB 00000000B, 00001111B
DB 00000000B, 00001111B
DB 00000000B, 00001111B
DB 00000000B, 00001111B
DB 00000000B, 00001111B
DB 11111000B, 00111111B
DB 11111100B, 01111111B
DB 11111100B, 01111111B
DB 11111000B, 00111111B
DB 11111000B, 00111111B
DB 11110000B, 00011111B
DB 11100000B, 00001111B
DB 11100000B, 00000111B
DB 11100000B, 00000111B
DB 11100000B, 00000111B
.code
mov ax, @data ;INITIALIZE DATA SEGMENT.
mov ds, ax
mov es, ax ;NECESSARY TO CHANGE CURSOR COLOR.
mov ah, 0
mov al, 13h ;MODE 320x200.
int 10h ;START GRAPHICS MODE.
mov ax, 1 ;TURN MOUSE
int 33h ;CURSOR ON.
mov ax, 09h
mov bx, 0ah
mov cx, 0
mov dx, offset my_cursor ;SHAPE OF A HAND.
int 33h ;SET MOUSE CURSOR LOOK.
repeat: ;REPEAT UNTIL USER PRESS ANY KEY.
mov ah, 0bh
int 21h
cmp al, 0
je repeat
mov ax, 4c00h ;TERMINATE PROGRAM.
int 21h
在Windows XP和TASM上测试:
tasm /zi filename
tlink /v filename
filename
它运行得很好,光标有一只手的形状。