[A83] Re: more push and pop stuff
[Prev][Next][Index][Thread]
[A83] Re: more push and pop stuff
Yes. So don't do that :)
On the 86, there is a rom call to get you out no matter what, called
"_jforcecmdnochar" (not kidding). I don't remember what the 83/83+
equivalent is, but a quick grep of the include file ought to turn up what
you want.
Or, you can do it yourself:
; at the start of the program, save the stack position
ld hl,0
add hl,sp
ld (stacksave),hl
; when you need to bail
stacksave = $+1
ld hl,0
ld sp,hl
ret ; return to TI-OS
> 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?
Follow-Ups:
References: