Post Reply 
What's This Program?
01-30-2015, 05:39 AM
Post: #1
What's This Program?
In a few weeks' time I've got to teach a class on cryptography, and I thought I would add some extra material on number theory. In order to quickly demonstrate the Euclidean Algorithm for finding the Greatest Common Divisor of two integers, I wrote a short program which gives me the numbers for each iteration of the algorithm - this will make it easy to demonstrate on the whiteboard for any suggested numbers.

I did it for the 41CX first of all, but then I realised I'd probably be carrying a 16C to that class, and did a quick rewrite for it. Having already done a Java program, I quickly rewrote that for the 71B. Now on a roll, I reached for the 11C in my drawer - and this is where the story really starts.

The 11C obviously has a program already in it - pressing g P/R shows "001 - 42,21,11" (f LBL A). The first question now is: which program? It's been a while since I last used it, but I might want to keep that program. And the second question is: which labels does it use - can I just BST to the end and carry on with f LBL B?

What tricks do people use for identifying programs or labeling them, or otherwise making it easy to determine which programs are in those early "continuous memory" but non- or limited-alpha calculators? I have a small notebook which contains recently-written short programs for my Voyagers; I suppose I could stick a Post-It on the back of the calculator to record which program is in there. But do people have any smarter tricks?

I bet you do . . . Wink

--- Les
[http://www.lesbell.com.au]
Visit this user's website Find all posts by this user
Quote this message in a reply
01-30-2015, 06:36 AM
Post: #2
RE: What's This Program?
I normally delete unknown programs from calculators I pick up. If I don't remember what it is, I'm unlikely to miss it.

As for finding LBLs. Try GTO followed by each label. The ones that error are free.


Pauli
Find all posts by this user
Quote this message in a reply
01-30-2015, 07:06 AM
Post: #3
RE: What's This Program?
(01-30-2015 05:39 AM)Les Bell Wrote:  The 11C obviously has a program already in it - pressing g P/R shows "001 - 42,21,11" (f LBL A). The first question now is: which program?

What about posting a listing here and have the community find out what the program does?

(01-30-2015 05:39 AM)Les Bell Wrote:  And the second question is: which labels does it use - can I just BST to the end and carry on with f LBL B?

Of course you can do so, but that does not make sure there is not another label B somewhere. Simply get out of program mode and press GTO B – if you get an error, there is no other label B. If you don't, switch to program mode and see what you find there.

(01-30-2015 05:39 AM)Les Bell Wrote:  What tricks do people use for identifying programs or labeling them, or otherwise making it easy to determine which programs are in those early "continuous memory" but non- or limited-alpha calculators?

Honestly, I often experience the same problem as you. I try this and that on a 41C, then something on a 35s, or a 34s, often in different versions. And in the end I cannot remember what's special about one version or another. #-) That's why I record the more important programs (or let's say: the ones I want to keep) as program listings in Excel files, along with some comments and additional information. Something like a kind of "electronic program form".

Dieter
Find all posts by this user
Quote this message in a reply
01-30-2015, 10:15 PM
Post: #4
RE: What's This Program?
I find a spreadsheet (LibreOffice Calc) great for designing, recording, and documenting programs. I include columns for the state of the stack and variables, which makes it simpler to visualise what's going on. And then, when the inevitable happens, keying the programs back in in is simple. On my 35s, I have a label stuck on the back listing the programs, and another documenting the flags.

R.
Find all posts by this user
Quote this message in a reply
01-31-2015, 12:29 AM
Post: #5
RE: What's This Program?
I gave a talk last year at HHC based on a series of programs written to analyze pollen/climate data from core samples.

I wrote the program in 1984 over 200 lines with about 20 subroutines, some labelled and some not. I had the cards which I transferred to my CL and then ran. It took a few days to track all the conditionals and what the routines did. Finally reconstructed it. Had I found my documentation it would have been easier.

Show us some code!

Geoff
Find all posts by this user
Quote this message in a reply
02-02-2015, 05:54 AM
Post: #6
RE: What's This Program?
Thanks, guys.

In the end, out of curiosity, I SST'ed through the 11C's program memory; I found three short programs in there and while two of them were obvious, I'm still not sure what the third does. It's probably something I cobbled together while playing around trying to understand something, and I doubt that anyone else would figure it out, either, so I don't propose to waste anyone's time by posting it.

I have a small notebook - not much bigger than a Voyager itself - in which I record short programs, plus a 3-ring binder which contains 65 program forms and other, later coding sheets for all my really important programs. Fortunately, they're almost all for the 41, so CAT 1 solves that problem, but now I'm using the 11C and 16C more, I think I'll have to be scrupulous about sticking a Post-It on the back so I know what I've got. And I have 82143A, 82162A and 82240B printers, so listings for the 41 and 71 aren't a problem.

--- Les
[http://www.lesbell.com.au]
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




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