Skip to content

Commit 205579d

Browse files
authored
Merge pull request #23 from bxparks/develop
merge 0.11.0 into master
2 parents e947b19 + 7697c71 commit 205579d

File tree

639 files changed

+9417
-5180
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

639 files changed

+9417
-5180
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,9 @@ wheels/
4343
*.egg
4444
MANIFEST
4545
*.app
46+
47+
#-------------------------------------------------------------------------
48+
# C artifacts
49+
#-------------------------------------------------------------------------
50+
51+
*.out

CHANGELOG.md

Lines changed: 91 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,95 @@
11
# Changelog
22

33
- Unreleased
4-
- Supports resizing the number of storage registers
5-
- `MODE` > `SIZE` command supports a minimum of 25 to a maximum of 100
6-
- `MODE` > `SIZ?` returns the current size of storage registers
4+
- 0.11.0 (2024-05-28)
5+
- **Warning**: Previously saved RPN stack and storage registers are
6+
incompatible and are lost when upgrading to this version.
7+
- support resizing the number of storage registers
8+
- `MODE > RSIZ` command supports a minimum of 25 to a maximum of 100
9+
- `MODE > RSZ?` returns the current size of storage registers
710
- size of the `RPN83REG` appVar varies:
8-
- 496 bytes at SIZE=25
9-
- 1921 bytes at SIZE=100
11+
- 500 bytes at RSIZ=25
12+
- 1925 bytes at RSIZ=100
13+
- support resizing the RPN stack size
14+
- `MODE > SSIZ` command supports a minimum of 4 to a maximum of 8
15+
- `MODE > SSZ?` returns the current size of stack
16+
- size of the `RPN83STK` appVar varies:
17+
- 120 bytes at SSIZ=4
18+
- 196 bytes at SSIZ=8
19+
- add additional stack operators
20+
- soft menu `DROP`
21+
- drops the stack by one, duplicating the top register
22+
- already implemented in the code, just exposing the functionality
23+
to the user
24+
- soft menu `DUP`
25+
- lifts the stack by one, duplicating X (similar to `ENTER` without
26+
disabling the stack-lift)
27+
- already implemented in the code, just exposing the functionality
28+
to the user
29+
- button `2ND u`
30+
- bound to the `RollUp` functionality, same as the existing `RollUp`
31+
soft menu item
32+
- becomes useful when the stack size `SSIZ` is greater than 4
33+
- DATE
34+
- simplify DATE menu hierarchy
35+
- move RTC (hardware clock) menus and TZ config menus under new CLK
36+
menu folder
37+
- move DSHK, DEXD, DCUT, DLNK menu items under new DOPS menu folder
38+
- support arithmetic operations on Offset
39+
- {Offset} + {hours}, {hours} + {Offset}
40+
- {Offset} - {hours}
41+
- {Offset} - {Offset} => {hours}
42+
- plus the same operations with {hours} replaced with an appropriate
43+
{Duration} (in multiples of 15 minutes)
44+
- STAT
45+
- extract the 13 STAT registers (R11-R23) from regular storage registers
46+
(appVar `RPN83REG`) into its own registers (appVar `RPN83STA`)
47+
- add `Σ` (Sigma) menu folder containing various `ΣXXX` menu items to
48+
recall the 13 stat registers (essentially the same as the Plus42 app)
49+
- See [USER_GUIDE_STAT.md](docs/USER_GUIDE_STAT.md)
50+
- BASE
51+
- format HEX numbers in groups of 2 digits for readability
52+
- format OCT numbers in groups of 3 digits for readability
53+
- format BIN numbers in groups of 4 digits using small font,
54+
allowing 16 digits to be displayed on a single line
55+
- no digit grouping for DEC numbers (no change)
56+
- move formatting routines to Flash Page 2
57+
- See [USER_GUIDE_BASE.md](docs/USER_GUIDE_BASE.md)
58+
- show MenuFolders using a file folder icon
59+
- fixes [Issue#20](https://github.com/bxparks/rpn83p/issues/20)
60+
- draw a small 5px wide line above the menu box if the menu is a folder
61+
- inspired by the menus on the HP-48 series calculators
62+
- change cursor to be rectangular block, instead of an underline, to
63+
avoid visual conflict with the short dash line of menu folders just
64+
below the editing line
65+
- support insertion cursor using `LEFT` and `RIGHT` arrow keys
66+
- support `2ND LEFT` (beginning of line) and `2ND RIGHT` (end of line)
67+
key bindings
68+
- update CHS `(-)` to change the sign of the interior number component
69+
identified by the cursor instead of the right most component in the
70+
inputBuf
71+
- this allows easier correction of typos during long input
72+
- storage formats
73+
- encode RpnObject type field using 2 bytes instead of 1 byte
74+
- allows additional RpnObjects in the future without violating the
75+
83 Plus SDK documentation
76+
- update storage format of the TIOS appVars (RPN83SAV, RPN83STA,
77+
RPN83STK, RPN83REG)
78+
- makes adding additional appVar types in the future easier
79+
- **Bug Fix** More robust data validation for appVars
80+
- add `schemaVersion` field for RpnElementList
81+
- add `rpnVarType` field, to allow future appVar types
82+
- validate size of RpnElementList appVar has no extraneous bytes
83+
- **Bug Fix** Validate Duration objects entered through colon-modifier
84+
syntax
85+
- prevents entry of things like `61:S` or `25:H`
86+
- **Bug Fix** Display error for negative numbers correctly for BASE mode
87+
when WSIZ < 32
88+
- If the floating point number is negative, the validation for
89+
determining if the WSIZ is exceeded was incorrectly handled. Which
90+
caused negative numbers to be displayed with `...` instead of `-`, but
91+
the bug occurred only for WSIZ < 32.
92+
- Fixed so that `-` is correctly displayed for all WSIZ.
1093
- 0.10.0 (2024-03-31)
1194
- **Bug Fix** Fix broken `CLRG`
1295
- broke when 'REGS' was replaced by 'RPN83REG'
@@ -38,9 +121,9 @@
38121
`IMAG`, `CONJ`, `CABS`, `CANG`)
39122
- fixes [Issue#16](https://github.com/bxparks/rpn83p/issues/16)
40123
- RPN83P now consumes 3 flash pages (48 kiB)
41-
- Verify compatibility with TI-Nspire with TI-84 Plus keyboard
42-
- works with TI-Nspire with the TI-84 keyboard emulates the Z80
43-
processor
124+
- Verify compatibility with TI-Nspire with TI-84 Plus Keypad
125+
- the TI-84 Plus Keypad causes the ARM processor to emulate a Z80
126+
processor and the whole calculator essentially becomes a TI-84+SE
44127
- Store and recall TI-OS single-letter variables
45128
- TI-OS supports 27 single-letter variables (A-Z, Theta) for real and
46129
complex numbers

README.md

Lines changed: 51 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3,46 +3,52 @@
33
RPN calculator app for the TI-83 Plus and TI-84 Plus inspired by the HP-42S.
44

55
RPN83P is an [RPN](https://en.wikipedia.org/wiki/Reverse_Polish_notation)
6-
calculator app for the [TI-83 Plus](https://en.wikipedia.org/wiki/TI-83_series)
7-
(including the Silver Edition) and the [TI-84
8-
Plus](https://en.wikipedia.org/wiki/TI-84_Plus_series) (including the Silver
9-
Edition). The app is inspired mostly by the
10-
[HP-42S](https://en.wikipedia.org/wiki/HP-42S) calculator, with some significant
11-
features from the
6+
calculator app for the [TI-83 Plus
7+
series](https://en.wikipedia.org/wiki/TI-83_series) and the [TI-84 Plus
8+
series](https://en.wikipedia.org/wiki/TI-84_Plus_series) calculators. The app is
9+
inspired mostly by the [HP-42S](https://en.wikipedia.org/wiki/HP-42S)
10+
calculator, with some significant features from the
1211
[HP-12C](https://en.wikipedia.org/wiki/HP-12C) and the
13-
[HP-16C](https://en.wikipedia.org/wiki/HP-16C).
12+
[HP-16C](https://en.wikipedia.org/wiki/HP-16C). RPN83P also hopes to be the
13+
easiest and cheapest gateway app that introduces new users to the beauty and
14+
power of RPN calculators.
1415

15-
16-
The RPN83P is a flash application written in Z80 assembly language that consumes
17-
3 pages (48 kiB) of flash memory. Since it is stored in flash, it is preserved
18-
if the RAM is cleared. It consumes about 735 bytes of TI-OS RAM through 3
19-
AppVars: `RPN83REG` (496 bytes), `RPN83STK` (116 bytes), and `RPN83SAV` (123
20-
bytes).
16+
RPN83P is a flash application written in Z80 assembly language that consumes 3
17+
pages (48 kiB) of flash memory. Since it is stored in flash, it is preserved if
18+
the RAM is cleared. It consumes about 1025 to 2535 bytes of TI-OS RAM through 4
19+
AppVars, depending on the number of storage registers: `RPN83REG` (500 to 1925
20+
bytes), `RPN83SAV` (142 byte), `RPN83STA` (272 bytes), and `RPN83STK` (120 to
21+
196 bytes).
2122

2223
Summary of features:
2324

24-
- traditional 4-level RPN stack (`X`, `Y`, `Z`, `T`), with `LastX` register
25-
- 8-line display showing all stack registers
25+
- traditional RPN stack (`X`, `Y`, `Z`, `T`), with `LASTX` register
26+
- configurable stack levels between 4 and 8: `SSIZ`, `SIZ?`
27+
- input edit line with scrollable cursor using arrow keys
28+
- `LEFT`, `RIGHT`, `2ND LEFT`, `2ND RIGHT`
29+
- 8-line display showing 4 stack registers
2630
- hierarchical menu system similar to HP-42S
2731
- quick reference `HELP` menu
2832
- storage registers and variables
2933
- store and recall:`STO nn`, `RCL nn`
3034
- storage arithmetics: `STO+ nn`, `STO- nn`, `STO* nn`, `STO/ nn`, `RCL+
3135
nn`, `RCL- nn`, `RCL* nn`, `RCL/ nn`
32-
- 25 storage registers: `nn = 00..24`
36+
- up to 100 numerical storage registers (`nn = 00..99`, default 25)
3337
- 27 single-letter variables (`nn = A..Z,Theta`)
38+
- configurable number of storage registers: `RSIZ`, `RSZ?`
3439
- all math functions with dedicated buttons on the TI-83 Plus and TI-84 Plus
3540
- arithmetic: `/`, `*`, `-`, `+`
3641
- algebraic: `1/X`, `X^2`, `SQRT`, `^` (i.e. `Y^X`)
3742
- transcendental: `LOG`, `10^X`, `LN`, `e^X`
3843
- trigonometric: `SIN`, `COS`, `TAN`, `ASIN`, `ACOS`, `ATAN`
39-
- constants: `pi` and `e`
44+
- constants: `PI` and `E`
4045
- additional menu functions
4146
- arithmetic: `%`, `%CH`, `GCD`, `LCM`, `PRIM` (prime factor), `IP` (integer
4247
part), `FP` (fractional part), `FLR` (floor), `CEIL` (ceiling), `NEAR`
4348
(nearest integer), `ABS`, `SIGN`, `MOD`, `MIN`, `MAX`
44-
- algebraic: `X^3`, `3RootX`
45-
- transcendental: `XRootY`,`2^X`, `LOG2`, `LOGB`, `E^X-` (e^x-1), `LN1+`
49+
- rounding: `RNDF`, `RNDN`, `RNDG`
50+
- algebraic: `X^3`, `3ROOTX`
51+
- transcendental: `XROOTY`,`2^X`, `LOG2`, `LOGB`, `E^X-` (e^x-1), `LN1+`
4652
(log(1+x))
4753
- trigonometric: `ATN2`
4854
- hyperbolic: `SINH`, `COSH`, `TANH`, `ASNH`, `ACSH`, `ATNH`
@@ -72,16 +78,16 @@ Summary of features:
7278
- time value of money (TVM), inspired by HP-12C, HP-17B, and HP-30b
7379
- `N`, `I%YR`, `PV`, `PMT`, `FV`, `P/YR`, `BEG`, `END`, `CLTV` (clear TVM)
7480
- complex numbers, inspired by HP-42S and HP-35s
75-
- stored in RPN stack registers (`X`, `Y`, `Z`, `T`, `LastX`) and storage
81+
- stored in RPN stack registers (`X`, `Y`, `Z`, `T`, `LASTX`) and storage
7682
registers `R00-R24`
7783
- result modes: `RRES` (real results), `CRES` (complex results)
7884
- display modes: `RECT`, `PRAD` (polar radians), `PDEG` (polar degrees)
7985
- linking/unlinking: `2ND LINK` (convert 2 reals to 1 complex, same as
8086
`COMPLEX` on HP-42S)
8187
- number entry: `2ND i` (rectangular), `2ND ANGLE` (polar degrees), `2ND
8288
ANGLE 2ND ANGLE` (polar radians)
83-
- extended regular functions: `+`, `-`, `*`, `/`, `1/x`, `x^2`, `SQRT`,
84-
`Y^X`, `X^3`, `3RootY`, `XRootY`, `LOG`, `LN`, `10^x`, `e^x`, `2^x`,
89+
- extended regular functions: `+`, `-`, `*`, `/`, `1/X`, `X^2`, `SQRT`,
90+
`Y^X`, `X^3`, `3ROOTY`, `XROOTY`, `LOG`, `LN`, `10^X`, `E^X`, `2^X`,
8591
`LOG2`, `LOGB`
8692
- complex specific functions: `REAL`, `IMAG`, `CONJ`, `CABS`, `CANG`
8793
- unsupported: trigonometric and hyperbolic functions (not supported by
@@ -106,7 +112,7 @@ Missing features (partial list):
106112
- vectors and matrices
107113
- keystroke programming
108114

109-
**Version**: 0.10.0 (2024-03-31)
115+
**Version**: 0.11.0 (2024-05-28)
110116

111117
**Changelog**: [CHANGELOG.md](CHANGELOG.md)
112118

@@ -143,7 +149,7 @@ Guide](docs/USER_GUIDE.md), but here is the quick version:
143149
- Windows or MacOS: [TI Connect](https://education.ti.com/en/products/computer-software/ti-connect-sw)
144150
- Linux: [tilp](https://github.com/debrouxl/tilp_and_gfm) (`$ apt install
145151
tilp2`)
146-
- Run the program using the `APPS`:
152+
- Run the program using the `APPS` button:
147153
- Press `APPS`
148154
- Scroll down to the `RPN83P` entry
149155
- Press `ENTER`
@@ -166,8 +172,12 @@ This app was designed for TI calculators using the Z80 processor:
166172
hardware clock)
167173
- TI-84 Plus Silver Edition (6/15 MHz Z80, 24 kB accessible RAM, 1.5 MB
168174
accessible flash, hardware clock)
169-
- TI-Nspire with TI-84 Plus Keyboard (32-bit ARM processor emulating a Z80, 24
175+
- TI-Nspire with TI-84 Plus Keypad (32-bit ARM processor emulating a Z80, 24
170176
kB accessible RAM, 1.5 MB accessible flash, hardware clock)
177+
- **Note**: When uploading the `rpn83p.8xk` file from the PC to the Nspire,
178+
you need to select "TI-84 Plus" as the calculator model on the PC instead
179+
of "TI-Nspire". That's because the Nspire is emulating a TI-84+ and the PC
180+
cannot tell the difference.
171181

172182
The app configures itself to run at 15 MHz on supported hardware, while
173183
remaining at 6 MHz on the TI-83+.
@@ -177,7 +187,7 @@ I have tested it on the following calculators that I own:
177187
- TI-83 Plus (OS v1.19)
178188
- TI-83 Plus Silver Edition (OS v1.19)
179189
- TI-84 Plus Silver Edition (OS v2.55MP)
180-
- TI-Nspire with TI-84 Plus Keyboard (OS v2.46)
190+
- TI-Nspire with TI-84 Plus Keypad (OS v2.46)
181191

182192
Community members have verified that it works on the following variants:
183193

@@ -207,8 +217,8 @@ outwards. Enter the following keystrokes:
207217
- Press `2` button
208218
- Press `.` button
209219
- Press `1` button
210-
- Press `x^2` button
211-
- Press `2ND` `ANS` button (invokes the `LastX` functionality)
220+
- Press `X^2` button
221+
- Press `2ND` `ANS` button (invokes the `LASTX` functionality)
212222
- Press `*` button (`r^3` is now in the `X` register)
213223
- Press `2ND` `PI` button (above the `^` button)
214224
- Press `*` button (`pi r^3`)
@@ -223,7 +233,7 @@ Here is an animated GIF that shows this calculation:
223233
![RPN83P Example 1 GIF](docs/images/rpn83p-example1.gif)
224234

225235
(Note that the RPN83P provides a `X^3` menu function that could have been used
226-
for this formula, but I used the `LastX` feature to demonstrate its use.)
236+
for this formula, but I used the `LASTX` feature to demonstrate its use.)
227237

228238
### Example 2
229239

@@ -235,7 +245,7 @@ and `65`, then see the result as an octal number (base-8), a binary number
235245
(base-2), then right shift the result 3 bits which sets the Carry Flag, then
236246
view the final result as a decimal number:
237247

238-
- Press `MATH` to reset the menu to the home row.
248+
- Press the `MATH` button to reset the menu to the home row.
239249
- Navigate the menu with the DOWN arrow to get to
240250
![ROOT MenuRow 2](docs/images/menu-root-2.png)
241251
- Press `BASE` menu to get to
@@ -244,22 +254,22 @@ view the final result as a decimal number:
244254
![BASE Menu HEX](docs/images/menu-root-base-hex.png)
245255
- Press `ALPHA` `B` buttons
246256
- Press `6` button
247-
- Press `ENTER` button
257+
- Press `ENTER` button (`X` shows `00 00 00 B6`)
248258
- Press `6` button
249259
- Press `5` button
250260
- Press DOWN arrow to get to the menu row with the `AND` menu item
251261
![BASE MenuRow AND](docs/images/menu-root-base-2.png)
252-
- Press `AND` menu, the `X` register should show `00000024`
262+
- Press `AND` menu, the `X` register should show `00 00 00 24`
253263
- Press UP arrow to go back to
254264
![BASE Menu HEX](docs/images/menu-root-base-hex.png)
255-
- Press `OCT` menu, the `X` register should show `00000000044` with the menu
265+
- Press `OCT` menu, the `X` register should show `00 000 000 044` with the menu
256266
showing ![BASE Menu OCT](docs/images/menu-root-base-oct.png)
257-
- Press `BIN` menu, the `X` register should show `00000000100100` with the menu
258-
showing ![BASE Menu BIN](docs/images/menu-root-base-bin.png)
267+
- Press `BIN` menu, the `X` register should show `0000 0000 0010 0100` with the
268+
menu showing ![BASE Menu BIN](docs/images/menu-root-base-bin.png)
259269
- Press DOWN DOWN (twice) to the menu row with the shift right `SR` item
260270
![BASE MenuRow SR](docs/images/menu-root-base-3.png)
261-
- Press `SR` `SR` `SR` (three times) to show `00000000000100` and the Carry Flag
262-
`C` set
271+
- Press `SR` `SR` `SR` (three times) to show `0000 0000 0000 0100` and the Carry
272+
Flag `C` set
263273
- Press UP UP (twice) to reach the base conversion menu row
264274
![BASE Menu BIN](docs/images/menu-root-base-bin.png)
265275
- Press `DEC` menu, the `X` register should show `4` with the menu showing
@@ -283,7 +293,7 @@ In this example:
283293

284294
Here are the steps:
285295

286-
- Press `MATH` to reset the menu to the home row.
296+
- Press the `MATH` button to reset the menu to the home row.
287297
- Navigate the menu with the DOWN arrow to get to
288298
![ROOT MenuRow 2](docs/images/menu-root-2.png)
289299
- Press the `TVM` menu to get to
@@ -304,7 +314,7 @@ Here are the steps:
304314
- You should see `-3326.512476` ($3326.51)
305315
- Press `-3000` `PMT`
306316
- Press `I%YR`
307-
- After a couple of seconds, you should see 6.006990008 (6%).
317+
- After a slight delay, you should see 6.006990008 (6%).
308318

309319
Here is the animated GIF that shows this calculation:
310320

@@ -325,7 +335,7 @@ the 4 ways that complex numbers can be entered into RPN83P:
325335
The keystrokes are:
326336

327337
- (optional) Press `CLEAR CLEAR CLEAR` to clear the RPN stack.
328-
- Press `MODE` `downarrow` `RECT`:
338+
- Press `MODE` button, `downarrow`, `RECT`:
329339
![MODE MenuRow 2](docs/images/menu-root-mode-2.png)
330340
- Press `100` `ENTER`
331341
- Press `2` `PI` `*` `60` `*` `1 EE 5` `(-)` `*` `1/X` `(-)` (-265.26)
@@ -336,7 +346,7 @@ The keystrokes are:
336346
- Press `4` `/` (173.89+12.35i)
337347
- Press `PRAD` (174.30 e^(i 0.07)
338348
- Press `PDEG` (174.30 e^(i 4.04deg))
339-
- Press `MATH` `CPLX`:
349+
- Press `MATH` button `CPLX`:
340350
![CPLX MenuRow 1](docs/images/menu-root-cplx-1.png)
341351
- Press `CABS` (174.30)
342352

0 commit comments

Comments
 (0)