From helens!shelby!rutgers!orstcs!jacobs.CS.ORST.EDU!smithj Mon May 14 13:16:39 PDT 1990 Status: RO Article 1621 of comp.sys.handhelds: Path: helens!shelby!rutgers!orstcs!jacobs.CS.ORST.EDU!smithj >From: smithj@jacobs.CS.ORST.EDU (Jeremy Smith) Newsgroups: comp.sys.handhelds Subject: Byeeeeeeeeeeeee..........(HP 48 BYE program) Keywords: hp 48sx hp48sx bye optomize program Message-ID: <18227@orstcs.CS.ORST.EDU> Date: 14 May 90 18:34:14 GMT Sender: usenet@orstcs.CS.ORST.EDU Organization: Oregon State University - CS - Corvallis Lines: 46 This program, called BYE, is run just before I turn the calculator off. Its purpose is to clean up as much junk (internal and external) as possible, when you are not using the calculator (usually the case if you're just switching the machine off), so that it's rearing to go when switched on again. I would welcome any additions to its functionality. I have assigned BYE to the off key (and leave USER mode on); when the machine is switched off the current version takes about a second to run. From the beeps I can tell it doesn't even make it into the case before it's done running and the machine is actually off. I would expect future, more comprehensive, versions to take considerably longer. Checksum: # 55900d Bytes: 84.5 %%HP: T(3)A(D)F(.); \<< 3040 .01 BEEP @ start of program CLOSEIO @ conserve power RCLKEYS 0 DELKEYS STOKEYS @ optimize memory used by key assignments MEM CLEAR @ invoke garbage collection, and clear stack 1520 .01 BEEP @ end of program OFF @ turn calculator off \>> Program notes: 1. I don't know if garbage collection is better done after the stack is clear, in which case MEM CLEAR should be replaced by CLEAR MEM DROP. 2. A lot of programs create variables which could be cleaned out after a session. For instance, plot creates PPAR EQ and whatever the independant variable is (usually X), and using I/O creates IOPAR. BYE could traverse the directory tree seeking out and destroying all occurrences of such variables. It would assume that if you were interested in keeping any of them you would have consciously done so under alternative names. #INCLUDE #INCLUDE #INCLUDE #INCLUDE