Post Reply 
Editing and adding programs on an HP15C
02-11-2024, 08:22 PM (This post was last modified: 02-11-2024 08:33 PM by Johnh.)
Post: #1
Editing and adding programs on an HP15C
Just wondering if anyone has any good tricks or best-practice tips for editing and adding programs to an HP15c? This applies to any version, but I'm a recent aquirer of a CE model.

It has huge capability and plenty of memory to store a lot of useful stuff. But it seems to be all in one long sequential program space into which one adds labels, brancing and returns etc,to set up different routines and applications.

It's all ok once it's programmed, but with no backup storage and just numeric key codes, it's too easy for me to mess up somewhere when editing, breaking other parts of my code by accident, and it feels like this will limit me from putting in anywhere near as much as the machine is capable of. Can only add and delete one step at a time.

I find it helpful to write out the programs on an Excel file to help keep track. I also find an Android emulator useful (I use Touch15) to try things as a development test bed, since it can save backups, ahead of typing into the real machine.

Any other tips?
Find all posts by this user
Quote this message in a reply
02-11-2024, 08:36 PM
Post: #2
RE: Editing and adding programs on an HP15C
I find a spreadsheet to be the biggest help when writing a very involved program. I'll often be keying things into Excel and the calculator simultaneously. You can even make little stack diagrams to the right of the program steps to verify your program logic. Once you've finished writing the program, keying it into the calculator, and testing it, you can go even further and put the numeric keycodes back into the spreadsheet for verifying correct entry in the future.

This approach is almost required for programming the 65, which doesn't have a BST key - you either have to loop all the way around with SST, or go back to RUN mode and hit RTN to go to the top. And it's still extremely helpful for any of the models that display numeric keycodes, i.e. nearly everything before the Pioneers (41C being the notable exception), as well as the 20S and 21S, which are Pioneers. Even the models with alpha instruction display can benefit from having a nice big multi-line work surface.

The 15C is about the upper limit of how long of a program I would want to enter with only numeric keycodes, no mass storage, and only the ability to delete one or all program steps. 15.2 mode in the 15C CE is nice, but that's an awful lot of program steps you can fill, and shuffling small programs in and out is not at all convenient, as you've noticed!
Visit this user's website Find all posts by this user
Quote this message in a reply
02-11-2024, 09:00 PM (This post was last modified: 02-11-2024 09:01 PM by Johnh.)
Post: #3
RE: Editing and adding programs on an HP15C
Thanks Dave

I guess no new Easter eggs there! But, you made a good suggestion to record the key-codes too in addition to the key names, in the excel record. And that can be done once its all in whereupon the machine can tell me what the codes are as I just step through typing each line carefully.

Another nice thing with Excel as a record is that the first column can be the line number, each as the previous line + 1. So if a piece of code gets shifted to another starting line due to edits before, the excel reference can be easily fixed to follow this.
Find all posts by this user
Quote this message in a reply
02-12-2024, 12:56 AM
Post: #4
RE: Editing and adding programs on an HP15C
A bright idea:?

After the end of a routine, after the last RTN line, add a series of 0's to get the line numbers up to one before the next multiple of 50. So the following routine always starts at a multiple of 50 or 100, and the gaps between are all zeros and can be seen as such when encountered. There's plenty of spare lines available to waste a few by doing this.
Find all posts by this user
Quote this message in a reply
02-12-2024, 08:25 PM (This post was last modified: 02-12-2024 08:47 PM by richmit.)
Post: #5
RE: Editing and adding programs on an HP15C
I'm a Emacs user. I use org-mode for lots of stuff.

I've been putting the code in an org-mode table like this:

Code:
| *Keystrokes* {{{SPC}}} | *Key Codes* | {{{SPC}}} *Stack Contents* | {{{SPC}}} | *Comments*          |
| {{{c15(  f LBL C  )}}} |  =42,21,13= |                   x0 ? ? ? |           |                     |
| {{{c15(  8        )}}} |         =8= |                   8 x0 ? ? |           |                     |
| {{{c15(  GSB D    )}}} |     =32 14= |                   x0 ? ? 8 |           | STO_CPLX            |
| {{{c15(  f LBL 1  )}}} |  =42,21, 1= |                    ? ? ? ? |           |                     |
| {{{c15(  8        )}}} |         =8= |                    8 ? ? ? |           |                     |
| {{{c15(  GSB E    )}}} |     =32 15= |                   x0 ? ? ? |           | RCL_CPLX            |
| {{{c15(  ENTER    )}}} |        =36= |                  x0 x0 ? ? |           | x0=Previous iterate |
| {{{c15(  ENTER    )}}} |        =36= |                 x0 x0 x0 ? |           |                     |
| {{{c15(  ENTER    )}}} |        =36= |                x0 x0 x0 x0 |           |                     |
| {{{c15(  GSB A    )}}} |     =32 11= |                   df f ? ? |           | Function to solve   |
| {{{c15(  x≷y      )}}} |        =34= |                   f df ? ? |           | f=f(x0), df=f'(x0)  |

