HP 50g SD Card
|
09-20-2021, 12:20 AM
Post: #1
|
|||
|
|||
HP 50g SD Card
I have many files on an SD card that I've used with my HP 50g. I copied them to my PC and opened up a few of them. I assume they're in binary format because the code consists of nothing but symbols. Is there an easy way to convert the files to ASCII format either on the HP 50g or on a PC? I want a printout of all of my program code so I can store it in a binder.
|
|||
09-20-2021, 02:04 AM
Post: #2
|
|||
|
|||
RE: HP 50g SD Card
(09-20-2021 12:20 AM)MNH Wrote: I have many files on an SD card that I've used with my HP 50g. I copied them to my PC and opened up a few of them. I assume they're in binary format because the code consists of nothing but symbols. Is there an easy way to convert the files to ASCII format either on the HP 50g or on a PC? I want a printout of all of my program code so I can store it in a binder. You can either buy a thermal printer (great idea IMHO) or run the Calculator Connectivity kit that came with the calculator. You can convert to text files there. If you don't have the Conn Kit for some reason, you can get it at: http://www.hpcalc.org/hp49/pc/link/conn4x_english.exe Tom L Cui bono? |
|||
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. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: