[A83] Re: more push and pop stuff


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

[A83] Re: more push and pop stuff




Just save the stack state at the beginning of your program and restore it when 
exiting:

start:
 ld (stack),sp

...

_quit:
 ld sp,(stack)
 ret

stack: .dw $0000



22/08/01 12:45:00, "Jimmy Pardey" <j_pardey@hotmail.com> wrote:

>
>
>I would expect a _quit romcall or something, because if I push without 
>poping back the same number of time I pushed and try to return to the the 
>shell, something will (65534 out of 65535 times (memory adresses, I might 
>just hit the quit adress)) get messed up, or wouldn't it?
>
>Jimmy Pardey
>
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>
>
>
>