HP-16C Large Memory Patch

INTRODUCTION

A standard HP-16C as designed and manufactured by Hewlett-Packard provides up to 203 program steps, and up to 406 user data registers (for word sizes of 1 to 4 bits), or some combination that adds up to less than 203 bytes total. Each program step consumes 8 bits that might otherwise be available to use as a data register.

On simulators, or on modern hardware that uses an ARM microcontroller to simulate the original HP Nut processor, it's possible to use additional RAM memory that was not provided by the original hardware. The patch presented below uses this capability, with hardware RAM registers at addresses 0x20 through 0xdf. This patch also requires more program memory (ROM), from 0x2000 to 0x2049. This address range was chosen, rather adding code at 0x1800, immediately following the 16C ROM, because many simulators are written to handle the 15C, which has its second ROM starting at 0x2000.

The number of program steps is limited to 999 to avoid program line display errors. The number of user data registers is limited to 3094 (for word sizes of 1 to 4 bits), or correspondingly smaller limits for larger word sizes, down to 193 (for word sizes of 61 to 64 bits).

This patch works with the stock HP 16C Nut microcode. It is unknown whether it will work with any other patched 16C microcode, which might be present in modern physical calculators or simulators.

The patched 16C firmware can be identified by the keyboard test; at the end of the test, when the calculator model number is displayed, the display will read "16CE" rather than "16".

NOTES

  1. This patch does not adjust the ROM checksum, so self-test will fail.

PATCH

The patch is being provided for testing. It may contain errors which could cause loss of data.

This patch is the copyrighted property of Eric Smith, and is not licensed for commercial use. For commercial use, please contact the author to negotiate a license.

Copyright 2023-2025 Eric Smith <spacewar@gmail.com>
SPDX-License-Identifier: CC-BY-NC-SA-4.0
License: https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode

Patch version 1, 2025-03-13:

address original data new data
01d409c15c
   
01db3d0290
01dc2902d0
01dd2d0000
   
01eb222262
01ec222262
   
020126002d
02021c6080
0203257253
02042a0000
020517a000
02063db000
   
0250130000
0251204000
0252306000
025310b000
   
02b13f02b7
   
02e6090019
02e715a082
   
037700b00c
   
037a04e001
037b270080
   
055c0df01f
   
10a2090050
10a31fa11a
10a411a1fa
10a501315a
   
10aa27e1fa
10ab3db1fa
10ac05e1fa
10ad0ba15a
   
10b12bc15a
10b210627e
10b30463bb
10b423c0ae
10b51fa13c
10b611a05a
10b71fa10e
10b821a1fe
10b91fa023
10ba21a1be
10bb2fc000
   
10d31a2162
10d41a2162
   
10d90e0020
   
117b2660c1
117c2e6080
117d3af000
   
14a226e270
14a311c19c
   
14a51903d0
14a610e010
14a701c210
14a8211210
14a902431c
14aa09d0fd
14ab002082
   
200004e
2001270
2002130
2003020
20042e8
20053e0
2006090
200715a
2008260
200937d
200a00a
200b39c
200c2e2
200d073
200e33c
200f130
2010256
20111bc
2012306
2013037
20141c6
20152a0
201615a
2017260
20183d3
201905a
201a23c
201b23c
201c130
201d016
201e1bc
201f306
2020037
20211c6
20222a0
202315a
2024260
20253d3
202605a
202733c
202801c
2029306
202a360
202b1c6
202c2a0
202d17a
202e260
202f3d3
2030266
20312e6
20323a0
2033266
20342e6
20351c9
2036047
20372fc
2038130
2039064
203a013
203b146
203c27e
203d3f3
203e3e0
203f210
2040268
204104e
204209c
20431d0
2044110
2045210
2046350
2047210
20482a8
204909d

THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.


Copyright 2025 Eric Smith <spacewar@gmail.com>
Last updated 2025-03-14