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

Transfering User RPL programs from HP48GX to HP49

108 views
Skip to first unread message

tess...@gmail.com

unread,
Mar 21, 2007, 11:14:00 PM3/21/07
to
I have some programs I wrote on an HP48GX that I'd like to transfer to
an HP49g+; I have ascii and binary (backup object) copies of these
programs on my PC. Is there a way to do this with an SD card? (For
example, is there a translation mode to use for ascii transfer?)

John H Meyers

unread,
Mar 22, 2007, 4:26:43 AM3/22/07
to
On Wed, 21 Mar 2007 22:14:00 -0500:

Either cable or SD card can be used.

With USB cable and "Conn4x" transfer program,
ascii translation occurs automatically,
just as it did for HP48 using Kermit
(or other transfer application, such as Conn4x).

With SD card (or on an emulator),
a small "helper" program in the calc (or emulated calc)
can handle the ascii translation.

Copy only the *ascii* (source) files to your SD card
(the binary files are incompatible between series, and must first
be output from HP48 as ascii instead -- you'll find a program
below to do that as well, either on real HP48 calc or emulator,
in case there are any for which ascii source isn't available).

Before importing ascii UserRPL source files made on HP48
via SD card, these preparations are recommended on HP49/50:

o In the MODE form, set Operating Mode RPN
and check-mark _FM only if "decimal points are commas"

o In MODE FLAGS, check-mark flag -117 ("Soft MENU")

o In the MODE CAS form, check-mark "Approx,"
and always make sure that "~" indicator appears
on top line of HP49/50 display, to confirm "Approximate" mode
(many HP48 programs would work anyway, if interpreted in
"Exact" [=] mode, but some would not, or would run more slowly,
so "better safe than sorry")

Now edit and store at least the 'IN' program (below)
in your HP49/50 HOME directory.

If you like, you may copy all your original source files
in a batch, from your SD card (using the Filer application)
to wherever you want them to end up, which will save
the trouble of using the Filer to recall just one at a time.

To convert each individual source (ascii text) file
to a binary object, recall the source text to the stack,
type IN (the "ascii converter and importer" program name),
then store your (now binary) program back into its variable.

The 'IN' program can be as fancy as a long version which will
automatically process any initial mode-setting header, e.g.

%%HP: T(3)A(D)F(.);

Or it can be a "dumbed down" version which works for most files,
but which is so simple that you'd first need to delete any such
header line from the original text (press cursor-down to edit text,
press "DEL L" editing key to delete line, press ENTER).

You could even start with the "dumb" version,
and then use that to import a "fancy" version,
which you can copy from a URL given below.

This "dumb" text-importer version works on all HP48/49/50 calculators
(I use it in all my *emulators* to directly import ascii source):

\<< \->STR 3 TRANSIO RCLF SIZE 3 < #3016Bh #2F34Dh
IFTE SYSEVAL + STR\-> \>> 'IN' STO

The following corresponding (optional) *output* program
converts recalled binary programs (or data objects)
to ascii-translated text ("translation mode 3")
converting non-ascii characters numbered 128-255
to universally displayable text:

\<< STD 64 STWS \->STR 3 TRANSIO RCLF SIZE 3 <
#2FEC9h #2F34Fh IFTE SYSEVAL \>> 'OUT' STO

Caution:

Programs using SYSEVAL could corrupt or erase calc memory contents
if entered incorrectly; backups are strongly recommended before use.

You can find "fancier" versions of 'IN' and 'OUT'
(optionally offering "header" processing and/or generation,
and "safe" input which won't evaluate anything)
below the sentence containing the word "bug"
(about halfway down, below the unrelated first section) at:
http://groups.google.com/group/comp.sys.hp48/msg/46b8bc3f34d9dfe0?dmode=source

Actually, that's a sort of "kit" from which you can build
"customized" versions with various optional features;
note that some parts have distinct HP48 vs. HP49 series versions.

So now you all know how I used my HP48/49/50 series calcs
to set up my own "Import/Export" business,
using only my SD as my "business card" :)

And retired this "Business Card" (though I still have mine):
http://www.datamath.org/BASIC/LCD_Classic/BusinessCard.htm

[r->] [OFF]

John H Meyers

unread,
Mar 25, 2007, 4:39:58 AM3/25/07
to
Special note on "Quoted-Printable" encoding
and *original* (plain text) format:

On Thu, 22 Mar 2007 03:26:43 -0500, I wrote:

[about importing UserRPL as a text file or string,
in which "Ascii translation" is also needed,
such as when importing the original files using an SD card]

When UserRPL is posted to the newsgroup (or sometimes when mailed),
certain special characters, or even any "equals" symbol,
sometimes triggers transmission in "Quoted-Printable" format,
in which every "equals" may appear to you as "equals3D"
(because the "equals" symbol itself is hex character #3D)

The previously posted 'IN' program (or 'KINV' when used)
can be "beefed up" with an extra "tweak"
to automatically take care of fixing that as well,
by expanding the very first \->STR command to:

\->STR "equals3D" "equals" SREPL DROP

NOTE: when you do this, replace each *word* "equals"
as typed above, by the equals *symbol* instead!

The reason for posting the above "symbolically"
is of course that even in *this* post, every "equals" symbol
might otherwise get yet another "3D" appended to it,
so posting and explaining it in words, like this,
is the only way to escape further confusion.

It's also highly desirable to get as close to the *original*
posted text as possible; on Google Groups, that means
first clicking any "More options" link,
and then clicking on "Show original"

Making sure that you always copy the *original* plain text,
not HTML-formatted, will avoid paragraph reformatting,
unintended special characters, leading whitespace, etc.,
which could otherwise interfere with proper interpretation.

The extra SREPL command above then automatically takes care
of any "Quoted-Printable" mangling that still remains,
and you'll end up with a properly working program,
even when copied from email or from Google.

[r->] [OFF]

0 new messages