I was playing around with assembly, compiling to .com files using NASM on Windows 7. For some reason, this doesn’t work:
org 100h
run1:
mov ax, 3
int 33h
cmp bx, 0
je run1
xor bx, bx
run2:
mov ax, 3
int 33h
cmp bx, 0
je run2
int 20h
I think this should repeat run1 until there is a mouse click, and then do the same with run2. Then, the program should quit. But, when I execute the program, it only waits for one mouse click.
What do I need to do to fix this?
Thanks in advance
I believe this will do it (with comments).
(code is untested)
Basically, there are now 3 loops.
1.) Wait for the button to be pressed.
2.) Wait for the button to be released.
3.) Wait for the button to be pressed again.