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

Store Program From SD-Card to HP50g

1,570 views
Skip to first unread message

Wolfgang Meiners

unread,
Jan 17, 2011, 4:25:48 AM1/17/11
to
Hi all,

i have written a program for HP50g, for example

@===============================
HOME 'Test' PGDIR

DIR
@ This is only a simple Test
I /<< /-> x y 'x*y' />>
END 'Test' STO
@===============================

using HPUserEdit. I can send this Program to Emu48 using CTRL E and it
works fine in Emu48. Now i want to copy the Program to my HP50g. I copy
it to a SD-Card and plug this to my HP50g. Now i copy the Programm to
the Stack. There is a String "HOME .... STO" on Stack-Level 1.

How can i install the Program to my Home-Directory?

I tried to EVAL the Value on the Stack, that did not work. I tried to
convert it to an Object using ->OBJ. That did not work too. So what
should I do, to get the PATH 'Test' with the Program I copied to my
HOME-Directory?

Thank you for any Hints.
Wolfgang

Andreas Möller

unread,
Jan 17, 2011, 5:46:10 AM1/17/11
to
Hello,

> the Stack. There is a String "HOME .... STO" on Stack-Level 1.

So this is most likely a string and not a program ;-)

> How can i install the Program to my Home-Directory?
>
> I tried to EVAL the Value on the Stack, that did not work. I tried to
> convert it to an Object using ->OBJ. That did not work too. So what
> should I do, to get the PATH 'Test' with the Program I copied to my
> HOME-Directory?

Programs *must* be in binary form in order to be able to run.
I do not know how HPUserEdit produces/creates binaries *but* if you
can get it in EMU48 as a binary you could save it from there.
Edit -> Save Object... will do this if the object is on Level1.

Regards,
Andreas
http://www.software49g.gmxhome.de

Alex

unread,
Jan 17, 2011, 5:54:23 AM1/17/11
to
On Jan 17, 11:25 am, Wolfgang Meiners <WolfgangMeiner...@web.de>
wrote:

In HPUserEdit try:

File -> Export

This creates a binary file which you can transfer to you 50G and run.

Alex

John H Meyers

unread,
Jan 17, 2011, 6:13:26 PM1/17/11
to
On 1/17/2011 3:25 AM, Wolfgang Meiners wrote:

> I have written a program for HP50g, for example


>
> @===============================
> HOME 'Test' PGDIR
>
> DIR
> @ This is only a simple Test

> I \<< \-> x y 'x*y' \>>


> END 'Test' STO
> @===============================
>
> using HPUserEdit. I can send this Program to Emu48 using CTRL E and it
> works fine in Emu48. Now i want to copy the Program to my HP50g. I copy
> it to a SD-Card and plug this to my HP50g. Now i copy the Programm to
> the Stack. There is a String "HOME .... STO" on Stack-Level 1.
>

> How can I install the Program to my Home-Directory?


> I tried to EVAL the Value on the Stack, that did not work.

> I tried to convert it to an Object using [OBJ\->] That did not work too.

You were very close!

Did you get an "Invalid Syntax" error, because of the use
of the backslash characters in place of the internal 8-bit symbols?
(otherwise your directory should have ended up stored,
exactly as you expected, when you used OBJ\->)

Others have written that you can store internal binary objects
onto your SD card and then transfer them directly.

However, you can also store any plain text version of the program source
on the SD card, and then import that text on the calculator,
by simply recalling the text to the stack and then typing the word IN,
after having stored this permanent program into your HOME directory:

@ This program translates, compiles and runs "ascii" source text
@ on any actual HP48/49/50 calculator or emulator,
@ as if the text were being typed into the calculator,
@ exactly like an "ascii" file transfer program using Kermit
@ (it's the same as doing OBJ\-> on the string,
@ after first translating any symbols preceded by backslashes)

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

Be careful to type the hexadecimal values (and entire program)
exactly as shown (translating \-> and \<< and \>> yourself);
otherwise a calculator crash could occur.

A corresponding 'OUT' program and various other
more elaborate functions may be found in the following post,
and the short 'IN' program already typed above
may be used to load the entire posted package into your calculator,
using the above 'IN' program to digest it all:

"Ascii Import/Export for SD card and Emulator" [May 27 2007]
http://groups.google.com/group/comp.sys.hp48/msg/4e7ed90b3cf11c42

[r->] [OFF]

Wolfgang Meiners

