XY position

Reply

Join Date: Feb 2008
Posts: 13
Reputation: heshangho is an unknown quantity at this point 
Solved Threads: 0
heshangho heshangho is offline Offline
Newbie Poster

XY position

 
0
  #1
May 4th, 2009
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.?

  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
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 88
Reputation: Alex_ is an unknown quantity at this point 
Solved Threads: 1
Alex_'s Avatar
Alex_ Alex_ is offline Offline
Junior Poster in Training

Re: XY position

 
0
  #2
May 5th, 2009
I don't know how to work with the cursor but looping looks like this...
  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.
Fundamental law of life:
do{ ThingsToDo+=me.CompleteTask(ThingsToDo); }while(ThingsToDo); Die(me);
Law of the Spirit:
do{ Rebuke(me); }while(!me.Repented); LiveEternal(me);
PM me to know more why i wrote this or what it means.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Assembly Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC