Post Reply 
Swapping Registers on HP calculators
03-29-2024, 12:29 AM
Post: #11
RE: Swapping Registers on HP calculators
.
Hi again, n1msr,

n1msr Wrote:I just found the manual page for the 15c that confirms that "f USER" is not a programmable function :-(

It doesn't need to be. Save for e.g. establishing the A-E keys as directly calling LBL A-E instead of using GSB A-E, I see no other use for it being programmable, as all the user-STO (uSTO), user-RCL (uRCL), etc. storage/recall instructions are programmable and effective on a per-instruction basis.

uSTO, which is entered into program memory when you are in User Mode, will automatically advance matrix indexes, from row to row, from one element to the next, while also having skip-if-done capabilities. Same for uRCL and all other such instructions.

On the other hand, plain-vanilla STO, which is entered into program memory when you are not in User Mode, simply stores the value and does not affect indexes nor has skip-if-done capabilities, it just stores the value, period.

Quote:(I would have liked USER mode ON to initialise the arrays, where the R1 value is automatically incremented.

Well, do it. Set User Mode active out of program mode, then enter program mode and key in as many uSTO and uRCL as you need, they will have the desired automations when executed afterwards. For other STO and RCL that you'd rather not automatically do anythin (update indexes, skip the next instruction when done), simply set User Mode deactivated out of program mode, then enter program mode and key in as many plain STO and RCL as needed, they will simply store/recall the value when executed and nothing else.

In other words, you can have any mix of uSTO/uRCL and STO/RCL as needed in the same program, as you see fit. The "u" ones must be keyed in in program mode while User mode is active, the plain ones must me keyed in in program mode while User mode is deactivated.

Note this: at execution time, when the program is being executed, none of these instructions will be affected by the current status of User Mode at the time they are executed: the "u" instructions will do automation regardless, the plain ones will not, period.

Quote:However, I would prefer that R1 is NOT auto-incremented in other areas of the program such as the SWAP and two subroutines that I have not shared, where I need to increment and decrement an element of the B matrix.)

Good. Do as I told you in the preceding paragraph, enter those STO/RCL into program memory while out of User Mode, they'll appear in program memory without the "u". Thus, there will be sections of your program with uSTO/uRCL and other sections with plain STO/RCL, merrily living together in love and harmony.

Quote:A possible 'quirk' of the HP15? If I want to add an element of matrix A to the number on the stack (X) in a program, it seems that I have to have a NOP (or duplicate the key operation) to get it to work. I think this is a "feature" of the 15c because [...]

As happened to you with Werner a few messages above, there's no such quirk in the HP-15C but in your understanding on how User Mode works with storage & recall operations. What is happening here is that you're incorrectly using an uRCL operation where a plain RCL would be needed and that's why the subsequent operation is skipped.

I'd suggest you read the HP-15C manual carefully and thoroughly because it's plainly obvious that you do not understand the subject matter as you'd need. Instead, you're assuming that Werner didn't had his calculator at hand or that the HP-15C has a "quirk".

Not so. Heed my advice and read and understand the manual before putting the blame on someone/something else, least you'd risk upsetting people and getting little help here.

V.

  
All My Articles & other Materials here:  Valentin Albillo's HP Collection
 
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Swapping Registers on HP calculators - Valentin Albillo - 03-29-2024 12:29 AM



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