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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/11/02 17:13
Read: times


 
#27074 - stack overflow problem
Hi everybody,

I have a stack overflow problem.

I used the search option and didn't find anything relevent.

My code is given below.
the insertion of "mov 81h, #45h" in the "timer" subroutine removes the error in the simulator but causes only "0000" at the output. The output is a multiplexed 7-seg display. As i get "0000" at the output i am sure it is not a "CPU Hang" case.

TH0 EQU 8CH
TL0 EQU 8AH

org 0000h
sjmp init

org 000bh
sjmp timer

org 0035h
init:
setb 0afh
setb 0a9h ; Interrupt enable SFR
setb 0b9h ; Interrupt priority SFR

timer:
clr 8ch
mov TH0, #0fh
mov TL0, #20h
mov 89h, #01h ; set timer0 mode
setb 8ch
mov 81h, #34h ; this seems to solve the problem


display:
mov A, #08h
; more code
sjmp display
end

Can anybody help me?? Thanks in advance.

What is a stack overflow? Does it have anything to do with the push mnemonic?

sushil

List of 6 messages in thread
TopicAuthorDate
stack overflow problem            01/01/70 00:00      
RE: stack overflow problem            01/01/70 00:00      
RE: stack overflow problem            01/01/70 00:00      
RE: stack overflow problem            01/01/70 00:00      
RE: stack overflow problem            01/01/70 00:00      
Thank You!!            01/01/70 00:00      

Back to Subject List