When I post it to github, I export to HTML and it looks like the attached image.

I don't know why, but having the little button images really reduces my error count when typing them into the calculator. After I enter each line, I then check the key codes in the table.


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
02-13-2024, 07:50 PM
Post: #6
RE: Editing and adding programs on an HP15C
I developed a tool in Excel VBA which allows me not only to keep my HP-15C programs on my PC but also to exchange them between emulators (Windows and Android) and DM15L calculator via dump generation.
To see on my site clones.phweb.me !
   
...and to download !

http://ti58c.phweb.me
http://clones.phweb.me
http://www.instagram.com/ti58c
"No! Do or Do not. There is no try!" [Master Yoda]
Visit this user's website Find all posts by this user
Quote this message in a reply
02-13-2024, 07:53 PM
Post: #7
RE: Editing and adding programs on an HP15C
... but on my HP-15C (classic and LE and CE) as well as on the PX15C I have to re-enter
my programs !

http://ti58c.phweb.me
http://clones.phweb.me
http://www.instagram.com/ti58c
"No! Do or Do not. There is no try!" [Master Yoda]
Visit this user's website Find all posts by this user
Quote this message in a reply
02-13-2024, 08:12 PM
Post: #8
RE: Editing and adding programs on an HP15C
hi @Pierre , that looks great! Very useful..

How feasible would it be to develop it with a method of using the recent POGO cable to exchange directly with a real HP15C CE?
Find all posts by this user
Quote this message in a reply
02-13-2024, 10:30 PM
Post: #9
RE: Editing and adding programs on an HP15C
(02-13-2024 08:12 PM)Johnh Wrote:  ... using the recent POGO cable to exchange directly with a real HP15C CE?

The POGO cable allows you to update the HP-15C CE firmware but I don't think it allows access to the RAM.
For example, on DM and PX, the firmware update procedure is completely different from the RAM dump update procedure and the software tools are not the same.
I don't know how to recover a RAM dump from the HP-15C CE otherwise I would have included this update in my interface.
Maybe José Divasson would have the answer... but I'm skeptical.

see the thread "HP15c CE POGO programming cable" in this forum.

http://ti58c.phweb.me
http://clones.phweb.me
http://www.instagram.com/ti58c
"No! Do or Do not. There is no try!" [Master Yoda]
Visit this user's website Find all posts by this user
Quote this message in a reply
02-13-2024, 10:49 PM
Post: #10
RE: Editing and adding programs on an HP15C
On the CalculatorStore website, the “How to use the Programming Cable” page is clear and precise:
"Warning: Connecting your calculator will erase all data in the user area: programs, data, matrices, memory configuration: all will be reset to default."

So if everything is deleted...

http://ti58c.phweb.me
http://clones.phweb.me
http://www.instagram.com/ti58c
"No! Do or Do not. There is no try!" [Master Yoda]
Visit this user's website Find all posts by this user
Quote this message in a reply
02-13-2024, 11:28 PM
Post: #11
RE: Editing and adding programs on an HP15C
I use a spreadsheet without macros, see thread https://www.hpmuseum.org/forum/thread-10324.html

Thibault - not collector but in love with the few HP models I own - Also musician : http://walruspark.co
Find all posts by this user
Quote this message in a reply
02-14-2024, 06:28 PM
Post: #12
RE: Editing and adding programs on an HP15C
(02-13-2024 10:49 PM)Pierre Wrote:  On the CalculatorStore website, the “How to use the Programming Cable” page is clear and precise:
"Warning: Connecting your calculator will erase all data in the user area: programs, data, matrices, memory configuration: all will be reset to default."

So if everything is deleted...

Hi, this is true with the current method of connection (“programming the board”). Other USB modes could be used that do not give access to firmware memory (which involves ERASE and RESET) and that could be used to read and write RAM without resetting the calculator.
Find all posts by this user
Quote this message in a reply
02-14-2024, 06:48 PM
Post: #13
RE: Editing and adding programs on an HP15C
(02-14-2024 06:28 PM)Divasson Wrote:  Other USB modes could be used ... to read and write RAM without resetting the calculator.

so if it's possible I'm more than interested : I can't wait to find out more !!!
if I can recover the RAM, therefore the program part, like on a DM I would like to know the procedure and I can immediately adapt my interface to transfer my programs from a PC.

http://ti58c.phweb.me
http://clones.phweb.me
http://www.instagram.com/ti58c
"No! Do or Do not. There is no try!" [Master Yoda]
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




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