Post Reply 
New WP34S unit
11-04-2023, 09:52 PM
Post: #17
RE: New WP34S unit
Release 3919 is now uploaded. It contains a couple of bugfixes for long integer entry - CmdLineInt is now an unsigned long long int, and the code now works correctly on the Qt emulator.

I've added a short file in the doc folder. This is what it contains:

Quote:From r3918 onwards the WP34S no longer limits entries in integer mode to 12 digits. So if you wish to enter the base 7 number 100200300400500600100 then you can do so directly. Once 12 digits have been entered the display scrolls to the left, and the "window bars" appear in the status line. During entry the <- key deletes digits and the +/- key changes the sign, as expected.

There is no upper limit to the number of keys that can be entered! However, the maximum word size is still 64 bits. Once the number entered exceeds this limit, earlier digits are lost. In bases other than 2, 4, 8, and 16, the number displayed suddenly changes when 64 bits are exceeded.

Behind the scenes, instead of storing a long string of keypresses, the code calculates and updates the number entered as each key is pressed:

new number = (old number * base) + key pressed.

When the backspace key is pressed, this is reversed:

new number = old number / base

(this is integer division). Rather than the 64 bytes needed to store the full command line for a 64-bit binary number, this method only requires 64 bits! By letting these 8 bytes share memory space with the command line, no extra RAM is used. Since the actual hardware only has one or two spare bytes of non-volatile RAM this space-saving is vital. (The actual code takes up a few hundred extra bytes of flash memory.)

I've tested this code on the calculator, the Windows emulator, and (on Linux) on the Qt emulator. It seems to work as intended, but testing by other users would be much appreciated.

If you don't want your calculator to have this feature, either use r3916 or build the project with the line #define LONG_INTMODE_ENTRY (near the start of features.h) commented out.

Nigel (UK)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
New WP34S unit - ebs - 10-25-2023, 10:06 PM
RE: New WP34S unit - Paul Dale - 10-26-2023, 04:17 AM
RE: New WP34S unit - Nigel (UK) - 10-27-2023, 01:24 PM
RE: New WP34S unit - ebs - 10-27-2023, 07:29 PM
RE: New WP34S unit - Nigel (UK) - 10-27-2023, 08:38 PM
RE: New WP34S unit - Nigel (UK) - 10-27-2023, 09:10 PM
RE: New WP34S unit - Paul Dale - 10-28-2023, 12:26 AM
RE: New WP34S unit - Nigel (UK) - 10-28-2023, 09:53 AM
RE: New WP34S unit - Paul Dale - 11-03-2023, 11:47 PM
RE: New WP34S unit - ebs - 10-28-2023, 06:03 PM
RE: New WP34S unit - Nigel (UK) - 11-03-2023, 10:30 PM
RE: New WP34S unit - Paul Dale - 11-03-2023, 11:43 PM
RE: New WP34S unit - Nigel (UK) - 11-04-2023, 12:07 AM
RE: New WP34S unit - Paul Dale - 11-04-2023, 03:47 AM
RE: New WP34S unit - ebs - 11-04-2023, 08:22 PM
RE: New WP34S unit - Nigel (UK) - 11-04-2023, 09:44 PM
RE: New WP34S unit - Nigel (UK) - 11-04-2023, 10:02 PM
RE: New WP34S unit - Nigel (UK) - 11-04-2023 09:52 PM
RE: New WP34S unit - Paul Dale - 11-04-2023, 10:19 PM
RE: New WP34S unit - Nigel (UK) - 11-04-2023, 10:33 PM
RE: New WP34S unit - ebs - 11-05-2023, 07:53 PM
RE: New WP34S unit - Nigel (UK) - 11-05-2023, 08:01 PM
RE: New WP34S unit - ebs - 11-05-2023, 08:36 PM
RE: New WP34S unit - ebs - 11-06-2023, 12:50 AM
RE: New WP34S unit - Nigel (UK) - 11-06-2023, 12:21 PM
RE: New WP34S unit - linq2008 - 11-08-2023, 03:34 AM
RE: New WP34S unit - ebs - 11-06-2023, 11:48 PM
RE: New WP34S unit - ebs - 11-08-2023, 10:45 PM
RE: New WP34S unit - Eric Rechlin - 11-08-2023, 11:39 PM
RE: New WP34S unit - ebs - 11-09-2023, 08:13 AM
RE: New WP34S unit - Nigel (UK) - 11-09-2023, 12:04 PM
RE: New WP34S unit - ebs - 11-09-2023, 12:59 PM
RE: New WP34S unit - Nigel (UK) - 11-11-2023, 06:44 PM
RE: New WP34S unit - ebs - 11-12-2023, 01:50 AM
RE: New WP34S unit - Nigel (UK) - 11-12-2023, 08:22 AM
RE: New WP34S unit - Nigel (UK) - 11-12-2023, 10:46 PM
RE: New WP34S unit - Paul Dale - 11-12-2023, 11:47 PM
RE: New WP34S unit - Nigel (UK) - 11-13-2023, 12:11 PM
RE: New WP34S unit - ebs - 11-13-2023, 09:35 PM
RE: New WP34S unit - Nigel (UK) - 11-14-2023, 08:05 PM
RE: New WP34S unit - Paul Dale - 11-14-2023, 12:12 AM
RE: New WP34S unit - Nigel (UK) - 11-14-2023, 08:04 PM
RE: New WP34S unit - burkhard - 11-21-2023, 06:40 PM



User(s) browsing this thread: 6 Guest(s)