Stand-alone FULL-screen CHOOSE for any calculator:
HP49G, HP49G+, HP48Gii, ???
CHOOSF.49 Uses current font, or minifont with flag -90
(99 bytes)
HP48G, HP48GX, HP48G+
CHOOSF.48 Uses 5x7 [medium] font, like regular CHOOSE
CHOOSM.48 Uses small font - all caps, variable width
(CHOOSF is 99 bytes, CHOOSM is 188 bytes)
Usage:
o Store in HOME as 'CHOOSF' or 'CHOOSM'
o Edit UserRPL programs
to change CHOOSE to CHOOSF or CHOOSM
o Works the same as built-in CHOOSE.
Extra functionality:
o Accepts zero as initial item#
(for scrolling viewer, rather than chooser)
just like original HP48 built-in CHOOSE
o Accepts an empty list
(always returns zero in these cases,
indicating that nothing was chosen).
A WinZip-decodable file containing all binaries
will be found at the end of this post.
Calc-decodable binaries
(rename on calc to CHOOSF or CHOOSM):
@ CHOOSF.49 (including 48Gii)
"D9D201A262823621192015300D9D2079"
"E60D9D20F53339394378E7298253B213" +
"0A324379E6029E203B016075243A7263" +
"182431F2621155329E203B000031A437" +
"39F2D9D200915329A43A7263B11334EC" +
"301AA4329E200B0B90B2130C49F2B213" +
"0B2130" + DUP BYTES DROP #4DDh ==
{ #100001h LIBEVAL } IFT 'CHOOSF.49' STO
@ CHOOSF.48 (*not* 48Gii)
"D9D2086A812BF811192015300D9D2079"
"E60D9D202BB463D816DEBB0C0126B213
0BBF0679E6029E203B04608DF0613236" +
"20016AEC81AB42629E203B0000DA9164
B2A2D9D2011226C2A1613236300404EC" +
"30B3A1629E200B0990B21309C2A2B213
0B21304FC4" + ASC\-> 'CHOOSF.48' STO
@ CHOOSM.48 (*not* 48Gii)
"D9D2086A812BF811192015300D9D2079"
"E60D9D20E3C463D816D9D2029E203B0F
3029E203B046008F11C7416C8416F851" +
"11BF264CA366E7F4BBF06CAF06976111
8A30B213049B463D816D9D205304029E" +
"203B0650CB916E0E3018A30B2130E9B4
63D816D9D205304018A30B21302BB463" +
"D816DEBB0C0126B2130BBF0679E6029E
203B04608DF061323620016AEC81AB42" +
"629E203B0000DA9164B2A2D9D2011226
C2A1613236300404EC30B3A1629E200B" +
"0990B21309C2A2B2130B2130EB56" +
ASC\-> 'CHOOSM.48' STO
Source:
"
( 49 series full-screen CHOOSF.49 )
( Uses current font, or minifont with flag -90 )
( CRC: #EF97h Bytes: 99 )
:: CK3NOLASTWD CK&DISPATCH1 # 351
::
' :: SIXTY #=casedrop TrueTrue DROPFALSE ;
4ROLL ' ROMPTR B3 61
5ROLL DUPLENCOMP 6ROLL COERCE #MIN
ROMPTR B3 0 NOTcase %0
:: DUPTYPELIST? NOT?SEMI
DUPLENCOMP TWO #< ?SEMI
ROMPTR B0 9B ; %1
;
;
" 'CHOOSF.49s' STO
"
( 48G[X][+] full-screen CHOOSF.48 )
( Uses 5x7 [medium] font )
( CRC: #4CF4h Bytes: 99 )
:: CK3NOLASTWD CK&DISPATCH1 # 351
::
' :: SIXTY #=casedrop TrueTrue DROPFALSE ;
4ROLL ' ROMPTR B3 64
5ROLL DUPLENCOMP 6ROLL COERCE #MIN
ROMPTR B3 0 NOTcase %0
:: DUPTYPELIST? NOT?SEMI
DUPLENCOMP TWO #< ?SEMI
ROMPTR B0 99 ; %1
;
;
" 'CHOOSF.48s' STO
"
( 48G[X][+] full-screen CHOOSM.48 )
( Uses small font - all caps, variable width )
( CRC: #65BEh Bytes: 188 )
:: CK3NOLASTWD CK&DISPATCH1 # 351
::
' ::
EIGHTYONE #=casedrop
:: ROMPTR B3 3F ROMPTR B3 64 $>grob
7GETLAM 8GETLAM MAKEGROB DUPROT ONEONE
CKGROBFITS 4ROLL UNROT GROB! TRUE ;
FIFTYSEVEN #=casedrop
:: SEVEN ROMPTR B3 56 IT #1- TRUE ;
FIFTYEIGHT #=casedrop :: SEVEN TRUE ;
SIXTY #=casedrop TrueTrue DROPFALSE
;
4ROLL ' ROMPTR B3 64
5ROLL DUPLENCOMP 6ROLL COERCE #MIN
ROMPTR B3 0 NOTcase %0
:: DUPTYPELIST? NOT?SEMI
DUPLENCOMP TWO #< ?SEMI
ROMPTR B0 99 ; %1
;
;
" 'CHOOSM.48s' STO
@ Test return values:
\<< CLEAR "Title"
{ {} { A } { Bee B } { Cee C X } D }
9 CHOOSF \>> 'P1' STO
@ Correct results: {}, {A}, B, C, D
@ Heavy exerciser (vary title and list lengths)
\<< CLEAR RAND 0 RND "Choose" "" IFTE
"----+----1----+----2----+----3----+" @ long
1 12 START RAND 100 * NEXT 13 \->LIST
1 13 RAND * CEIL SUB DUP 1 GET +
1 CHOOSF \>> 'P2' STO
@ End
All binaries in one zip file:
o Paste the entire remaining text (no line wrapping)
into a plain text file named CHOOSF.MIM
(E.g. use Notepad and save in ANSI encoding)
o Open saved file using WinZip
(answer "yes" or open the enclosed zip file)
o Test CRCs (Actions > Test)
o Extract desired file(s)
[drag and drop from Zip window to desktop or folder]
Copy all text below:
--boundary--
Content-Type: application/zip; name="CHOOSF.zip";
Content-Transfer-Encoding: base64
UEsDBBQAAgAIAE6bdjSBEW8OuQAAAMQAAAAJAAAAQ0hPT1NNLjQ48wjwCDCx0A2fq9uwTGJTv+BE
pkDmCzeZpucBCTsfs97EuboKL5k2f2CepGfAncLwQ7BG5JhHYr+o4O+kI1Zpdf67+Y/9SqgUE1zB
rG3osDPlssS1m0ymDiAtCax7JJ89YG602iDEPM8bbFIAMwuYuwnEfbv7gECStuGG3wnT80DqHdhu
8IspJzMJLDsnsUtFDSjCwLBW0k1ba66ugGKSjhRQjtnB4RyztRRQbsMETm3DCTpaQP1CzABQSwME
CgACAAAAL5t2NECFXJ1rAAAAawAAAAkAAABDSE9PU0YuNDlIUEhQNDktV50tEComKGMSkQJRA9DZ
Apdu0NkCXzOTkzSHfpIoNSsxoCM0l24g6QKzEAZXQqMnNoFCEy8mEVUj6QKzAAATSnOTL50tABk1
kkqjJzYbMUPOA6FKI+kCsLAJKzHAlC8rMbASA1BLAwQUAAIACABEm3Y0PAKnLWoAAABrAAAACQAA
AENIT09TRi40OPMI8AgwsdANn6vbsExiU7/gRKZA5gs3mabnAYlN3ma9iW93HxBI0jbc8Dthep7C
S6bNDmw3+MWUk5kElp2T2KWiBhRhYFgr6aatNVdXQDFJRwoox+zgcI7ZWgoot2ECp7bhBB0toH4h
ZgBQSwECFAAUAAIACABOm3Y0gRFvDrkAAADEAAAACQAAAAAAAAAAACEAAAAAAAAAQ0hPT1NNLjQ4
UEsBAhQACgACAAAAL5t2NECFXJ1rAAAAawAAAAkAAAAAAAAAAAAhAAAA4AAAAENIT09TRi40OVBL
AQIUABQAAgAIAESbdjQ8AqctagAAAGsAAAAJAAAAAAAAAAAAIQAAAHIBAABDSE9PU0YuNDhQSwUG
AAAAAAMAAwClAAAAAwIAAAAA
--boundary--
[r->] [OFF]
> I want the 39-series two level CHOOSE
You can nest one CHOOSE after another
(for as many levels as you want, not just two).
Or wait for Raymond to post one for 48/49.
Or find Ted W. Beers and ask him to do it :)
http://groups.google.com/group/comp.sys.hp48/msg/98e78e633037d7c3
[r->] [OFF]
ok, but they don't show on the screen
> Or wait for Raymond to post one for 48/49.
I'll wait 4 Rainman...
> Or find Ted W. Beers and ask him to do it :)
> http://groups.google.com/group/comp.sys.hp48/msg/98e78e633037d7c3
Thank you 4 Ur contribution!
Mike...er..John
> Want to see more of what you are choosing?
> Want to see more items at a time?
>
> Stand-alone FULL-screen CHOOSE for any calculator:
>
Not exactly: didn't you forget HP48SX? ;) BTW are there libraries for
this model that implement CHOOSE, INFORM and MSGBOX?
> Didn't you forget HP48SX?
No, HP48S[X] does not contain the internal library
necessary for support of a 99-byte full-screen CHOOSE program :(
You may notice that these 48 and 49 series CHOOSF programs
are actually identical (on source level),
except that various internal library function numbers
changed between these series, just as did various ROM addresses.
> Are there libraries for HP48S[X]
> that implement CHOOSE, INFORM and MSGBOX?
If so, they might be somewhat larger than 99 bytes :)
I found no results here:
http://www.hpcalc.org/search.php?query=msgbox&hp48=1
I still have an HP48G [32K],
and I also like to have some "library-free" software in HOME,
so that a restored HOME backup takes care of everything I use.
One could, of course, make a library out of this 99-byte program,
but it hardly seems worth doing -- just adds more maintenance
(including calc backup/restore and new calc setup),
and any library would have some added overhead
(structure info and a config program,
plus taking a little extra RAM while attached).
[r->] [OFF]
> are there libraries for HP48S[X]
> that implement CHOOSE, INFORM and MSGBOX?
Found this:
"Replacement CHOOSE and message box routines
that one can use in both the [HP48] S and G series"
By Raymond Del Tondo (Library size: 4484 bytes)
http://www.hpcalc.org/details.php?id=1862
http://www.hpcalc.org/hp48/programming/misc/chumbox.zip
(much more efficient than 48G built-ins,
but also more than 99 bytes :)
The 49G series built-in CHOOSE is also much more efficient than
the 48G version (or the full-screen 49G version just offered),
but AFAIAA it can not be adapted to work in full-screen mode
(it might be very useful for it to be thus enhanced :)
[r->] [OFF]
the Master-Detail CHOOSE engine for the HP-48G series is ready:-)
And it allows for an unlimited nesting depth,
unlike the HP-38G version, which only allowed one level.
Actually it's my modified CHOOSE engine for the HP-48G series,
expanded with the Master-Detail features,
and optimized for speed and size.
There's a user front-end for M-D relations included.
I'll put in to hpcalc soon.
Regards
Raymond
"John H Meyers" <jhme...@miu.edu> schrieb im Newsbeitrag
news:op.s6uy6...@news.cis.dfn.de...
> I want the 39-series two level CHOOSE
Below is a simplified program for all HP48G/49G/???
which implements a multi-level (unlimited) CHOOSE
using the built-in CHOOSE,
by recursively calling itself
whenever any selection returns a list.
A sample program is also included, to illustrate
(showing that you can even have a differing number
of levels in different "branches," if you like).
You could even add some fancy touches to this;
for example, at the expense of a bit more complexity,
whenever you need to invoke a lower-level CHOOSE,
you could give it the title of the most recently chosen item,
and/or if canceled you could re-highlight the choice just made,
but in most cases you will not be "backing out" anyway,
so why even bother?
You may of course also use any full-screen CHOOSE with this,
like the (now built back in) original HP48 Equation Library, E.g.
http://groups.google.com/group/comp.sys.hp48/msg/8888908f27145901?dmode=source
\<< DROP DO DUP2 1. CHOOSE {
DUP TYPE 5. ==
{ 3. PICK SWAP 1. MCHOOS @ must be its own name
{ ROT ROT DROP2 1. 1. } 0. IFTE
} { ROT ROT DROP2 1. 1. } IFTE
} { DROP2 0. 1. } IFTE
UNTIL END \>> 'MCHOOS' STO @ must be same as above
\<< "Sample"
{ { TopMenu1 { { MidMenu { 55 66 } } 44 } }
{ TopMenu2 { 22 33 } }
11 } 1 MCHOOS \>> 'TestMe' STO
There are other circumstances where we would rather
not have to create an entire static menu up front; for example,
in a "user equation library" application having a sub-directory tree,
we might simply repeat CHOOSE whenever a selection is a directory,
showing new selections for the chosen sub-directory,
and use the sub-directory name as the new title;
we could back out one directory level at a time on Cancel
until reaching the top level, which could instead exit, E.g.:
http://groups.google.com/group/comp.sys.hp48/msg/e02f22a27269ca7f?dmode=source
[r->] [OFF]
%%HP: T(3)F(.); \<< @ Header for file transfer only
@ Multi-level CHOOSE program:
\<< DROP DO DUP2 1. CHOOSE {
DUP TYPE 5. ==
{ 3. PICK SWAP 1. MCHOOS @ must be its own name
{ ROT ROT DROP2 1. 1. } 0. IFTE
} { ROT ROT DROP2 1. 1. } IFTE
} { DROP2 0. 1. } IFTE
UNTIL END \>> 'MCHOOS' STO @ must be same name as above
@ Example of use:
\<< "Functions" {
{ "\|>TRIG"
{ { "\|>HYP" { SINH COSH TANH ASINH ACOSH ATANH } }
SIN COS TAN ASIN ACOS ATAN } }
{ "\|>EXPLN" { ALOG LOG EXP LN EXPM LNP1 } }
{ "\|>BASE" { HEX DEC OCT BIN R\->B B\->R } }
} 1. MCHOOS \>> 'TestM' STO
@ Principle:
@ Same arguments (and return values) as CHOOSE.
@ MCHOOS repeats itself if a selection returns another list,
@ returns a final selection if not a list,
@ or returns to the previous level if canceled.
@ End