Post Reply 
HP50g - RESTORE - Help needed
11-08-2024, 07:14 PM (This post was last modified: 11-08-2024 07:16 PM by brrm.)
Post: #1
HP50g - RESTORE - Help needed
Hi all, I need some help with restoring a backup on the 50g.

I created a back-up file on the SD card, which is port 3

The file name is BU_20210211.153

In RPN when I enter the file name and press ENTER I get an error saying 'Too Few Arguments'
and the stack shows 1: 3:BU

In Algebraic mode when I type RESTORE(:3:BU_20210211.153) and press ENTER I get an error saying: Invalid Syntax and the part of the file name following the underscore is highlighted.

So apparently something is wrong with the underscore however I don't understand what.

Help is appreciated.
Find all posts by this user
Quote this message in a reply
11-08-2024, 09:01 PM
Post: #2
RE: HP50g - RESTORE - Help needed
Hi,

It seems that the problem you are experiencing is due to the file name.
In that case, I would put the SD card in my laptop and rename the file.
Before doing so, I would also make a copy of the original file... you never know.

Hope it helps

Bruno
Sanyo CZ-0124 ⋅ TI-57 ⋅ HP-15C ⋅ Canon X-07 + XP-140 Monitor Card ⋅ HP-41CX ⋅ HP-28S ⋅ HP-50G ⋅ HP-50G
Find all posts by this user
Quote this message in a reply
11-09-2024, 01:21 PM
Post: #3
RE: HP50g - RESTORE - Help needed
(11-08-2024 07:14 PM)brrm Wrote:  So apparently something is wrong with the underscore however I don't understand what.

The parser built-in to the calculator interprets the underscore character as a signal that you're entering a unit object, eg. something similar to 1.5_m or 9.8_m/s^2. When it "sees" :3:BU_20210211.153, there's no way to parse that into a legitimate unit object, so it throws an error.

Keeping in mind that the SD card's contents need to satisfy naming conventions for both the calculator as well as any computer/card reader you may insert the card into, it usually makes sense to have a simple (and short) name for anything stored on the card. "_" and "." have special meanings depending on the platform, so common ground for naming conventions should be considered.

If you really, really want to use that naming convention, there's a way to "trick" the calculator into building a legitimate identifier from the string "BU_20210211.153". The steps are as follows:
Code:
\<<
  @ place the untagged object name on the stack AS A STRING
  @ (note the quote marks)
  "BU_20210211.153"

  @ convert the string to an ID
  #5B15h SYSEVAL

  @ tag the ID for the SD card
  "3" \->TAG

  @ you should now be able to RESTORE the backup object
\>>

The internal routine at address #5B15h converts a given string to an ID, bypassing the parser entirely. While it can be somewhat useful (such as in this example), it can also create problems for you in unexpected ways if you happen to name an object something that would otherwise be prohibited. I would recommend using a simpler (and shorter) name for the backup object instead.
Find all posts by this user
Quote this message in a reply
11-09-2024, 06:26 PM
Post: #4
RE: HP50g - RESTORE - Help needed
My notes say:

:3:BK241109 ARCHIVE # port 3 (SD)
need to keep filename ≤ 8 chars for SD card (FAT filesystem)

Cambridge, UK
41CL/DM41X 12/15C/16C DM15/16 17B/II/II+ 28S 42S/DM42 32SII 48GX 50g 35s WP34S PrimeG2 WP43S/pilot/C47
Casio, Rockwell 18R
Find all posts by this user
Quote this message in a reply
11-25-2024, 09:03 AM (This post was last modified: 11-25-2024 09:07 AM by brrm.)
Post: #5
RE: HP50g - RESTORE - Help needed
Thank you for the help.

Indeed the filename was the problem, I removed the underscore and was able to reinstall. The period did not cause a problem.

I also changed my backup program removing the underscore from the file name.

Thanks a lot!
Find all posts by this user
Quote this message in a reply
Post Reply 




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