Assembly 如何在汇编语言中显示鼠标点击时像素的移动
我想显示一个像素的移动,当我在屏幕上单击时,一个像素显示在单击的位置,但在屏幕上的任何其他点单击时,像素应移动到该位置,并且像素的移动应像动画一样可见。问题是移动不可见,旧像素未隐藏。plz帮助我这里是我的代码:Assembly 如何在汇编语言中显示鼠标点击时像素的移动,assembly,tasm,Assembly,Tasm,我想显示一个像素的移动,当我在屏幕上单击时,一个像素显示在单击的位置,但在屏幕上的任何其他点单击时,像素应移动到该位置,并且像素的移动应像动画一样可见。问题是移动不可见,旧像素未隐藏。plz帮助我这里是我的代码: .model small .stack 100h .code main proc mov ah,0 mov al,6 ;video mode int 10h mov ax,0 int 33h ;initializing
.model small
.stack 100h
.code
main proc
mov ah,0
mov al,6 ;video mode
int 10h
mov ax,0
int 33h ;initializing mouse pointer
mov ax,01
int 33h ;show mouse pointer
mov ax,07
mov cx,100 ;set horizontal limit
mov dx,500
int 33h
mov ax,08 ;set verticle limit
mov cx,50
mov dx,160
int 33h
MLP:
MOV AX,5
INT 33h
CMP AX,1 ;this compares button status with 1(left button)
JNE MLp ;mouse loop executes untill left button press
mov ax,03 ;get current location of mouse pointer
int 33h
mov ah,0ch ;it glow pixel on current mouse position
mov al,01
dec dx
int 10h
jmp MLp ;for clicking more than 1
mov ah,01 ;show screen untillany key pressed
int 21h
mov ah,0 ;back to text mode
mov al,3
int 10h
mov ah,4ch ;terminate dos shell
int 21h
main endp
end main
您应该提供一些有关操作系统/环境的信息。可能会相应地更新标签。我正在Win7上使用Tasm