A83: Question about stack


[Prev][Next][Index][Thread]

A83: Question about stack




Ok, I know how to push and pop stuff to the stack
But what i would like to know, is there a way to access a certain number in 
the stack?
like if i push 5 numbers into the stack
and i want to get number 3 and not pop the other numbers
Is there anyway to do this?
oh and i think that you can use the value sp for the stack ^_^ well i've 
compiled it and not gotten any errors while compileing i don't know about 
other wise though
so could i do somethin like this?:
ld hl,sp
dec hl
ld a,(hl)
to get the number before the stack begins?
i would really appreciate any help ^_^ bye all!