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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/16/02 04:59
Read: times


 
#23016 - depth of push and pop
I have some doubt about "push" and "pop" depth.

my program was supposed to get a string in XDATA and show it in a display, but the display routines also used DPTR, so I did something like:

mov dptr, #stringpush dpl
push dph
call display_main_routine
push dpl
push dph
call display_subroutine
push dpl
push dph
mov dptr, #foo
;execute suboroutine
pop dpl
pop dph
pop dpl
pop dph
pop dpl
pop dph

it wasn't working, looking the code under RIDE51 simulator I observed that the last pop's weren't returning the value that I stored.

I solved that problem storing the value of DPTR in the XDATA area, but what I really want to know is if there is some "depth" when push'ing a register (a depth of two push'es, from my observations)
I couldn't find a limit to use with push in my books, but most of the examples needed only one, at most two push'es, so I'm asking for some clarification.

TIA

orlando


List of 10 messages in thread
TopicAuthorDate
depth of push and pop            01/01/70 00:00      
RE: depth of push and pop            01/01/70 00:00      
RE: depth of push and pop            01/01/70 00:00      
RE: depth of push and pop            01/01/70 00:00      
RE: depth of push and pop Rob            01/01/70 00:00      
RE: depth of push and pop, a method            01/01/70 00:00      
RE: depth of push.:to jose,john,rob,erik            01/01/70 00:00      
RE: depth of push.:to jose,john,rob,erik            01/01/70 00:00      
RE: depth of push and pop            01/01/70 00:00      
RE: depth of push and pop, to erik, lawr            01/01/70 00:00      

Back to Subject List