3 ms·
Why is the ret necessary? Is this not an infinite loop?
by saagarjha 8y ago
Why is the ret necessary? Is this not an infinite loop?
- userbinator 8y agoThe loop instruction decrements CX, and then jumps if it is nonzero. Otherwise it "falls through". At that point CX contains the X coordinate of the cursor. Hence the comment: ; allows exit if the mouse is leftmost
- saagarjha 8y agoAh, I had zoomed in to see the code and completely disregarded the comments; in hindsight, I see that was a mistake. Although, I guess I should have guessed that cx could contain 0 in it.