User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Assembly section within the Software Development category of DaniWeb, a massive community of 426,136 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,743 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Assembly advertiser: Programming Forums
Views: 1634 | Replies: 2 | Solved
Reply
Join Date: Apr 2007
Posts: 16
Reputation: eeeraser is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
eeeraser eeeraser is offline Offline
Newbie Poster

Help How could I break an infinite loop??

  #1  
May 8th, 2007
Hi guys again,
If I have an infinite loop for example:

           MOV CX, 240
           MOV DX, 320
 
HERE:  MOV AH, 2CH
           INT 21H
           CMP DH, 1
           JE DOT
           MOV AX, 0C00H
           INT 10H
DOT:    MOV AX, 0C04H
            INT 10H
            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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2005
Posts: 3,638
Reputation: Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of 
Rep Power: 22
Solved Threads: 417
Colleague
Salem's Avatar
Salem Salem is offline Offline
void main'ers are DOOMed

Re: How could I break an infinite loop??

  #2  
May 8th, 2007
Indispensable reading.
http://www.cs.cmu.edu/afs/cs/user/ra...WWW/files.html

Int 16/AH=01h perhaps.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
Do not PM me for help; You'll be ignored, or told to learn to read.
Do not ask me if I'm muslim - I'm not. Nor do I care about yours or anyone else's mysticism. Religion is a matrix, take the RED PILL.
Reply With Quote  
Join Date: Apr 2007
Posts: 16
Reputation: eeeraser is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
eeeraser eeeraser is offline Offline
Newbie Poster

Re: How could I break an infinite loop??

  #3  
May 8th, 2007
Thanks, it works Int 16, Ah = 01
I have witten this code in my program and it works
START:  MOV AH,01
 INT 16H
 CMP AL, 0DH
 JNE GOAGAIN
 POP AX
 MOV AH, 00H
 INT 10H
 MOV AX, 4C00H
 INT 21H
 
GOAGAIN: mov ah,02
              INt 1Ah
                 -
                 -
                 -
to the end of the loop and it comes again back to START.

Thanks man alot.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Assembly Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Assembly Forum

All times are GMT -4. The time now is 4:43 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC