Post Reply 
HP 50g SD Card
09-20-2021, 07:31 AM
Post: #3
RE: HP 50g SD Card
Alternatively, you can use the \->STR command on the calculator, then store the resulting string on the SD card. The resulting file will still have a small header with a few weird symbols, but beyond that you get the full contents of the string. You can even delete this header on the PC - the 50g interprets files without this header as strings anyway. If you edit the string on a PC, that's even a better idea than leaving it in place, because it contains the length of the string as binary value, and I don't remember what the 50g does when it doesn't match the file length.

To get the string onto the SD card without any header in the first place, we have to go beyond the builtin commands and use some custom ARM code. Fortunately we don't have to develop that anymore, the SDFILER library has the SDRSTO command for that. (If you decide to use it, read the readme though, particularly the documentation of the XRESET command.)

All that still leaves some HP-specific characters which will likely show up wrong on a PC. When communicating via cable, the calculator can translate them into "trigraphs", i.e. sequences consisting of a backslash followed by two normal ASCII characters that together usually look similar to the replaced character, e.g. \-> for the right-arrow. (For greek letters the encoding doesn't look similar, but it remains unambiguous and can therefore be translated back by the calculator.) The routines used by the calculator are unfortunately not used for SD storing, and not directly exposed to UserRPL either, but they can be reached with SYSEVAL. The program INOUT posted elsewhere in this forum uses the appropriate SYSEVAL values, and it'll serve as an enhanced replacement for \->STR. It's also capable of doing the reverse operation when you give it a string instead.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP 50g SD Card - MNH - 09-20-2021, 12:20 AM
RE: HP 50g SD Card - toml_12953 - 09-20-2021, 02:04 AM
RE: HP 50g SD Card - 3298 - 09-20-2021 07:31 AM



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