Article 1349 of comp.sys.handhelds: Path: en.ecn.purdue.edu!noose.ecn.purdue.edu!samsung!usc!apple!portal!cup.portal.com!Jake-S From: Jake-S@cup.portal.com (Jake G Schwartz) Newsgroups: comp.sys.handhelds Subject: HP48 Pause With Stack Display Message-ID: <34002@cup.portal.com> Date: 18 Sep 90 02:42:19 GMT Organization: The Portal System (TM) Lines: 30 HP48 Pause With Stack Display ----------------------------- After posing the question "How does one pause an HP48 program to show the status of the stack display and resume execution?", nobody could produce a simple answer. However after thinking about the exotic ideas which I had received via Email, a solution was found. The following routine PAUSE halts a running program for a number of seconds specified in stack level 1, shows the stack and then resumes afterwards. The procedure halts the program, sets a control alarm to execute a CONT n seconds after the alarm is set and stops. The alarm then wakes up the program and resumes from there. For instance, the program << 1 2 3 PAUSE 4 5 >> will start up, pause for 3 seconds displaying 1 and 2 on the stack, then resume and end up with 1,2,4 and 5 on the stack. The routine PAUSE is shown below. %%HP: T(3)A(D)F(.); << DATE TIME ROT 10000 / HMS+ { } + + @get date, time+#seconds in stack { \<< DELALARM CONT \>> } + @build control alarm to do a CONT STOALARM DROP HALT @set alarm, drop alarm # and halt \>> Jake Schwartz