Post Reply 
HP 50g & SD Cards: Performance, Format, Notes
09-09-2016, 04:40 PM
Post: #112
RE: HP 50g & SD Cards: Performance, Format, Notes
(09-09-2016 10:33 AM)JDW Wrote:  ...I then repeated the above but this time using the following "escaped" code instead:
Code:
\<<
   #21d #8d BLANK "" 2 \->LIST
   DUP DUP DUP DUP DUP
   6 \->LIST
   TMENU
\>>
I, uhm, recognize that code for some reason... Smile

I believe the "blocks" you are seeing in the string are actually carriage returns, which aren't typically used on RPL calcs to separate lines (line feeds are used instead).

The escaped characters in the above code are called "digraphs". If you use the HP Calculator Connectivity Kit to transfer this type of file to your 50g over a cable, it can automatically handle the conversion of those escaped characters into their RPL equivalents. I probably should have also included the header line when I originally posted that block of code, because that removes any ambiguity about the translation settings that are appropriate for its conversion. This is how the code block would look with the header:
Code:
%%HP: T(3)A(R)F(.);
\<<
   #21d #8d BLANK "" 2 \->LIST
   DUP DUP DUP DUP DUP
   6 \->LIST
   TMENU
\>>

The codes in the header signify the following:
T(3): translate all digraphs to their single character equivalents
A(R): radian mode is active (which doesn't matter for this, obviously)
F(.): the current fraction mark setting is "." (which also doesn't apply here, but is typically important)

If the string object already has the header (or if you add it), you can use James Prange's utilities to translate the program accordingly.

If you've already got the text object on the calculator (or the SD card) without the header, there is a fairly easy way to translate the digraphs using a SYSEVAL on the 50g. <INSERT STANDARD SCARY WARNING ABOUT USING SYSEVAL HERE>. Here's the required steps:

1) Set the appropriate translation mode on the calculator to 3. Easiest way:
3 TRANSIO
2) With the string on the stack (note: without the header), execute #2F34Dh SYSEVAL. You should now see the translated string in SL2 and an empty string in SL1. Carriage returns are automatically removed if you do this.
3) Drop the empty string, then execute OBJ→ (menu path: PRG - TYPE - OBJ→) on the translated string. You should now have a compiled code object on the stack.

Hope this helps!
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP 50g & SD Cards: Performance, Format, Notes - DavidM - 09-09-2016 04:40 PM



User(s) browsing this thread: 1 Guest(s)