Post Reply 
HP50G - Viewing .txt Files on SD Card without CR Characters
05-12-2020, 07:51 AM
Post: #1
HP50G - Viewing .txt Files on SD Card without CR Characters
Hi all,

Have been using HP48 series & 50G calculators for a long time & have developed a large number of programs & equations. Whilst I use many of these on an almost daily basis & can mostly remember the assumptions, units etc., I'd like to improve the documentation available on my calculators.

In the case of most of my programs, I have been using an excellent small application by John Meyer, which he named CHOOSF, to display all the relevant information. Whilst this works fine, the text needs to be in the form of a list using "..." & hence not as convenient to create or edit as a text file.

Recognising that the built-in FILER can view text files on the SD card, I created some documents on my PC & have been using these. However, I find them a bit annoying to view due to the carriage return characters being shown.

Is there anything I can do to hide the carriage return characters or an alternative viewer I can use to read text files on the SD card?

Many thanks,

Michael
Find all posts by this user
Quote this message in a reply
05-12-2020, 12:53 PM
Post: #2
RE: HP50G - Viewing .txt Files on SD Card without CR Characters
It's because you're using DOS format files which use carriage return plus linefeed to denote the end of line.

If you switch to Unix format (linefeed only) then the file appears without the square blobs at the end of each line.

Your editor might have the option to use Unix format otherwise there are many DOS2UNIX type programs that will do the conversion for you.
Find all posts by this user
Quote this message in a reply
05-12-2020, 04:15 PM
Post: #3
RE: HP50G - Viewing .txt Files on SD Card without CR Characters
On the HP 50, put the text file on the stack and execute

Code:

\<< 13. CHR "" SREPL DROP
\>>

That will get rid of the annoying CR's.
Find all posts by this user
Quote this message in a reply
05-12-2020, 07:43 PM
Post: #4
RE: HP50G - Viewing .txt Files on SD Card without CR Characters
... but this on-calc solution has the slight drawback that when you store the string back onto the SD card, it's guaranteed* to have the "HPHP49-C..." header of an RPL object. That's irrelevant if the file is only opened on the calculator afterward (and it would be made upon any write operation from the calculator, not just this adjustment), but if the edited file gets opened on a computer again, you may be annoyed by having to delete that header.
For that reason I'd call the format conversion on PC (whether by editor settings or by dedicated conversion programs) superior, if only slightly.

*Technically there is a way to store a string into an SD file without the header using an ARM code program to bypass the the default handling for storing files onto the SD card, but that's not available out of the box. The documentation for SDRSTO from SDLIB appears to say that it's such a program.
Find all posts by this user
Quote this message in a reply
05-13-2020, 12:50 AM
Post: #5
RE: HP50G - Viewing .txt Files on SD Card without CR Characters
Hi all,

Thanks for your advice & suggestions. Have tested both solutions & they work well.

Cheers,

Michael
Find all posts by this user
Quote this message in a reply
Post Reply 




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