我相信這會做到(有評論)。
(代碼未經測試)
基本上,現在有3個循環。
1.)等待按鈕被按下。
2.)等待按鈕被釋放。
3.)等待再次按下按鈕。
org 100h
run1:
mov ax, 3
int 33h #Check the mouse
cmp bx, 0 #See if button is pressed
je run1 #If Not pressed, go back and check again
xor bx, bx #Okay, button is pressed, clear the result
run1a:
mov ax, 3
int 33h #Check the mouse
cmp bx, 0 #See if button is released
jne run1a #If NOT equal, then not released, go check again.
xor bx, bx #button is released, clear the result
run2:
mov ax, 3
int 33h #Check the mouse
cmp bx, 0 #if button is pressed (2nd time)
je run2 #If NOT pressed, go to top.
int 20h #Button was pressed. All done (we don't care when its released)
good ol'DOS,:) – 2011-12-22 17:25:03