

No memory registers are used.ġ is put into X, hence the value to be calculated upon (which was initially in X) is lifted (pushed) into stack register Y

This is a sample program which computes the factorial of an input integer number (ignoring the calculator's built-in factorial function). The HP-42S supports indirect addressing with which it is possible to implement a Universal Turing machine and therefore the programming model of the HP-42S can be considered Turing-complete. The HP-42S uses a superset of the HP-41CX FOCAL language. The HP-42S is keystroke-programmable, meaning that it can remember and later execute sequences of keystrokes to solve particular problems of interest to the user.
#HP RPN SCIENTIFIC CALCULATORS SERIES#
The ability to run programs written for the HP-41C series of calculators.Programmability (keystroke programming with branching, loops, tests and flags).Catalogs for reviewing and using items stored in memory.Base conversion, integer arithmetic and binary and logic manipulation of numbers in binary, octal, decimal and hexadecimal systems.Menus with submenus and mode settings (also custom programmable) that use the bottom line of the display to label the top row of keys.Graphic display with graphics functions and adjustable contrast.Named variables, registers and binary flags.Complex numbers (including polar coordinates representation).Matrix operations (including a matrix editor, dot product, cross product and solver for simultaneous linear equations).Numerical integration for calculating definite integrals.

#HP RPN SCIENTIFIC CALCULATORS UPGRADE#
