Discussion:
HP50g programming
(too old to reply)
s***@gmail.com
2018-04-13 09:27:35 UTC
Permalink
I am trying to get into simple programming. I have found some programs on the hpcalc.org site which begin with
%%HP: T(1)A(R)F(.);
and then continue in readable fashion (for instance MODA V1.52). I cannot find anything which explains this in the manuals or elsewhere.Can anyone please help?
I am having problems running the aforementioned progam and would like to be able to modify it as necessary for the 50g.

Best Wishes
Stephen
Joe Horn
2018-04-13 12:03:54 UTC
Permalink
That's the header which the 50g uses for file transfer of a program via cable
in ASCII mode. The "%%HP:" just means "here comes a file in ASCII mode". The
rest means:

T(n) = use TRANSIO mode n during this transfer.
A(D/R/G) = assume DEG/RAD/GRAD mode for angles during this transfer.
F(./,) = assume point or comma for decimal point during this transfer.

These are necessary for correct interpretation of ASCII program listings, since
saved programs can differ depending on those flag settings. When importing
programs into a 50g, this header line temporarily sets those flags the same way
as they were when the program was exported (so that it gets imported correctly)
and then the flags are automatically restored after the transfer to the way
they were before the transfer.

Hope that helps!

-Joe-
s***@gmail.com
2018-04-13 13:43:57 UTC
Permalink
Post by s***@gmail.com
I am trying to get into simple programming. I have found some programs on the hpcalc.org site which begin with
%%HP: T(1)A(R)F(.);
and then continue in readable fashion (for instance MODA V1.52). I cannot find anything which explains this in the manuals or elsewhere.Can anyone please help?
I am having problems running the aforementioned progam and would like to be able to modify it as necessary for the 50g.
Best Wishes
Stephen
Thanks Joe,
I thought that might have something to do with my problem, but apparently not.I have successfully installed the library modaV152.lib and can call up MODA from LIB or STAT as expected, but when I install MDCAT, MODA is no longer available although MDCAT appears to be basically only a list of lists.
New info: I have loaded MDCAT again and deleted the HPHP line. This time it does not affect MODA but when I open MDCAT it appears as gibberish (not as it looked in Notepad) and has locked up the 50g (emulator this time). I guess the format is wrong. Any further thoughts would be gratefully received.
Stephen
s***@gmail.com
2018-04-13 13:48:12 UTC
Permalink
Post by s***@gmail.com
Post by s***@gmail.com
I am trying to get into simple programming. I have found some programs on the hpcalc.org site which begin with
%%HP: T(1)A(R)F(.);
and then continue in readable fashion (for instance MODA V1.52). I cannot find anything which explains this in the manuals or elsewhere.Can anyone please help?
I am having problems running the aforementioned progam and would like to be able to modify it as necessary for the 50g.
Best Wishes
Stephen
Thanks Joe,
I thought that might have something to do with my problem, but apparently not.I have successfully installed the library modaV152.lib and can call up MODA from LIB or STAT as expected, but when I install MDCAT, MODA is no longer available although MDCAT appears to be basically only a list of lists.
New info: I have loaded MDCAT again and deleted the HPHP line. This time it does not affect MODA but when I open MDCAT it appears as gibberish (not as it looked in Notepad) and has locked up the 50g (emulator this time). I guess the format is wrong. Any further thoughts would be gratefully received.
Stephen
DavidM
2018-04-13 18:24:09 UTC
Permalink
Post by s***@gmail.com
Post by s***@gmail.com
I am trying to get into simple programming. I have found some programs on the hpcalc.org site which begin with
%%HP: T(1)A(R)F(.);
and then continue in readable fashion (for instance MODA V1.52). I cannot find anything which explains this in the manuals or elsewhere.Can anyone please help?
I am having problems running the aforementioned progam and would like to be able to modify it as necessary for the 50g.
Best Wishes
Stephen
Thanks Joe,
I thought that might have something to do with my problem, but apparently not.I have successfully installed the library modaV152.lib and can call up MODA from LIB or STAT as expected, but when I install MDCAT, MODA is no longer available although MDCAT appears to be basically only a list of lists.
New info: I have loaded MDCAT again and deleted the HPHP line. This time it does not affect MODA but when I open MDCAT it appears as gibberish (not as it looked in Notepad) and has locked up the 50g (emulator this time). I guess the format is wrong. Any further thoughts would be gratefully received.
Stephen
After installing the library (and attaching it), edit the MDCAT object on your computer before dropping it on the emulator by removing that first line (the one that starts with "%%HP").

Now drop it on the emulator, then execute STR-> (right arrow can be typed with <right-shift>0). You should now see the previous string having been converted to a list object in stack level 1.

STO the new list object as MDCAT in your HOME directory (or whichever directory you intend to be active while executing MODA).

Note that libraries are generally not editable, so you may not be able to "re-program" any of the features that MODA offers. You may still be able to reconfigure it, of course, presuming that it has features to enable that type of functionality.

Hope this helps!
- David
Stephen H
2018-04-14 13:45:38 UTC
Permalink
Post by s***@gmail.com
I am trying to get into simple programming. I have found some programs on the hpcalc.org site which begin with
%%HP: T(1)A(R)F(.);
and then continue in readable fashion (for instance MODA V1.52). I cannot find anything which explains this in the manuals or elsewhere.Can anyone please help?
I am having problems running the aforementioned progam and would like to be able to modify it as necessary for the 50g.
Best Wishes
Stephen
Thanks David,
Problem solved!
Stephen

Loading...