WP43 KEYG and KEYX issue
I was trying to build some programmable menus when I realized that the issue I reported back
in January is still there, which makes building programmable menus quite cumbersome compared to the HP-42S:
dlachieze wrote: ↑Sat Jan 08, 2022 2:20 pm
- KEYG and KEYX expect to have the key label in K so when you want to define a soft key you need to do for example:
It would be better for KEYG and KEYX to get the key label from X and to do the drop automatically
The issue is that strings on the WP43 are directly entered in the X register as there is no dedicated Alpha register, but KEYG and KEYX doesn’t take the key label from X but from K, which is doubling the number of steps you need to define a programmable menu key, from 2 steps to 4 steps.
I don't understand why according the WP43 OM 0.23.1 (page 57): "K is also the default alpha register for some special operations (see pp. 245f)." Some remnant from a vanished early alpha mode?
Compare this extract from the HP-42S manual page 147 (21 steps, stack content not modified, alpha register content lost):
Code: Select all
01 LBL "YEAR"
02 LBL A
03 "JAN"
04 KEY 1 XEQ 01
05 "FEB"
06 KEY 2 XEQ 02
07 "MAR"
08 KEY 3 XEQ 03
09 "APR"
10 KEY 4 XEQ 04
11 "MAY"
12 KEY 5 XEQ 05
13 "JUN"
14 KEY 6 XEQ 06
15 KEY 7 GTO B
16 KEY 8 GTO B
17 KEY 9 GTO 99
18 MENU
18 LBL 20
20 STOP
21 GTO 20
with the same thing done on the WP43 (33 steps (57% increase) - with top stack level and register K content lost):
Code: Select all
01 LBL "YEAR"
02 LBL A
03 "JAN"
04 STO K
05 DROP
06 KEY 1 XEQ 01
07 "FEB"
08 STO K
09 DROP
10 KEY 2 XEQ 02
11 "MAR"
12 STO K
13 DROP
14 KEY 3 XEQ 03
15 "APR"
16 STO K
17 DROP
18 KEY 4 XEQ 04
19 "MAY"
20 STO K
21 DROP
22 KEY 5 XEQ 05
23 "JUN"
24 STO K
25 DROP
26 KEY 6 XEQ 06
27 KEY 7 GTO B
28 KEY 8 GTO B
29 KEY 9 GTO 99
30 MENU
31 LBL 20
32 STOP
33 GTO 20
So I reiterate my question: would it be possible for KEYG and KEYX to get the key label from X instead of K and to do the drop automatically to go back to a two steps process to define a programmable menu key, as on the HP-42S?