Skip to content

Commit e947b19

Browse files
authored
Merge pull request #21 from bxparks/develop
merge v0.10.0 into master
2 parents 2172579 + d6cca79 commit e947b19

File tree

802 files changed

+22698
-7209
lines changed

Some content is hidden

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

802 files changed

+22698
-7209
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
#-------------------------------------------------------------------------
2+
# Pandoc image reprocessing intermediate files
3+
#-------------------------------------------------------------------------
4+
5+
docs/resized/
6+
17
#-------------------------------------------------------------------------
28
# TI-83 Plus, TI-84 Plus assembly program files
39
#-------------------------------------------------------------------------

CHANGELOG.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,86 @@
11
# Changelog
22

3+
- 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
7+
- size of the `RPN83REG` appVar varies:
8+
- 496 bytes at SIZE=25
9+
- 1921 bytes at SIZE=100
10+
- 0.10.0 (2024-03-31)
11+
- **Bug Fix** Fix broken `CLRG`
12+
- broke when 'REGS' was replaced by 'RPN83REG'
13+
- **Bug Fix** Parse floating numbers equivalent to 0.0 more correctly.
14+
- The canonical internal representation of 0.0 in TI-OS has an exponent
15+
value of `$80` (i.e. 0), with all mantissa digits set to `0`.
16+
- The previous code set the mantissa digits correctly, but incorrectly
17+
set the exponent to `$7F` or some other value depending on the
18+
position of the decimal point relative to the `0` digits.
19+
- It made almost no difference because various floating point routines
20+
seem to canonicalize the exponent to the correct `$80` before
21+
continuing.
22+
- However, in an upcoming feature, the validation `CkPosInt()` is called
23+
before canonicalization can take place, the `CkPosInt()` returns an
24+
incorrect result.
25+
- The fix correctly detects all variations of a 0.0 (e.g. an empty
26+
string "", "0.0", "000.0", "-000.000E1", "00.00E0") and correctly
27+
returns the canonical representation of 0.0 which works with
28+
`CkPosInt()`.
29+
- **Bug Fix** Validate data type for `STAT` functions
30+
- allow only Real numbers for `Sigma+` and `Sigma-`
31+
- **Bug Fix** Validate data type for `TVM` functions
32+
- allow only Real numbers for TVM functions
33+
- **Bug Fix** Validate data type for `%` function
34+
- allow only Real numbers for `X` and `Y`
35+
- **Bug Fix** Validate data type when storing to `ANS` upon app exit
36+
- allow only Real or Complex numbers to stored to `ANS`
37+
- **Bug Fix** Support real arguments for `CPLX` menu functions (`REAL`,
38+
`IMAG`, `CONJ`, `CABS`, `CANG`)
39+
- fixes [Issue#16](https://github.com/bxparks/rpn83p/issues/16)
40+
- 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
44+
- Store and recall TI-OS single-letter variables
45+
- TI-OS supports 27 single-letter variables (A-Z, Theta) for real and
46+
complex numbers
47+
- extend `STO`, `RCL`, `STO{op}`, and `RCL{op}` to accept a
48+
single-letter in addition to digits (e.g. `STO ALPHA A`, `RCL+
49+
ALPHA B`)
50+
- Add `RNDF`, `RNDN`, `RNDG` rounding functions
51+
- `RNDF`: round to current FIX/SCI/ENG digits
52+
- `RNDN`: round to user-specified `N` digits (0-9)
53+
- `RNDG`: round to 10 digits, removing guard digits
54+
- Change complex number type error to `Err:DataType`
55+
- when a function does not accept a complex number, an error message is
56+
shown
57+
- change the message from `Err:Domain` to `Err:DataType`
58+
- Add `MODE` option to invert the behavior of `,` and `2ND EE` button
59+
- previously, both the `,` button and `2ND EE` button were mapped to
60+
`EE`, to make entry of floating point numbers with exponents easier.
61+
- But the new Date/Time records require the `,` button for entry.
62+
- add 2 selectors into `MODE` menu:
63+
- `,EE` causes the button to behave as labeled (default)
64+
- `EE,` inverts the mapping, so that `,` invokes the `EE` function,
65+
and `2ND EE` invokes the `,` function
66+
- allows the end user to select the most convenient behavior.
67+
- Update menu compiler and menu routines to support more than 255 items.
68+
- move most menu routines into Flash Page 1.
69+
- add date functions
70+
- date, time, datetime, timezone, and hardware clock
71+
- add or subtract dates, times, datetimes
72+
- convert datetime to different timezones
73+
- convert between datetime and epochseconds
74+
- support alternate Epoch dates (Unix, NTP, GPS, TIOS, Y2K, custom)
75+
- set and retrieve datetime from the hardware clock (84+/84+SE only)
76+
- display time and date objects in RFC 3339 (ISO 8601) format
77+
- see [RPN83P User Guide: DATE](docs/USER_GUIDE_DATE.md)
78+
- increase performance of `PRIM` (prime factor) function by 40-50%.
79+
- see [RPN83P User Guide: Prime
80+
Factors](docs/USER_GUIDE.md#prime-factors)
81+
- update pandoc scripts that convert GitHub flavored Markdown to PDF
82+
- pandoc was generating images which were 33% too large
83+
- fixed by using ImageMagick to prescale the images to 75%
384
- 0.9.0 (2024-01-06)
485
- **Breaking**: Change names and internal formats of various appVars
586
- `STK` list variable replaced with `RPN83STK`

README.md

Lines changed: 69 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ features from the
1414

1515

1616
The RPN83P is a flash application written in Z80 assembly language that consumes
17-
2 pages (32 kiB) of flash memory. Since it is stored in flash, it is preserved
17+
3 pages (48 kiB) of flash memory. Since it is stored in flash, it is preserved
1818
if the RAM is cleared. It consumes about 735 bytes of TI-OS RAM through 3
1919
AppVars: `RPN83REG` (496 bytes), `RPN83STK` (116 bytes), and `RPN83SAV` (123
2020
bytes).
@@ -25,11 +25,12 @@ Summary of features:
2525
- 8-line display showing all stack registers
2626
- hierarchical menu system similar to HP-42S
2727
- quick reference `HELP` menu
28-
- storage registers
28+
- storage registers and variables
2929
- store and recall:`STO nn`, `RCL nn`
3030
- storage arithmetics: `STO+ nn`, `STO- nn`, `STO* nn`, `STO/ nn`, `RCL+
3131
nn`, `RCL- nn`, `RCL* nn`, `RCL/ nn`
3232
- 25 storage registers: `nn = 00..24`
33+
- 27 single-letter variables (`nn = A..Z,Theta`)
3334
- all math functions with dedicated buttons on the TI-83 Plus and TI-84 Plus
3435
- arithmetic: `/`, `*`, `-`, `+`
3536
- algebraic: `1/X`, `X^2`, `SQRT`, `^` (i.e. `Y^X`)
@@ -73,7 +74,7 @@ Summary of features:
7374
- complex numbers, inspired by HP-42S and HP-35s
7475
- stored in RPN stack registers (`X`, `Y`, `Z`, `T`, `LastX`) and storage
7576
registers `R00-R24`
76-
- computation modes: `RRES` (real results), `CRES` (complex results)
77+
- result modes: `RRES` (real results), `CRES` (complex results)
7778
- display modes: `RECT`, `PRAD` (polar radians), `PDEG` (polar degrees)
7879
- linking/unlinking: `2ND LINK` (convert 2 reals to 1 complex, same as
7980
`COMPLEX` on HP-42S)
@@ -85,20 +86,27 @@ Summary of features:
8586
- complex specific functions: `REAL`, `IMAG`, `CONJ`, `CABS`, `CANG`
8687
- unsupported: trigonometric and hyperbolic functions (not supported by
8788
TI-OS)
89+
- date functions
90+
- date, time, datetime, timezone, and hardware clock
91+
- add or subtract dates, times, datetimes
92+
- convert datetime to different timezones
93+
- convert between datetime and epochseconds
94+
- support alternative Epoch dates (Unix, NTP, GPS, TIOS, Y2K, custom)
95+
- set and retrieve datetime from the hardware clock (84+/84+SE only)
96+
- display time and date objects in RFC 3339 (ISO 8601) format
8897
- various modes (`MODE`)
8998
- floating display: `FIX`, `SCI`, `ENG`
9099
- trigonometric: `RAD`, `DEG`
91-
- complex computation: `RRES`, `CRES`
92-
- complex display: `RECT`, `PRAD`, `PDEG`
100+
- complex result modes: `RRES`, `CRES`
101+
- complex display modes: `RECT`, `PRAD`, `PDEG`
93102
- `SHOW` (`2ND ENTRY`): display all 14 internal digits
94103

95104
Missing features (partial list):
96105

97106
- vectors and matrices
98-
- complex numbers
99107
- keystroke programming
100108

101-
**Version**: 0.9.0 (2024-01-06)
109+
**Version**: 0.10.0 (2024-03-31)
102110

103111
**Changelog**: [CHANGELOG.md](CHANGELOG.md)
104112

@@ -132,7 +140,7 @@ Guide](docs/USER_GUIDE.md), but here is the quick version:
132140
[releases page](https://github.com/bxparks/rpn83p/releases).
133141
- Upload the file to the TI-83 Plus or TI-84 Plus calculator. Use one of
134142
following link programs:
135-
- Windows: [TI Connect](https://education.ti.com/en/products/computer-software/ti-connect-sw)
143+
- Windows or MacOS: [TI Connect](https://education.ti.com/en/products/computer-software/ti-connect-sw)
136144
- Linux: [tilp](https://github.com/debrouxl/tilp_and_gfm) (`$ apt install
137145
tilp2`)
138146
- Run the program using the `APPS`:
@@ -145,7 +153,7 @@ Guide](docs/USER_GUIDE.md), but here is the quick version:
145153

146154
The RPN83P app starts directly into the calculator mode, like this:
147155

148-
![RPN83P Hello 1](docs/images/rpn83p-initial.png)
156+
![RPN83P Initial Start Screen](docs/images/rpn83p-initial.png)
149157

150158
### Supported Hardware
151159

@@ -154,26 +162,38 @@ This app was designed for TI calculators using the Z80 processor:
154162
- TI-83 Plus (6 MHz Z80, 24 kB accessible RAM, 160 kB accessible flash)
155163
- TI-83 Plus Silver Edition (6/15 MHz Z80, 24 kB accessible RAM, 1.5 MB
156164
accessible flash)
157-
- TI-84 Plus (6/15 MHz Z80, 24 kB accessible RAM, 480 kB accessible flash)
165+
- TI-84 Plus (6/15 MHz Z80, 24 kB accessible RAM, 480 kB accessible flash,
166+
hardware clock)
158167
- TI-84 Plus Silver Edition (6/15 MHz Z80, 24 kB accessible RAM, 1.5 MB
159-
accessible flash)
168+
accessible flash, hardware clock)
169+
- TI-Nspire with TI-84 Plus Keyboard (32-bit ARM processor emulating a Z80, 24
170+
kB accessible RAM, 1.5 MB accessible flash, hardware clock)
160171

161172
The app configures itself to run at 15 MHz on supported hardware, while
162173
remaining at 6 MHz on the TI-83+.
163174

164175
I have tested it on the following calculators that I own:
165176

166-
- TI-83 Plus, OS v1.19
167-
- TI-83 Plus Silver Edition, OS v1.19
168-
- TI-84 Plus Silver Edition, OS v2.55MP
177+
- TI-83 Plus (OS v1.19)
178+
- TI-83 Plus Silver Edition (OS v1.19)
179+
- TI-84 Plus Silver Edition (OS v2.55MP)
180+
- TI-Nspire with TI-84 Plus Keyboard (OS v2.46)
181+
182+
Community members have verified that it works on the following variants:
169183

170-
It *should* work on the TI-84 Plus, but I have not actually tested it.
184+
- TI-84 Plus
185+
- TI-84 Plus Pocket SE
186+
- TI-84 Pocket.fr (French version of the Pocket SE?)
171187

172-
The following calculators are *not* supported because their internal hardware is
173-
too different:
188+
The following calculators are *not* supported because their internal hardware
189+
and firmware are too different:
174190

191+
- TI-83 (without Plus)
175192
- TI-84 Plus C Silver Edition
176193
- TI-84 Plus CE
194+
- TI-83 Premium CE (French version of the TI-84 Plus CE)
195+
- TI-Nspire CAS, CX, CX CAS, CX II, CX II CAS
196+
- TI-89, 89 Titanium, 92, 92 Plus, Voyage 200
177197

178198
## Quick Examples
179199

@@ -217,33 +237,33 @@ view the final result as a decimal number:
217237

218238
- Press `MATH` to reset the menu to the home row.
219239
- Navigate the menu with the DOWN arrow to get to
220-
![ROOT MenuRow 2](docs/images/rpn83p-menu-root-2.png)
240+
![ROOT MenuRow 2](docs/images/menu-root-2.png)
221241
- Press `BASE` menu to get to
222-
![BASE Menu DEC](docs/images/rpn83p-menu-base-dec.png)
242+
![BASE Menu DEC](docs/images/menu-root-base-dec.png)
223243
- Press `HEX` menu to get to
224-
![BASE Menu HEX](docs/images/rpn83p-menu-base-hex.png)
244+
![BASE Menu HEX](docs/images/menu-root-base-hex.png)
225245
- Press `ALPHA` `B` buttons
226246
- Press `6` button
227247
- Press `ENTER` button
228248
- Press `6` button
229249
- Press `5` button
230250
- Press DOWN arrow to get to the menu row with the `AND` menu item
231-
![BASE MenuRow AND](docs/images/rpn83p-menu-root-base-2.png)
251+
![BASE MenuRow AND](docs/images/menu-root-base-2.png)
232252
- Press `AND` menu, the `X` register should show `00000024`
233253
- Press UP arrow to go back to
234-
![BASE Menu HEX](docs/images/rpn83p-menu-base-hex.png)
254+
![BASE Menu HEX](docs/images/menu-root-base-hex.png)
235255
- Press `OCT` menu, the `X` register should show `00000000044` with the menu
236-
showing ![BASE Menu OCT](docs/images/rpn83p-menu-base-oct.png)
256+
showing ![BASE Menu OCT](docs/images/menu-root-base-oct.png)
237257
- Press `BIN` menu, the `X` register should show `00000000100100` with the menu
238-
showing ![BASE Menu BIN](docs/images/rpn83p-menu-base-bin.png)
258+
showing ![BASE Menu BIN](docs/images/menu-root-base-bin.png)
239259
- Press DOWN DOWN (twice) to the menu row with the shift right `SR` item
240-
![BASE MenuRow SR](docs/images/rpn83p-menu-root-base-3.png)
260+
![BASE MenuRow SR](docs/images/menu-root-base-3.png)
241261
- Press `SR` `SR` `SR` (three times) to show `00000000000100` and the Carry Flag
242262
`C` set
243263
- Press UP UP (twice) to reach the base conversion menu row
244-
![BASE Menu BIN](docs/images/rpn83p-menu-base-bin.png)
264+
![BASE Menu BIN](docs/images/menu-root-base-bin.png)
245265
- Press `DEC` menu, the `X` register should show `4` with the menu showing
246-
![BASE Menu DEC](docs/images/rpn83p-menu-base-dec.png)
266+
![BASE Menu DEC](docs/images/menu-root-base-dec.png)
247267

248268
Here is the animated GIF that shows this calculation:
249269

@@ -265,14 +285,14 @@ Here are the steps:
265285

266286
- Press `MATH` to reset the menu to the home row.
267287
- Navigate the menu with the DOWN arrow to get to
268-
![ROOT MenuRow 2](docs/images/rpn83p-menu-root-2.png)
288+
![ROOT MenuRow 2](docs/images/menu-root-2.png)
269289
- Press the `TVM` menu to get to
270-
![TVM MenuRow 1](docs/images/rpn83p-menu-root-tvm-1.png)
290+
![TVM MenuRow 1](docs/images/menu-root-tvm-1.png)
271291
- Press the DOWN arrow to get to
272-
![TVM MenuRow 2](docs/images/rpn83p-menu-root-tvm-2.png)
292+
![TVM MenuRow 2](docs/images/menu-root-tvm-2.png)
273293
- Press the `CLTV` button to clear the TVM variables.
274294
- Press the UP arrow to get back to
275-
![TVM MenuRow 1](docs/images/rpn83p-menu-root-tvm-1.png)
295+
![TVM MenuRow 1](docs/images/menu-root-tvm-1.png)
276296
- Press `360` `N` (30 years * 12 months = 360 payments)
277297
- Press `8` `I%YR` (interest percent per year)
278298
- Press `500000` `PV` (present value)
@@ -306,7 +326,7 @@ The keystrokes are:
306326

307327
- (optional) Press `CLEAR CLEAR CLEAR` to clear the RPN stack.
308328
- Press `MODE` `downarrow` `RECT`:
309-
![MODE MenuRow 2](docs/images/rpn83p-menu-root-mode-2.png)
329+
![MODE MenuRow 2](docs/images/menu-root-mode-2.png)
310330
- Press `100` `ENTER`
311331
- Press `2` `PI` `*` `60` `*` `1 EE 5` `(-)` `*` `1/X` `(-)` (-265.26)
312332
- Press `2ND LINK` (100-265.26i)
@@ -315,9 +335,9 @@ The keystrokes are:
315335
- Press `300` `2ND ANGLE` `2ND ANGLE` `0.1` `+` (695.46+49.42i)
316336
- Press `4` `/` (173.89+12.35i)
317337
- Press `PRAD` (174.30 e^(i 0.07)
318-
- Press `PDEG` (174.30 e^(4.04 deg))
338+
- Press `PDEG` (174.30 e^(i 4.04deg))
319339
- Press `MATH` `CPLX`:
320-
![CPLX MenuRow 1](docs/images/rpn83p-menu-root-cplx-1.png)
340+
![CPLX MenuRow 1](docs/images/menu-root-cplx-1.png)
321341
- Press `CABS` (174.30)
322342

323343
![RPN83P Example 4 GIF](docs/images/rpn83p-example4.gif)
@@ -329,7 +349,7 @@ Press:
329349
- `ON` button (`ESC/EXIT`) multiple times to back to the home menu, or
330350
- `MATH` button (`HOME`) to go back directly.
331351

332-
![ROOT MenuRow 1](docs/images/rpn83p-menu-root-1.png)
352+
![ROOT MenuRow 1](docs/images/menu-root-1.png)
333353

334354
## Documentation
335355

@@ -414,14 +434,20 @@ Here are the tools and resources that I used for development on Ubuntu Linux
414434

415435
## Feedback and Support
416436

417-
If you have any questions, comments, or feature requests for this library,
418-
please use the [GitHub
419-
Discussions](https://github.com/bxparks/rpn83p/discussions) for this project.
420-
If you have bug reports, please file a ticket in [GitHub
421-
Issues](https://github.com/bxparks/rpn83p/issues). Feature requests should go
422-
into Discussions first because they often have alternative solutions which are
423-
useful to remain visible, instead of disappearing from the default view of the
424-
Issue tracker after the ticket is closed.
437+
If you have any questions, comments, bugs, or feature requests for this
438+
application, you can file a ticket in the [GitHub
439+
Issues](https://github.com/bxparks/rpn83p/issues). They will be handled on a
440+
best-effort basis. Remember that this software comes with no warranties and no
441+
guarantees of support.
442+
443+
Most of the discussions on the internet are occurring in the [RPN83P
444+
thread](https://www.hpmuseum.org/forum/thread-20867.html) on the [Museum of HP
445+
Calculators](https://www.hpmuseum.org/). That's another option for feedback and
446+
support.
447+
448+
For feature requests, I recommend scanning through the [Future
449+
Enhancements](docs/FUTURE.md) document and verifying that your feature is not
450+
already there.
425451

426452
Please refrain from emailing me directly unless the content is sensitive. The
427453
problem with email is that I cannot reference the email conversation when other

docs/DEVELOPER.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,11 @@ Here are some notes about how the `PRIM` algorithm works:
135135
implement a custom `mod(u32, u16)` function which is about 25% faster than the
136136
full `div(u32, u16)` function.
137137

138-
I think there are additional micro-optimizations left on the table that could
139-
make the `PRIM` function maybe 1.5X to 2X faster, without resorting to a
140-
completely different algorithm. But I suspect that the resulting code would be
141-
difficult to understand and maintain. So I decided to stop here.
138+
RPN83P v0.10.0 implemented an optimization in the `div(u32,u16)` routine that
139+
produced a 40-50% speed increase compared to v0.9.0. I can think of one
140+
additional optimization that *may* give us a 10-20% speed increase, but it would
141+
come at the cost of code that would be significantly harder to maintain, so I
142+
don't think it's worth it.
142143

143144
### Prime Factor Improvements
144145

0 commit comments

Comments
 (0)