From helens!shelby!rutgers!njin!princeton!notecnirp!mg Sun May 13 15:25:57 PDT 1990 Status: RO Article 1614 of comp.sys.handhelds: Path: helens!shelby!rutgers!njin!princeton!notecnirp!mg >From: mg@notecnirp.Princeton.EDU (Michael Golan) Newsgroups: comp.sys.handhelds Subject: HP48SX 10 stack levels viewer Message-ID: <26913@princeton.Princeton.EDU> Date: 13 May 90 05:55:37 GMT Sender: news@princeton.Princeton.EDU Reply-To: mg@princeton.Princeton.EDU (Michael Golan) Organization: Dept. of Computer Science, Princeton University Lines: 43 The following program let you view 10 levels of your stack. It is written for speed, so it does not right align. I am not sure this is even good, as the font is really small. You must have at least one item on the stack. Running this program erases the current PICT. Press "ON" to return to the normal stack. You can see the output again by pressing the left-cursor (graph) key. VSTK: #4475d 119.5 %%HP: T(3)A(D)F(.); @ @ VSTK - View stack (10 lines). Written by Michael Golan, version 1.0 5/1/90 @ input: non empty stack. (unmodifed by command) @ @ Output: display PICT with 10 levels of the stack. Press ON to return to @ stack (text) mode @ @ Algorithm comments: @ destroy current PICT. Left justify stack values, because of speed. @ uses small font, so 'a' and 'A' looks the same. @ ->GROB on strings remove "", but if you tag it 1st, it works fine @ @ BYTES: #4475d 119.5 \<< ERASE @ erase current PICT DEPTH 10 MIN @ find no. of levels to display 1 SWAP FOR L L PICK @ get stack level L L \->TAG @ tag it with stack level 1 \->GROB @ make a graphic of it PICT # 0d 10.3 L - 6 * R\->B @ Y coordinate: (10-L)*6-2 2 \->LIST ROT @ get coordinates into REPL format REPL @ put in PICT NEXT { } PVIEW @ display it till 'ON' pressed \>> Enjoy Michael Golan mg@princeton.edu