The Museum of HP Calculators

HP Forum Archive 14

[ Return to Index | Top of Index ]

hp 33s programming
Message #1 Posted by marcus channell on 4 Apr 2004, 12:55 p.m.

does anybody know if there is a way to get around the limited number of LABELS you can use. right now only A...Z are allowed. I need more for the programs I am using.

      
Re: hp 33s programming
Message #2 Posted by Bram on 4 Apr 2004, 2:21 p.m.,
in response to message #1 by marcus channell

I'm not familiar with HP33S, but with my HP29C I used several labels twice when I needed more than the maximum of ten. When the one GTO would skip only a few lines and another would do the same thing elsewhere, I could give them both the same label number. GTO doesn't scan from the beginning of the program, but from its own line downwards. Perhaps something similar is possible for you?

            
Re: hp 33s programming
Message #3 Posted by Andrés C. Rodríguez (Argentina) on 4 Apr 2004, 4:26 p.m.,
in response to message #2 by Bram

I have no direct experience with the 33s but, based on previous posts, I understand that duplicated labels are not allowed. There is an article by Paul Brogger on the Articles forum, with ideas about this issue.

                  
Re: hp 33s programming
Message #4 Posted by Brent on 4 Apr 2004, 4:41 p.m.,
in response to message #3 by Andrés C. Rodríguez (Argentina)

There are several ways of reducing the number of labels
used. If the subroutine (Label) is short you can use
a conditional statement before each statement.
You can do it in a long subroutine, as well, but it gets
messy and not very elegant. For example, flags 1 thru
6 are user defined; You could use those in conditional
tests to perform subroutines without using a label.
You can also use no labels and have RTN statements at
the end of each individual routine and then use the
GTO. nnn to move the program cursor at the beginning
of a routine. Unfortunately that cannot be programmed.

...just some ideas.

Brent

      
Re: hp 33s programming
Message #5 Posted by Norris on 4 Apr 2004, 6:06 p.m.,
in response to message #1 by marcus channell

You can't use duplicate labels on the 33S.

If you have a lot of small programs, you can save labels by using GTO . [line number] R/S to launch them, instead of XEQ [label].

Say you have 10 different programs. Start the first one at line A 0000, the second at line A 0100, the third at line A 0200, etc. Don't label the beginning of the program. Fill in any extra lines between programs with RTN statements.

Then to start the second program, you would enter:

GTO . A 0100, followed by R/S

The GTO will move the program pointer to line A 0100, and the R/S will start the program that begins there. It's not as easy as typing XEQ A, but it works


[ Return to Index | Top of Index ]

Go back to the main exhibit hall