I found a sort of tricky but useful way to temporarily reassign keys
on the HP-30b. Normal key assignment is easy using program step 0,
and all keys except a few critical ones (reset, ON/CE, INPUT,etc.) are
reassignable, this includes the numeric keys. The 30b is a macro
programmable machine in the sense that keys executed in a program act
as if they were pressed on the keyboard. In particular there's no
automatic ENTER for a numeric key, so a program can be used to enter a
digit in the middle of a number, for example. Making use of the above
two features along with a conditional that doesn't need to use the
stack at all (DSE and ISG) allows for temporary reassignment of keys.
The following code demonstrates this for a program that was suggested
in this thread
Mode: RPN
Fix: 0Shift-Hold 0 starts/resets Sudoku entry mode showing digits 1-9 available.
Pressing digits 1-9 will remove that digit from the display.
When all digits have been pressed 0 is shown and Sudoku mode ends
allowing normal calculator use. Sudoku mode can also be ended by
storing 0 in register 0, this is possible since the 0 key is not redefined.
Registers used:0 - indicates mode, if greater than 1 then Sudoku mode else calculator mode
6 - 10 ^ (number of digits in new digit string)
7 - new digit string
8 - old digit string
9 - user entered digitProg 0:
0 SH0
1 2
2 STO 0
3 1
4 2
5 3
6 4
7 5
8 6
9 7
10 8
11 9
12 STO 8
13 Sudoku
14 RTN
15 Lbl 00
16 DSE 0
17 Gto 01
18 RTN
19 Lbl 01
20 STO 9
21 0
22 STO 7
23 1
24 STO 6
25 Lbl 02
26 RCL 8
27 Input
28 GF 03
29 1
30 0
31 /
32 Math | IP
33 Up |
34 Up |
35 = |
36 STO 8
37 Ans
38 Math | FP
39 Up |
40 = |
41 1
42 0
43 *
44 RCL 9
45 ?=
46 GT 02
47 Rv
48 STO + 7
49 1
50 0
51 STO / 7
52 STO * 6
53 Gto 02
54 Lbl 03
55 RCL 6
56 STO 0
57 RCL * 7
58 STO 8
59 Sudoku
60 RTNbytes.checksum: 103.018
Prog 1:
0 1
1 1
2 Gto 00Prog 2:
0 2
1 2
2 Gto 00Prog 3:
0 3
1 3
2 Gto 00Prog 4:
0 4
1 4
2 Gto 00Prog 5:
0 5
1 5
2 Gto 00Prog 6:
0 6
1 6
2 Gto 00Prog 7:
0 7
1 7
2 Gto 00Prog 8:
0 8
1 8
2 Gto 00Prog 9:
0 9
1 9
2 Gto 00
-Katie