Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!pacbell.com!ucsd!ucbvax!hplabs!hpfcso!rrd From: rrd@hpfcso.HP.COM (Ray Depew) Newsgroups: comp.sys.handhelds Subject: Re: Using CLEAR in progs (Was: Re: new puzzle, new blinky) Message-ID: <7360059@hpfcso.HP.COM> Date: 28 Jan 91 16:10:52 GMT References: <56027@eerie.acsu.Buffalo.EDU> Organization: Hewlett-Packard, Fort Collins, CO, USA Lines: 24 Re: storing the stack and flags before you get carried away > It's simple and it works, and more importantly, you won't lose anything > accidently. Hmm, come to think of it, it would be better to store the > flags and stack in global variables, so an interrupt wouldn't matter. > ---Falco Yes, and storing the information in global variables protects it in case the program is prematurely aborted by the user pressing the ATTN key, or by programmatic (big word!) execution of the KILL command. If you do it right, you can store the flags and stack into a self-executing list that only needs to be EVAL'ed to automatically restore both flags and stack. The synthesis of this self-executing list is left as an exercise for the interested student. While we're on the subject, would everyone agree that writing KILL into a program is also "not nice"? Regards Ray Depew IC's by Bill and Dave rrd@hpfitst1.hp.com