Re: No HP35s Submissions in the Software Library Message #19 Posted by Stefan Vorkoetter on 8 Dec 2008, 10:19 a.m., in response to message #18 by Bruce Bergman
Quote:
Let's say you do go to the effort to write a program for the 35s and finally get it working...
Then you decide it'd be nice to share. But since there is no way to print the program, or save it to a card, you must now take said program and copy it off, line by line, documenting it as you go. Not a lot of incentive there.
That really depends on your way of developing calculator programs. For each of my two published HP 35s programs (Matrix Multi-Tool and Curve Fitting), I first developed the computational parts of the program on a computer (using the Pascal-like Maple programming language). Once I got it working, I kept modifying it to make it more and more compatible with the 35s (e.g. using only variables I and J for indexing, rewriting all loops so the test is at the end, etc.).
Next I hand-translated the program into HP 35s instructions in a plain text file, but using symbolic labels instead of line numbers. Finally, I ran that through a mini-assembler script that I wrote, which resolves all the label references and spits out another text file containing pure HP 35s instructions where all the branches refer to line numbers.
As a side-effect, the assembler also produces an HTML file that I can use to document the programs on my web site.
During the debugging phase, if I have to change the program, I change it in my text file first. I then re-run the assembler, use the Unix "diff" utility to compare this with the previous output, and then working backwards through the diff output, edit the program on the calculator. That way, I have no trouble with automatic GTO renumbering while making changes.
I've found that the HP 35s' support of line-number addressing is both a blessing and a curse. The blessing is that you get more than the 26 labels of the HP 33s. The curse is keeping track of what is where when making changes. That's why I ended up writing the mini-assembler, so that I didn't need to worry about line numbers while writing the program.
Stefan
|