![]() |
35s, Global Labels, and GTO a program line from RUN mode - Printable Version +- HP Forums (https://archived.hpcalc.org/museumforum) +-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: 35s, Global Labels, and GTO a program line from RUN mode (/thread-118302.html) |
35s, Global Labels, and GTO a program line from RUN mode - Les Wright - 07-13-2007 I must admit I felt a twinge of disappointment to learn the 35s accommodated only 26 single character global alpha labels. I thought that this meant that only 26 user programs could be in the calculator at any one time. On reflection I would like to suggest that the limitation is actually on the number of globally labelled program GROUPINGS, and that more routines than the limit of 26 are attainable are with a little ingenuity and admittedly a little hassle at the keypad. For example, say that within the program grouping A there exist several smaller subroutines that function as programs in their own right, each ending with a RTN. Let's say one of them starts at step A025. Now lets assume the calc is in "run" mode. Is it not feasible to execute this subroutine directly as one can similarly on the 12c, with the keytroke sequence GTO .A025 R/S? Better yet, is it feasible save a few strokes and type XEQ .A025 directly in run mode? I hope that either of these strategies would execute the desired subroutine and stop at the appropriate internal RTN. Gene, do you have any idea whether this is possible? It sort of is on the 33S, but since you need lettered labels even for internal branches and loops the strategy is pretty useless there. On the 35S it could be a great way to pack in lots of little programs. Of course, one would have to document their locations, etc. Many thanks, Les
Edited: 13 July 2007, 3:59 p.m. after one or more responses were posted
Re: 35s, Global Labels, and GTO a program line from RUN mode - David Ramsey - 07-13-2007 Quote:
Both strategies appear to work (GTO A025 R/S and XEQ A025); I just tried it.
Re: 35s, Global Labels, and GTO a program line from RUN mode - Gene Wright - 07-13-2007 Hi. If you pull down the learning module showing the indirect register packing program, you'll see how this is used. The main store/recall routine starts at step 001, but the initialization routine starts at step 070. There's also a program example of an indirect register sort routine in the main indirect register learning module. Granted, it is pretty bad as a sort goes, but hey...time was short! Basically, the answer is yes, but I think it is a bit easier than you show. The Matrix Utilities program to soon be published in Datafile has instructions like this: "2 ) To execute routine “M1” – to interchange two rows, key the two row numbers (order is unimportant) into X and Y and press XEQ M001 or XEQ M ENTER. No stack registers preserved." and "3 ) To execute routine “M2” – to multiply row “i” by the constant “k,” key “k” ENTER “i” and press XEQ M037. No stack registers preserved."
The XEQ A ENTER shortcut was a good compromise rather than having to type XEQ A001 every time you want to start at step 001. At least, I hope people think that!
Re: 35s, Global Labels, and GTO a program line from RUN mode - Les Wright - 07-13-2007 Happy me! The 35s isn't available yet here in Canada, but my favourite distributor will have it and will get one too me soon. It may be a bit overpriced compared to the US MRSP, but not nearly as much as it will be in the UK and EU.
Les Edited: 13 July 2007, 4:01 p.m.
Re: 35s, Global Labels, and GTO a program line from RUN mode - Miguel Toro - 07-13-2007 Please Les. Could you tell me where to buy a 35s here in Canada or who is this distributor? Thanks in advance.
Miguel Toro
Re: 35s, Global Labels, and GTO a program line from RUN mode - Les Wright - 07-13-2007 Larry at auctions@techcomm.ca. He is in Oakville, Ontario. Tell him I sent you!
Re: 35s, Global Labels, and GTO a program line from RUN mode - Miguel Toro - 07-13-2007 Thank you! I'll do.
Salut! :-)
Re: 35s, Global Labels, and GTO a program line from RUN mode - Les Wright - 07-13-2007 You know this may be a reasonable combination of features--one can have in the same calculator something akin to the GSB line number of the 33E/C, and the GSB label we are well used to in the 11C/15C/33S/32sii/34C/etc.
Les
Re: 35s, Global Labels, and GTO a program line from RUN mode - Gene Wright - 07-13-2007 It's actually very similar to the never released 95c. Re: 35s, Global Labels, and GTO a program line from RUN mode - Werner - 07-17-2007 Gene - I guess the 'renumbering' doesn't work across global lables? Even if it is, it would make sense to have (say) label S set aside for Subroutines, in a table fashion:
S001 GTO S020 /* first subroutine */
Then you can call them using XEQ S001, XEQ S002 etc from other global labels.
Cheers, Werner
Renumbering works *globally* - Gene Wright - 07-17-2007 Actually, the renumbering works across all labels. It really is VERY useful. Example: LBL A GTO B005 RTN LBL B ENTER ENTER ENTER 1/x RTN and then you insert a SIN instruction before the previous B005 line 1/x. The original LBL A instruction of GTO B005 is dynamically changed to GTO B006. The HP 35s really does have a lot going for it. And, I like your suggestion for structuring a subroutine global label better than I had done. It is certainly better to remember XEQ S002 than XEQ S058 or such. I really think that a global label devoted to nothing but subroutines is in the future of serious programmers' HP 35s.
Great idea! and Great Job HP! (IMO, of course).
Re: 35s, Global Labels, and GTO a program line from RUN mode - Paul Dale - 07-17-2007 Quote: I too thought of this scheme and also an extension whereby the gotos are labelled with an equation on the previous line. I.e. you goto the initial even numbered steps of S and the previous odd steps include short descriptions of what each does. Helps jog an aging memory :-)
Re: 35s, Global Labels, and GTO a program line from RUN mode - Werner - 07-18-2007 If you're going to store matrices in a general way in the indirect registers, it may be best to store a 'descriptor' of some kind (eg a 3D vector holding the number of rows, columns, and a status indicator (LU decomposed or not, matrix 'packed' or not, real/complex.. )) *after* the matrix data, to prevent the automatic reclaiming of trailing zeroes.
Werner
|