HP-32S/33S/35S emulator with Stack Overflow sensing/Stack display


It is hard to develop programs for HP-32S due to low available memory. You need to optimize numbers, i.e. replacing 0.9 with 1;10;1/x;- sequence to free a couple of bytes. The problem is, when re-doing programs written for 35s/33s, stack usage becomes higher, and you can inadvertently get stack overflow.

So, I hope there is some emulator for one of these calculators, which either could be set to signal stack overflow (i.e. when non-zero value is pushed higher than T) or just display stack contents.

Are they available?


I do not think there is an emulator with built-in stack overflow warning. Simply because it does not make sense: Key in any number you like, or simply press the ENTER key, and T is lost. Data is lost even if T was zero before - a zero does not indicate an "empty" register, it can be a meaningful, important value just as any other number.

Regarding memory usage of numeric constants: yes, sometimes you have to be a bit ...creative. For instance, on the 35s [Pi] [INT] is shorter and faster than a simple [3]. But what about the 32s? How many bytes are required for a simple 0.9?

I think the best start for a translation from a 35s program to your 32s, or in general from machine X to Y, is a thorough understanding of how the program works. Literal translations sure are not the best way to handle this, often a different approach based on the specific features of the target device is way better - and ofter faster and more concise as well.

Just think of most HP-67/97 programs that could also run on a HP-41 system (with attached card reader), and then imagine how much better and faster these could have programmed, using the advantages of the 41-series.



Use an RPL calculator (48S/G series, 50G), their stack depth is limited only by available memory (visible stack 4 to 11 levels depending on model & display settings). 50g emulator available here.


Bart, IMHO RPL calculators are too different from RPN ones, especially concerning stack usage. I don't see any help in using HP-50G to prototype HP-32S program.

Dieter, I agree zero could be meaningful value. Say I use NIL or another guard value instead of zero. 0.9 consumes 9.5 bytes, numbers in range 0-254 consume 1.5 bytes only, so 1;10;1/x;- takes 6 bytes instead of 9.5.

Maybe there is some RPN (not too far from HP-32S) emulator which shows stack contents. I would be glad to hear about one with syntax close to HP-32S/33S/35S.

Another option is to tune some existing emulator to fit my needs.
Is there any 32s/33s/35s emulator with source code?

Possibly Related Threads…
Thread Author Replies Views Last Post
  HP 50g - select characters on the stack, copy/paste Sean Freeman 7 2,663 11-20-2013, 07:11 AM
Last Post: Sean Freeman
  Prime: Placing more than 1 item on the RPN stack in a single program? John Colvin 4 2,236 11-19-2013, 08:59 AM
Last Post: Miguel Toro
  emu48 - copy stack doesn't work (as expected) Thomas Radtke 2 1,953 11-11-2013, 02:19 PM
Last Post: Thomas Radtke
  HP Prime Stack operations from within a program John Colvin 1 1,361 11-08-2013, 09:45 PM
Last Post: Helge Gabert
  [PRIME] RPN: another attempt at returning more than one value to the RPN stack Marcus von Cube, Germany 5 2,450 11-05-2013, 02:44 AM
Last Post: Marcus von Cube, Germany
  Prime: Anyway to refresh stack? kris223 5 2,108 10-16-2013, 05:09 PM
Last Post: kris223
  hp prime - sending program results to the stack giancarlo 6 2,080 10-15-2013, 02:00 AM
Last Post: Giancarlo
  HP Prime - RPN stack access from programs? Mike Mander (Canada) 10 3,376 09-30-2013, 11:20 AM
Last Post: steindid
  Joys of eBay: HP-32S, HP-32SII, HP-42S, HP-16C, ... Sasu Mattila 7 2,509 09-23-2013, 04:39 PM
Last Post: Julián Miranda (Spain)
  33s, 35s & 42s--The Timex(R) Factor Matt Agajanian 7 2,256 09-13-2013, 12:28 AM
Last Post: Matt Agajanian

Forum Jump: