Re: A83:'ret'


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

Re: A83:'ret'




I still don't see it as being useful, unless the key is an ON combination
that is being checked in an interrupt routine (but why?).  Either way, you
have to check for the key, and it's going to be done in your key loop.  I
see it being useful for a type of program with a lot of submenus, like an
RPG.  When I think of things I always think of an action type game that only
has one main loop.  Good point, though, I never thought about that.  But I
still stand by the main point of my original message: if you are not popping
everything you push, and not returning when you call, your code is most
likely improper and buggy :)

> On the other hand, it's possible that you could have perfectly bug-free
code
> and still want to save/restore the stack pointer.  A oft-used example is a
> "boss-key".  If you want a certain key to be able to exit instantaneously
> from any point in the program, it's a whole lot easier just to restore the
> stack and quit than to bother with making sure that you're not in the
middle
> of any calls or have any registers pushed.





References: