943,965 Members | Top Members by Rank

Ad:
  • Assembly Discussion Thread
  • Marked Solved
  • Views: 5182
  • Assembly RSS
May 8th, 2007
0

How could I break an infinite loop??

Expand Post »
Hi guys again,
If I have an infinite loop for example:

Assembly Syntax (Toggle Plain Text)
  1. MOV CX, 240
  2. MOV DX, 320
  3.  
  4. HERE: MOV AH, 2CH
  5. INT 21H
  6. CMP DH, 1
  7. JE DOT
  8. MOV AX, 0C00H
  9. INT 10H
  10. DOT: MOV AX, 0C04H
  11. INT 10H
  12. JMP HERE

In the example I have an infinite loop. I want to break this, however, I don't want to stop it functionality ( plups every 60 seconds) ...

int 21, ah = 01 will stop the loop untill you press any key.
As I said I don't stop the loop, I wanna keep it working untill someone press ESC for example...

So, if any idea please tell me about it.
Thanks in advance
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
eeeraser is offline Offline
22 posts
since Apr 2007
May 8th, 2007
0

Re: How could I break an infinite loop??

Indispensable reading.
http://www.cs.cmu.edu/afs/cs/user/ra...WWW/files.html

Int 16/AH=01h perhaps.
Team Colleague
Reputation Points: 5862
Solved Threads: 950
Posting Sage
Salem is offline Offline
7,164 posts
since Dec 2005
May 8th, 2007
0

Re: How could I break an infinite loop??

Thanks, it works Int 16, Ah = 01
I have witten this code in my program and it works
Assembly Syntax (Toggle Plain Text)
  1. START: MOV AH,01
  2. INT 16H
  3. CMP AL, 0DH
  4. JNE GOAGAIN
  5. POP AX
  6. MOV AH, 00H
  7. INT 10H
  8. MOV AX, 4C00H
  9. INT 21H
  10.  
  11. GOAGAIN: mov ah,02
  12. INt 1Ah
  13. -
  14. -
  15. -
  16. to the end of the loop and it comes again back to START.

Thanks man alot.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
eeeraser is offline Offline
22 posts
since Apr 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

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: c++/ assembly recursive troubles
Next Thread in Assembly Forum Timeline: want help in mips





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


Follow us on Twitter


© 2011 DaniWeb® LLC