PANAME X/Y utility

PANAME X/Y utility

Postby mbrethen » Mon Nov 09, 2026 4:01 pm

There is a nice utility on the PANAME module labeled "X/Y". It prompts the user for a "y" or "n" keypress and then executes the line after the xeq, in the affirmative, or skips it in the negative. I'd like to use this with some of my own programs. I tried to copy the program to the calculator which resulted in a nonexistent message. If I can't copy it to the calculator, could a similar program be written? Other topics I have found don't mimic this utility.

Code: Select all
;
; Input yes/no routine
;
LBL "Y/N"
8
ALENG
–
LBL 05
>" "
DSE X
GTO 05
>"Y/N?"
LBL 00
AVIEW      ; Display question and get answer
GETKEY      ; Yes or no?
SF 25      ; Ignore invalid key error
GTO IND X
SIZE?
DSE X
STO 00
ASTO IND X
ASHF
DSE X
ASTO IND X
"WHAT ?"
AVIEW
PSE
CLA
RCL 00
ARCL IND X
DSE X
ARCL IND X
GTO 00
LBL 71      ; returned 71 for the Y key
1      ; Enter 1
RTN
LBL 41      ; returned 41 for the N key
.      ; Enter 0
END


This code formats and displays the question (up to 7 characters) and uses GETKEY for the user response. It even alerts the user if they pressed the wrong key. A 1 or 0 is left in the X-register, depending on the y or n keypress. I don't know how to implement an X=Y? type behavior when the subroutine returns to the main program.
mbrethen
.
.
 
Posts: 2
Joined: Mon Oct 19, 2026 4:21 pm

Re: PANAME X/Y utility

Postby mike-stgt » Mon Nov 09, 2026 10:12 pm

mbrethen wrote:I tried to copy the program to the calculator which resulted in a nonexistent message.

nonexistent message may indicate
i) there is no "X/Y" program in none of the plugged modules (in actual fact, Usr Mnl of the PANAME does not describe "X/Y"), or
ii) "X/Y" is a microcode function but the HP-41 may only copy user programs. In CAT 2 user programs are prefixed by a superscript "T".

I don't know how to implement an X=Y? type behavior when the subroutine returns to the main program.

In lieu of returning 0 or 1 in the X register, how about using a flag, maybe one that has an annunciator in the display? Instead of 0 clear the flag, instead of 1 set it. In the calling routine simply test that flag.
mike-stgt
.........
.........
 
Posts: 207
Joined: Tue Dec 24, 2019 12:12 pm

Re: PANAME X/Y utility

Postby mbrethen » Mon Nov 09, 2026 11:00 pm

Its listed under the "- MISCELLANEOUS FUNCTIONS -" (p. 108). I have used it with the module installed in the i41CX+ iPhone app. One thing I don't like is some HP functions like "ALENG" or "GETKEYX" used in a focal program end up with XROM assignments to that module. Is it possible to copy mcode from a rom?
mbrethen
.
.
 
Posts: 2
Joined: Mon Oct 19, 2026 4:21 pm

Re: PANAME X/Y utility

Postby mike-stgt » Tue Nov 10, 2026 4:33 am

mbrethen wrote:Its listed under the "- MISCELLANEOUS FUNCTIONS -" (p. 108).

Sorry, it is not. On p. 108 I find a Y/N function described, but no X/Y.

Is it possible to copy mcode from a rom?

Yes, but you need an extra "QROM" device to hold a copy usabel by the HP-41. Since the HP-41 does not comply to the von Neumann architecture you can't copy ROM content to its RAM (in fact you can, but not in a format executable by the HP-41).
mike-stgt
.........
.........
 
Posts: 207
Joined: Tue Dec 24, 2019 12:12 pm


Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest