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

Tip for HPUserEdit users

120 views
Skip to first unread message

Wes

unread,
Feb 25, 2006, 10:53:23 AM2/25/06
to
I discovered something today that may be useful to others.

I regularly use HPUserEdit 4. I have found it to be a great, simple
environment to use for writing and documenting programs.

The program interfaces with EMU48 for the HP48/49, but not the 49G+. I
copied the EMU48.DLL from debug4x and it works almost perfectly with
the emulated 49G+.

The only glitch is that when copying your program to the emulator,
HPUserEdit pushes a string containing your program followed by a
command.

"<< your program here >>" STR->

It then "presses" the EVAL button to execute the STR-> command which
compiles the program. Or at least it tries to. It works when using the
HP48 setting, but when using the HP49 setting (or HP49G+ in my case),
it seems to "press" the Left-Arrow key instead which simply pulls up
the graphics screen.

I usually just hit CANCEL, then EVAL, and the program is now on the
stack. I then store it and proceed to test it.

It occured to me today that I could use KeyMan (installed on Port 1 of
course) to assign EVAL to the Left-Arrow so that the program gets
compiled automatically as it's supposed to. In order to allow me to
use the Left-Arrow as normal when editing, I used the KeyMan IfE?P
command with

2: << -62. CF 34.1 KEYEVAL -62. SF >>
1: EVAL

on the stack. I then use the ->TO? takeover command and assign the
result to the Left-Arrow. Works like a charm.


I then had a second brain surge and realized that the HPUserEdit
environment could be used to automatically store the compiled program
to a variable name simply by adding a STO command after the program.
For example, in the HPUserEdit editor, type

<< 3. * >>

'TRIPLE' STO

and then send this to the emulator. It creates the following:

"<< 3. * >> 'TRIPLE' STO" STR->

which when evaluated compiles and stores your program.

But wait, there's more. You can also put more than one program in a
single HPUserEdit file. If you type

<< 2. * >>
<< 3. * >>
<< 4. * >>

and send it to the emulator, it will push all three programs onto the
stack.

And finally, you can even do the following

<< 2. * >>
'DOUBLE' STO

<< 3. * >>
'TRIPLE' STO

<< 4. * >>
'QUADRUPLE' STO


Perhaps this was all obvious, but it took me about a year of using
HPUserEdit for this to dawn upon me. (Perhaps this is all in the
spanish help file.)

Enjoy,
-Wes Loewer

John H Meyers

unread,
Feb 25, 2006, 5:56:30 PM2/25/06
to
On Sat, 25 Feb 2006 09:53:23:

> And finally, you can even do the following
>
> \<< 2. * \>>
> 'DOUBLE' STO
>
> \<< 3. * \>>
> 'TRIPLE' STO
>
> \<< 4. * \>>
> 'QUADRUPLE' STO

This is the style of all my posted programming as well
(plus all that I develop for myself, which I compose
using my email program as text editor, and then
mail to my off-site addresses as backup).

To copy it to my emulator, I just copy the posted text,
"Paste string/stack" to the emulator,
and then type the command name IN on the emulator,
to invoke one of these simplified input programs:

@ HP49 series version:
\<< 3 TRANSIO \->STR #2F34Dh SYSEVAL + STR\-> \>> 'IN' STO

@ HP48S[X]/48G[X][+] version:
\<< 3 TRANSIO \->STR #3016Bh SYSEVAL + STR\-> \>> 'IN' STO

Correspondingly, the OUT program makes postable ascii text
from a stack object (which could include a whole bunch of
individual objects, collected together into a single list),
then you can "Copy string/stack" from the emulator:

@ HP49 series version:
\<< 3 TRANSIO STD 64 STWS \->STR #2F34Fh SYSEVAL \>> 'OUT' STO

@ HP48S[X]/48G[X][+] version:
\<< 3 TRANSIO STD 64 STWS \->STR #2FEC9h SYSEVAL \>> 'OUT' STO


This also works for UserRPL imported/exported using SD cards,
although I also have somewhat fancier versions of IN/OUT
which handle the general transfer headers as well,
e.g. the header lines like "%%HP: T(3)A(D)F(.);" representing
various internal mode settings that influence text interpretation.

That more rigorous and complete IN/OUT system
(with transfer header handling on both input and output)
may be found in the second half of this post:
http://groups.google.com/group/comp.sys.hp48/msg/46b8bc3f34d9dfe0?dmode=source

General caution:

It's good to make memory backups before using any programs
that employ SYSEVAL, because mistakes in those programs
(or using the version for the wrong calculator model)
could have serious consequences and cause loss of data or memory.

[r->] [OFF]

0 new messages