unread,
Jan 18, 2011, 2:15:08 PM1/18/11
to
Hello Andreas,
thank you for your answer.

I finally got it how to install -my- Programs to the real HP50 (not
EMU48). Nevertheless, they are not in binary form. They are ascii-files
created with hpuseredit and then stored to a SD-Card. In order to get it
working, i had to delete the first line of the file, which reads

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

This is a little confusing to me and i did not find really good
information in the manual but what i do is

1. write the program using hpuseredit and store it to a SD-Card.
2. plug the SD-Card into a HP50g
3. use FILES to go to the program and EVAL it
4. use OBJ/-> to install the program.

Wolfgang

Andreas Möller

unread,
Jan 18, 2011, 2:26:08 PM1/18/11
to
Hello

> %%HP: T(0)A(D)F(.);
These are the translations codes for ASCII file transfer and they are
documented in the older manuals (48SX) IIRC.
Most likely you will also find some old posts here explaining the
headers of an ASCII file.

Regards,
Andreas
http://www.software49g.gmxhome.de

Wolfgang Meiners

unread,
Jan 18, 2011, 2:30:46 PM1/18/11
to
Am 17.01.11 11:54, schrieb Alex:

> On Jan 17, 11:25 am, Wolfgang Meiners <WolfgangMeiner...@web.de>
> wrote:
>> Hi all,
>>
>> i have written a program for HP50g, for example
>>
>> @===============================
>> HOME 'Test' PGDIR
>>
>> DIR
>> @ This is only a simple Test
>> I /<< /-> x y 'x*y' />>
>> END 'Test' STO
>> @===============================
>>
>
> In HPUserEdit try:
>
> File -> Export
>
> This creates a binary file which you can transfer to you 50G and run.
>
> Alex

hm. I tried this in HPUserEdit but it did not work. Maybe this was
because my program really looks a bit different from what i posted here.
I wasnt aware this could be a problem so i post my real program here:

@=====================================
%%HP: T(0)A(D)F(.);

HOME 'Test' PGDIR

DIR
@ This is only a simple Test

I « x y 'x*y' »
END 'Test' STO
@=====================================

This could not be installed. But after deleting the line starting with
%% it worked.

Wolfgang

Wolfgang Meiners

unread,
Jan 18, 2011, 2:44:45 PM1/18/11
to
Am 18.01.11 00:13, schrieb John H Meyers:

> On 1/17/2011 3:25 AM, Wolfgang Meiners wrote:
>
>> I have written a program for HP50g, for example
>>
>> @===============================
>> HOME 'Test' PGDIR
>>
>> DIR
>> @ This is only a simple Test
>> I \<< \-> x y 'x*y' \>>
>> END 'Test' STO
>> @===============================
>>
>> using HPUserEdit. I can send this Program to Emu48 using CTRL E and it
>> works fine in Emu48. Now i want to copy the Program to my HP50g. I copy
>> it to a SD-Card and plug this to my HP50g. Now i copy the Programm to
>> the Stack. There is a String "HOME .... STO" on Stack-Level 1.
>>
>> How can I install the Program to my Home-Directory?
>> I tried to EVAL the Value on the Stack, that did not work.
>> I tried to convert it to an Object using [OBJ\->] That did not work too.
>
> You were very close!

Yes indeed. And as i explained to the other helpers, my program really read:

@==================================
%%HP: T(0)A(D)F(.);

HOME 'Test' PGDIR

DIR
@ This is only a simple Test

I « x y 'x*y' »
END 'Test' STO
@==================================

I only had to delete the first line to get it working. The rest of your
answer is very interesting too and i hope, i will understand more of
this some day.

> @ This program translates, compiles and runs "ascii" source text
> @ on any actual HP48/49/50 calculator or emulator,
> @ as if the text were being typed into the calculator,
> @ exactly like an "ascii" file transfer program using Kermit
> @ (it's the same as doing OBJ\-> on the string,
> @ after first translating any symbols preceded by backslashes)
>
> \<< \->STR 3 TRANSIO RCLF SIZE 3 >
> #2F34Dh #3016Bh IFTE SYSEVAL + STR\-> \>> 'IN' STO
>

Thank you for this program and the related programs in

>
> "Ascii Import/Export for SD card and Emulator" [May 27 2007]
> http://groups.google.com/group/comp.sys.hp48/msg/4e7ed90b3cf11c42

Wolfgang

0 new messages