From: jhmeyers@miu.edu (John H Meyers)
Subject: N-level stack display/review
Date: 25 Nov 1996 00:00:00 GMT
Message-ID: <57ccun$57s@news.iastate.edu>
organization: MIU Computer Services,  Fairfield, IA 52557.  Not Approved.
reply-to: jhmeyers@miu.edu
newsgroups: comp.sys.hp48


Why should I have to settle for displaying only seven levels of my stack?

Here's an unlimited-level displayer which starts at the top and works its
way down to level 1, pausing after each screenful (hit a key to resume).

It does not have the old bugs of ALTD, where the clock appears along with
level six when the stack has exactly six items, nor where the stack level
displays in the same number format as other values (e.g. with 11 FIX).

It does display only one line per stack level, just like the original.

Only supported entry points are used; backup your memory in case of any
error in transferring (or typing) the programs; verify checksums, please!

-----------------------------------------------------------
With best wishes from:  John H Meyers  ( jhmeyers@mum.edu )
-----------------------------------------------------------

%%HP: T(3)A(D)F(.); @ \-> is right-arrow, etc.
DIR @ Download as one directory, or type in as separate programs:
  @ All programs may be moved to HOME for general use:
  SS @ Unlimited-level, top-down stack display, S/SX/G/GX
    \<< { DEPTH { STD 64 STWS CLLCD DEPTH 1
      FOR i i PICK #40ADh SYSEVAL #1795Ah SYSEVAL #15978h SYSEVAL
      i ": " + SWAP + i NEG 7 MOD 1 + SWAP OVER 3 FREEZE #18CEAh SYSEVAL
      #12429h SYSEVAL 7 == { WAIT0 DROP CLLCD } IFT -1 STEP } IFT } EEVAL \>>
      @ SS is 230 bytes (on stack), #7F88h checksum
      @ Save 65 bytes by using Joe Horn's PACK from Goodies Disk #2
  @ The following general programs have many other uses, and are used by SS:
  EEVAL @ Evaluate, trap errors, restore things
    \<< QUOTE DEPTH RCLF PATH \-> d. f. p.
      \<< IFERR EVAL THEN 1 ELSE 0 END f. STOF p. EVAL CLOSEIO
      { DEPTH d. - 1 + DROPN ERRN DOERR } IFT \>> \>>
  WAIT0 @ Use me just like 0 WAIT, but I recognize OFF and just turn off
    \<< 0 DO DROP { 0 WAIT } EEVAL DUP UNTIL { 1 { OFF 0 } { OFF 0 } }
        { 91.3 91.6 } ROT POS 1 + GET EVAL END \>>
END @ Directory is 484.5 bytes, #D3FCh checksum
