Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/07/04 10:43
Read: times


 
#75595 - RE: Program keeps looping itself ,Why?
Responding to: ???'s previous message
If I am right it keeps executing NOP until it runs out of memory and then again executes MAIN routine , is it?

I just put the routine at end of my program.
modified code and it seems it has solved my problem.

Can you please explain me the Blunder
$mod51

;**O/P
S1 EQU P3.0
S2 EQU P3.1
;*****Delay routine delaration*****
VAR1 EQU R0
VAR2 EQU R1
VAR3 EQU R2

;*************************************************

ORG 0000H
SJMP MAIN
MAIN:
CLR S1
CALL DELAY
SETB S1
CALL DELAY
CLR S1

ORG 200H
;****1Sec Delay routine****************
DELAY:
MOV VAR3,#8
MOV VAR2,#8
MOV VAR1,#236
TT1:
DJNZ VAR1,TT1
DJNZ VAR2,TT1
DJNZ VAR3,TT1
RET
;****End of Delay routine ****************

END

List of 12 messages in thread
TopicAuthorDate
Program keeps looping itself ,Why?            01/01/70 00:00      
   RE: Program keeps looping itself ,Why?            01/01/70 00:00      
      RE: Program keeps looping itself ,Why?            01/01/70 00:00      
         RE: Program keeps looping itself ,Why?            01/01/70 00:00      
            RE: Program keeps looping itself ,Why?            01/01/70 00:00      
               RE: Program keeps looping itself ,Why?            01/01/70 00:00      
                  RE: Program keeps looping itself ,Why?            01/01/70 00:00      
         RE: Program keeps looping itself ,Why?            01/01/70 00:00      
   RE: Program keeps looping itself ,Why?            01/01/70 00:00      
   RE: Program keeps looping itself ,Why?            01/01/70 00:00      
   RE: Program keeps looping itself ,Why?            01/01/70 00:00      
      My mistake            01/01/70 00:00      

Back to Subject List