Re: A86: stop
[Prev][Next][Index][Thread]
Re: A86: stop
At 01:40 PM 3/8/97 +0100, you wrote:
>
>Sorry , but I still have questions...
>Is there a routine like "Stop" in basic that stop the program. Because with
>"ret", the program goes to the last label... and that sucks.
>
>Thanx
>
Try this...
define a word variable:
.dw QuitSP
at the very start of your program, (before you push anything) put:
ld (QuitSP),sp
then you can use this routine to quit
Stop:
ld sp,(QuitSP)
ret
There's probably a ROM call to do it, but this should work.
--Joshua
References: