Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

UserRPL commands from 49/50 for 48[S/G]

25 views
Skip to first unread message

John H Meyers

unread,
Jun 6, 2007, 6:23:17 AM6/6/07
to
UserRPL programs that are designed for HP49/50 series
might use new stack manipulation and other commands,
which were not defined in the original HP48[S/G] series.

Versions of several newer commands are offered below,
enabling transfer of more unaltered HP49/50 oriented
UserRPL programs to the original HP48[S/G] series
(since they are apparently so popular and long-lived :)

The remainder of this article is transferable as
a UserRPL file (the last optional portion requires Jazz
or other on-board SysRPL compiler)

%%HP: T(3); @ Header for ascii file transfer only

@ Stack commands for HP48[S/G] in UserRPL form:

\<< SWAP DROP \>> 'NIP' STO

\<< DUP DUP \>> 'DUPDUP' STO

\<< ROT ROT \>> 'UNROT' STO

\<< 3 PICK \>> 'PICK3' STO

\<< 0 MAX 0 RND DUP
{ DUP 2 + ROLL DROP ROLLD }
{ DROP2 } IFTE \>> 'UNPICK' STO

\<< 0 MAX 0 RND 2 OVER DUP2 >
{ DROP2 DUP NOT { SWAP DROP } IFT }
{ FOR n DROP DUP n NEXT } IFTE \>> 'NDUPN' STO

@ Other HP49/50 commands suggested for HP48[S/G]

\<< QUOTE \>> 'I\->R' STO

\<< QUOTE STD \>> 'R\->I' STO

@ List <-> Matrix (numeric only) for HP48G[X/+] only
@ (these handle both vectors and matrices)

\<< \>> 'AXM' STO
\<< IF DUP TYPE 5 == THEN L\->M ELSE M\->L END \>>
'AXL' STO

\<< 1 \<< DUP TYPE 5 == { LIST\-> \->ARRY } IFT \>>
DOLIST OBJ\-> ROW\-> \>> 'L\->M' STO

\<< \->ROW \->LIST 1 \<< DUP TYPE 1 > { ARRY\->
EVAL \->LIST } IFT \>> DOLIST \>> 'M\->L' STO

@ Stop here unless Jazz is installed!

@ Stack commands for HP48[S/G] in SysRPL form
@ (assuming Jazz installed):

":: CK2NOLASTWD SWAPDROP ;" ASS 'NIP' STO

":: CK1NOLASTWD DUPDUP ;" ASS 'DUPDUP' STO

":: CK3NOLASTWD UNROT ;" ASS 'UNROT' STO

":: CK3NOLASTWD 3PICK ;" ASS 'PICK3' STO

":: CK2NOLASTWD CKREAL %1+ CKNNOLASTWD #1-
DUP#0=case 2DROP DUP#2+ ROLLDROP UNROLL ;"
ASS 'UNPICK' STO
@ Stack errors return incremented original arg

":: CK2NOLASTWD CKREAL COERCE NDUPN UNCOERCE ;"
ASS 'NDUPN' STO

@ [End]

Mike Bryant

unread,
Jun 6, 2007, 10:48:50 AM6/6/07
to

>
> ":: CK2NOLASTWD SWAPDROP ;" ASS 'NIP' STO
>

That looks like it could hurt... :P

0 new messages