943,563 Members | Top Members by Rank

Ad:
  • Assembly Discussion Thread
  • Unsolved
  • Views: 430
  • Assembly RSS
May 4th, 2009
0

XY position

Expand Post »
Hi guys,

I am trying set cursor postion in the screen and print a value.But this loop gives me a unlimited loop..can anyone help me to figure out whats wrng.?

Assembly Syntax (Toggle Plain Text)
  1. mov ecx,5
  2. L1:
  3.  
  4. mov XYPos.X, eax
  5. mov XYPos.Y, ebx
  6. INVOKE GetStdHandle, STD_OUTPUT_HANDLE
  7. mov consoleHandle, eax
  8.  
  9. INVOKE SetConsoleCursorPosition, ConsoleHandle, XYPos
  10.  
  11. mov eax, 3
  12. Call WriteDec
  13.  
  14. inc ebx
  15. add edx, 3
  16. loop l1
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
heshangho is offline Offline
13 posts
since Feb 2008
May 5th, 2009
0

Re: XY position

I don't know how to work with the cursor but looping looks like this...
Assembly Syntax (Toggle Plain Text)
  1. cmp ax,bx ; compares the values
  2. jng L1 ; jumps to L1 if ax is not greater (jng=Jump if Not Greater)
Last edited by Alex_; May 5th, 2009 at 4:29 am.
Reputation Points: 10
Solved Threads: 3
Junior Poster
Alex_ is offline Offline
175 posts
since Jun 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Assembly Forum Timeline: 16-2- 32
Next Thread in Assembly Forum Timeline: cipher text idea ?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC