How do I Save or Load Programs ?

Discussion around the SwissMicros DM32 calculator
HPMike
Posts: 439
Joined: Fri Jul 21, 2017 11:01 pm
Location: DFW, Texas

How do I Save or Load Programs ?

Post by HPMike »

There is a PROGRAMS folder on the FAT disk, but no apparent way to access it. In the Setup File menu there is a Load State and Save State, but no Load Program or Save Program. There is also no mention of loading or saving programs in the current DM32 User Manual. Is this a future feature not yet implemented, or am I missing something here ? :?
DM15L, S/N 00548. DM42, SN: 00159. DM41X, SN: 00973. DM32, SN 00054.
rprosperi
Posts: 1703
Joined: Mon Apr 24, 2017 7:48 pm
Location: New York

Re: How do I Save or Load Programs ?

Post by rprosperi »

Programs are imported / exported via State Files. If you create a program, save the State FIle and then copy the file to the PC, open it with a text editor and you'll see and ASCII file which includes text commands comprising the program (along with variables, settings, etc.).

There is no need for FIle/Program level import or export, it is all accomplished with the State FIles.

The /PROGRAMS folder is present on the BETA DM32 simply from historical reasons, it is not used and will not be present on later machines.

Feel free to remove that folder, or just ignore it.
--bob p

DM42: β00071 & 00282, DM41X: β00071 & 00656, DM10L: 071/100
HP1983
Posts: 13
Joined: Tue Feb 13, 2018 5:16 pm

Re: How do I Save or Load Programs ?

Post by HP1983 »

What is the procedure to import programs to DM32?
- In the State File the programs seem to be converted to a format different from plain TEXT format.
- This means that one cannot simply add an additional program code in TEXT format to a State File and then load it back to the DM32.
HP1983
Joe Horn
Posts: 108
Joined: Thu Oct 04, 2018 2:10 am

Re: How do I Save or Load Programs ?

Post by Joe Horn »

HP1983 wrote:
Sun Jun 25, 2023 4:40 pm
What is the procedure to import programs to DM32?
- In the State File the programs seem to be converted to a format different from plain TEXT format.
- This means that one cannot simply add an additional program code in TEXT format to a State File and then load it back to the DM32.
HP1983
State files are in fact plain-text files. Use your favorite text editor to create and/or edit them. Yes, programs are also plain text, although special characters use an HTML style of encoding. For example, the "x bar" character (blue shift, y^x, F1) is encoded in state file program listings as "\xbar;". I've attached the current list of special characters and their state file codes for you. Currently there are also single-character shortcuts for most of these codes, for example you can use "u" instead of "\xbar;" ... but this might change in a future firmware update. Hope this helps!
DM32-Char-Mapping-for-programming.pdf
(115.94 KiB) Downloaded 151 times
HP1983
Posts: 13
Joined: Tue Feb 13, 2018 5:16 pm

Re: How do I Save or Load Programs ?

Post by HP1983 »

Thanks, very much appreciated!
Jan-Olov P
RaulLion
Posts: 93
Joined: Thu Apr 13, 2023 5:48 pm
Location: Spain
Contact:

Re: How do I Save or Load Programs ?

Post by RaulLion »

Joe Horn wrote:
Sun Jun 25, 2023 4:49 pm
I've attached the current list of special characters and their state file codes for you...
Great! Thank you so much, Joe.
hp41cv-hp15c-hp42s-hp32sii-hp48gx(2)-hp33s(pre-release)-hp35s-DM32

[hp48 + Metakernel + Erable + Alg48 + 20 years of stuff running on Emu48 for Android since 2019]
User avatar
Walter
Posts: 3070
Joined: Tue May 02, 2017 11:13 am
Location: On a mission close to DRS, Germany

Re: How do I Save or Load Programs ?

Post by Walter »

Joe Horn wrote:
Sun Jun 25, 2023 4:49 pm

State files are in fact plain-text files. Use your favorite text editor to create and/or edit them. Yes, programs are also plain text, although special characters use an HTML style of encoding. For example, the "x bar" character (blue shift, y^x, F1) is encoded in state file program listings as "\xbar;". I've attached the current list of special characters and their state file codes for you. Currently there are also single-character shortcuts for most of these codes, for example you can use "u" instead of "\xbar;" ... but this might change in a future firmware update.
Thanks for explaining, Joe!

Many of the present single character shortcuts, however, are far from being intuitive. Is this something the developers are free to specify? Are only ASCII characters allowed in those text editors? If false, what else? I hope for improvement.
WP43 SN00000, 34S, and 31S for obvious reasons; HP-35, 45, ..., 35S, 15CE, DM16L S/N# 00093, DM42β SN:00041
Joe Horn
Posts: 108
Joined: Thu Oct 04, 2018 2:10 am

Re: How do I Save or Load Programs ?

Post by Joe Horn »

Walter wrote:
Sun Jun 25, 2023 8:47 pm
Many of the present single character shortcuts, however, are far from being intuitive. Is this something the developers are free to specify? Are only ASCII characters allowed in those text editors? If false, what else? I hope for improvement.
Please note that the character chart I shared above, and all my related comments, are due to my own exploration, and are not from Swiss Micros.

Until the developers reveal their secrets, my guess is that all of these "single character shortcuts" are a side effect of the very limited character set of the HP 32SII, which contains only 91 characters in a custom non-ASCII order, which apparently the DM32 also uses. It contains only the lowercase letters which correspond to commands, so it has NO ability to display any of the following lowercase letters: "afghjklopqtuvz". Instead, the DM32 maps those lowercase letters to special characters in its character set.

However, Swiss Micros might be expanding the feature set of the DM32 to include 26 more numeric storage registers, "a" through "z". I cannot imagine how they would avoid a conflict between the already-existing "i" indirect register, and the new "i" register. But an even bigger hurdle is that currently "STO f" would be displayed as "STO ϴ" (see my character chart), so such a feature expansion would necessitate expanding and reordering the entire character set and the way that the state file interpreter works. If that happens, my chart of shortcut characters would become obsolete.

I have experimented with many other ASCII characters in state files; only the obvious ones, and the ones in my chart, seem to work. But again, that might change in a future firmware update.
User avatar
Walter
Posts: 3070
Joined: Tue May 02, 2017 11:13 am
Location: On a mission close to DRS, Germany

Re: How do I Save or Load Programs ?

Post by Walter »

Nobody claimed it being from SM.

My questions were:
Walter wrote:
Sun Jun 25, 2023 8:47 pm
Many of the present single character shortcuts, however, are far from being intuitive. Is this something the developers are free to specify? Are only ASCII characters allowed in those text editors? If false, what else?
I conclude from your response we don't know the answer to question 1 (yet). I don't find, however, answers to question 2 and 3 - they will be appreciated though.
WP43 SN00000, 34S, and 31S for obvious reasons; HP-35, 45, ..., 35S, 15CE, DM16L S/N# 00093, DM42β SN:00041
RaulLion
Posts: 93
Joined: Thu Apr 13, 2023 5:48 pm
Location: Spain
Contact:

Re: How do I Save or Load Programs ?

Post by RaulLion »

Joe Horn wrote:
Sun Jun 25, 2023 9:37 pm
I cannot imagine how they would avoid a conflict between the already-existing "i" indirect register, and the new "i" register.
Sure I'm missing something: why do you expect a conflict? The 35S manages variables I and J like all the othes in spite of you can also use (I) and (J).
hp41cv-hp15c-hp42s-hp32sii-hp48gx(2)-hp33s(pre-release)-hp35s-DM32

[hp48 + Metakernel + Erable + Alg48 + 20 years of stuff running on Emu48 for Android since 2019]
Post Reply