[A83] Re: Stack Problems
[Prev][Next][Index][Thread]
[A83] Re: Stack Problems
well, do you call "down" or jump to down?
if you call it, you must put a "ret" at the end,
if you jump to it, you must jump to somewhere else (most likely your main
key-press loop)
the way it is now (at least the part you've put in your mail), at the end of
the part, it hapily continues with whatever is down there.
(if you called it, there is indeed a stack problem... the call placed the
return address on the stack, and you didn't pop it out by using
ret, so the stack has a "lost" number on it....
--Peter Martijn
Steve Watson wrote:
> Can anyone tell me what's wrong in this label? I'm very sure it's with the
> stack (I am trying to make a test program that when you press up or down an
> arrow moves up and down):
>
> down:
> push a
> ld a,l
> cp 12
> jp z,getcsc
> pop a
> ld ix,spriteblank
> sub 7
> ld ix,sprite
>
> a=X coordinate
> l=Y coordinate
>
> I also want to know how to set the Xmin, Xmax, Ymin, and Ymax from an Ion
> program, unless it's already this:
> 0-Xmin
> 0-Ymin
> 94-Xmax
> 62-Ymax
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com
References: