[comp.sys.handhelds] HP-28S Lockup - was Re:

louxj@nyssa.CS.ORST.EDU (John W. Loux) (03/14/90)

In article <9003081508.AA03715@GANDALF.LL.MIT.EDU> yasu@GANDALF.LL.MIT.EDU (Alan Yasutovich) writes:
>
>>From: yasu@GANDALF.LL.MIT.EDU (Alan Yasutovich)
>>
>>	Guess what!  Never run a program that uses variables that you
>>	forgot to define!
>>			/.......BYE BYE!!!!!!!!!!!
>
>
>		Just for laughs, the program was
>	ATOP DUP
>	TEMP +
>	'ATOP' STO
>	'ATOP1' STO
>	WHILE ATOP ATOP1 >
>	REPEAT

>	
>	"ATOP" and "AREC" were not defined.  Who knows what happened?
>	The HP28s flew south into "non-interruptable mode".
>
>				  Alan

I'm sorry, in my previous evaluation of this problem, I assumed that
evaluating ATOP when it contained 'ATOP+TEMP' would cause the 28 to recurse.
Of course, this is not the case.  Evaluating ATOP leaves 'ATOP+TEMP' on the
stack and causes the WHILE clause to die with a Bad Argument Type error.

I could only get the recursion to occur when TEMP evaluated to 0 (zero).  When
this is the case, ATOP TEMP + is actually 'ATOP' 0 +, which yields 'ATOP'.  If
this is not the case, then I am at a loss to help you.

By the way, when you get this recursive situation, press [ON][/\] (where [/\]
is the triangle-up key, third from the left of the menu keys) simultaneously.
This performs a machine-level interrupt and halts the recursion.  It is also
documented in the reference manual(?) somewhere.

John W. Loux
Solve and Integrate Corp.
solvint!john@CS.ORST.EDU