Post Reply 
Program to compare 32sii vs. 42s programming
10-12-2023, 08:23 AM
Post: #1
Program to compare 32sii vs. 42s programming
I'm much more familiar with the 32sii than the 42s. I’d like to look at listings of two versions of the same program, but written for the two different machines. That would let me compare how various things are handled, and how the 42s is different (harder, better, etc.)

Can someone recommend a program and where to get it? Or if there’s a chart somewhere comparing the two machine’s programming syntaxes, that would be great.

Thanks,
—Peter
Find all posts by this user
Quote this message in a reply
10-12-2023, 10:35 AM
Post: #2
RE: Program to compare 32sii vs. 42s programming
From top of my head, N-Queens implemented on boatload of calculators:
https://www.hpmuseum.org/cgi-sys/cgiwrap...i?read=700

Maybe you can find some programs written for both the models in the library subforum here:
https://www.hpmuseum.org/forum/forum-13.html

But my suggestion would be going through 42s manuals, e.g.
https://literature.hpcalc.org/items/934
If you know the 32sii then the differences will just pop up, I believe...
Find all posts by this user
Quote this message in a reply
10-12-2023, 11:24 AM (This post was last modified: 10-12-2023 12:10 PM by Steve Simpkin.)
Post: #3
RE: Program to compare 32sii vs. 42s programming
The following RPN Calculator Comparison Table notes some of the differences between the HP 32SII and the HP-42S (and other models).
HP Plus RPN Calculator Comparison Table

The HP 32SII and HP-42S somewhat overlap in functionality with the HP-42S having a more powerful programming model (multi-character program labels and variable names, seperate program space for each program, local labels, more alphanumeric functionality, HP-41C series program compatibility, more flags, etc), 2-line display, matrix operations, plotting, custom menus, infrared printer output, sound, more operations that accept complex numbers, and generally more functions than the HP 32SII.
Conversely, the HP 32SII has an algebraic equation editor/list for its Solver and Numerical Integration functions (you have to write RPN programs for these on the HP-42S), native support of fractions and a few unit conversion functions. It also has most of its functions on the keypad vs hiding them in menus on the HP-42S. There are other differences of course, but these are the main ones that I can think of.

There are also some very good videos that highlight the programming models of each model at Logan West's YouTube channel.
HP 32SII Video Series
HP-42S Video Series
Visit this user's website Find all posts by this user
Quote this message in a reply
10-23-2023, 08:52 AM (This post was last modified: 10-24-2023 11:53 PM by Peter Klein.)
Post: #4
RE: Program to compare 32sii vs. 42s programming
Regarding the differences between the 32sii and 42s programming, I did some reading and video watching this weekend. Just for fun, I looked up how all my HP calculators handle registers/variables, labels. and came up with the following list. It might be useful to someone, so I'm posting it. Some of this information is already in Steve Simpkin's spreadsheet (thanks, Steve!). This list drills down a bit more. Corrections welcome.

Doing this gave me a lot more perspective on the programming "personality" of these calculators.

Note: In HP-ese, variables have alpha names of one or more characters. Registers are designated by numbers.

*** HP25

Program steps: 49
Storage registers: 8 (0-7).
No labels, GoTO line numbers only.
Everything is global.
No indirection.


*** HP11c
Program steps: 63, more reduces storage registers.
Storage registers: 20, (0-0 and .0-.9).
Labels: 15 numeric 0-9, also five tied to hotkeys A-E in "user mode."
All registers and labels are global.
No GoTO line number.
Indirection register I

*** HP32s, 32Sii, 33s

Program steps: 260
Variables: 26, named only (A-Z), plus stat registers = 33.
Labels: 26, named only, (A-Z).
No GoTO line number.
All variables and labels are global.
Indirection register I, 1-26 points to A-Z , 28-33 to stat registers.
32s(ii): Only ~280 bytes for programs (and equations). Clearing unused variables saves space.
33s (and 35s): ~30K memory for equations, so you might not need many programs.

*** HP42s

Program steps: Up to 7200. Each program has its own “space.”
Storage registers: 25 (default), numbered 00-24, SIZE command can reduce or increase up to 99.
Many more registers can be addressed only indirectly.
Variables: (named, <= 7 chars) created by user. Can be set/viewed/picked via menus.
Menu-based programs are a bit more complex to set up than 32S(ii) model, but programs become easier to use.
Registers and variables are global.
Indirection can be accomplished via a value or name in any variable or register.

Global labels: Named, <=7 chars. Or single letters, but not A-J and a-e. For program names.
Local labels: Numbers, 00-99, or A-J and a-e. For branching within the current program.

*** WP34s

Program steps: 927
Global storage registers: 100 (00-99), number can be reconfigured. 8 more if you repurpose the 8-level stack and probability registers.
Indirection can be accomplished via a value in any register.
Local variables (numbered) and flags can be allocated.

Global labels, named, 1-3 alpha characters, case sensitive.
Local labels, numbered, two digits 00-99 plus hotkeys A-D
Can jump to absolute or relative line numbers.
Find all posts by this user
Quote this message in a reply
Post Reply 




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