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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/19/99 18:07
Read: times


 
#878 - RE: 8052 program hangs after 150 cycles of loop.
I did not check your code, for I have no time to, but I smell the stack problem. Why? Your code is sometimes unclear (you make many jumps in the subroutines). It is possible that you call the subroutine by the acall or lcall instruction and you return from the subroutine by the jump - ajmp, ljmp. The result is that you have left 2 bytes on the stack and so after 120 retries 240 bytes are pushed on stack (this number is nearby the 8-bit maximum 256), it get's overflown and that's why, your system could freeze. Check your code again regarding this matter and trace the stack pointer if possible. So many push and pop of acc is also better to avoid, for it could happen that sometimes you jump out of the routine thus fortetting to pop from the stack etc, etc.

List of 4 messages in thread
TopicAuthorDate
8052 program hangs after 150 cycles of loop.            01/01/70 00:00      
RE: 8052 program hangs after 150 cycles of loop.            01/01/70 00:00      
RE: 8052 program hangs after 150 cycles of loop.            01/01/70 00:00      
RE: 8052 program hangs after 150 cycles of loop.            01/01/70 00:00      

Back to Subject List