DM42 Quick Reference Guide

Version 2022-10-04
Check http://technical.swissmicros.com/dm42/fat/HELP for updates

Navigation

Numpad-like navigation keys

Symbols used in this guide


Contents


Menus

DM42 calculator has far too many functions to assign a key to each one, so most of them are available in menus rather than directly on keys.
Each menu displays a row of labels at the bottom of the screen, one above each key in the top row of the keyboard.
A function within the menu is activated by pressing the key directly below it. If there are more than six functions in the menu then the ▼▲ annunciator is displayed and the and keys allow you to scroll through the menu's pages. There are two kinds of menu:

Application Menu

There are five applications built into the DM42:
When you enter an application and its menu opens, any other menus are closed automatically. However, you can still open a function menu from within the application and when you've finished with it, it will close and reveal the application menu again.

Function Menu


Unlike application menus, a Function menu closes as soon as you have used one of the functions that it contains, with the exception of the CUSTOM menu, which remains open. Should you need to use more than one function from a Function menu, you can instruct the DM42 to keep the menu open by opening it twice in succession.

Storage


The Stack

The stack is the scratchpad that you use for performing calculations. It stores and shows you intermediate results as you work through a problem.
The four registers that make up the stack are known as X,Y,Z,T. Auxiliary register LASTx holds contents of X register used in most recent numeric function. Each of these registers can contain data of any type.

Storage Registers

Because of the ephemeral nature of the stack, data in its registers is likely to be lost when a new calculation is started.
More permanent storage can be achieved in the storage registers, of which there are 25 initially, numbered 00 to 24. This number can be altered with the SIZE function in the MODES menu.
STO nn STOres the contents of the X register into the storage register with the given number.
RCL nn ReCaLls the data from storage register nn into the stack.
If SIZE has been used to define more than 100 storage registers then registers numbered 100 and onwards can only be accessed using indirect addressing.
The STATistics application uses some of the storage registers for its internal housekeeping:
If ALLΣ mode is being used (as opposed to LINΣ mode) then the following additional storage registers are used: The storage registers can be all real numbers or all complex numbers. See Variables for how to switch between the two.

Variables

Rather than referring to stored data by a simple number (the number of the storage register containing it), it is possible to create named variables. Variables allow you to associate a meaningful name with the data. Also, named variables can contain any type of data, not just real or complex numbers.
E.g. suppose you have just calculated the volume of a shape. Store the value currently in the X register representing this volume in a variable named VOL:
STO ENTER VOL ENTER
Variables can have names up to seven characters long.
There is one system-reserved variable, REGS. REGS is a matrix containing the storage registers. REGS can be a real matrix, in which case all of the storage registers, i.e. the elements of REGS, are real numbers, or it can be a complex matrix, in which case all of the storage registers are complex numbers.
To convert REGS (or any other real matrix) to a complex matrix:
0 ENTER COMPLEX STO + REGS
To convert REGS from a complex matrix back into a real matrix:
RCL REGS COMPLEX x<>y STO REGS

The Alpha Register

The alpha Register can store up to 44 characters of text, which equate to two lines of text on the original HP-42S.

Available Memory

The DM42 has about 70KB of system memory that your programs and variables can use. The storage register matrix REGS uses some of this space.
To find out how much memory your DM42 has available, open the CATALOG menu and then press and hold MEM.
If you need more memory then use the CLP (CLear Program) and CLV (CLear Variable) functions from the CLEAR menu to remove unneccesary programs and variables and thus free up additional memory.
DO NOT DELETE THE REGS VARIABLE! Remember, it holds your storage registers! If necessary you can reduce its size with the SIZE command from the MODES menu.

Data Types


Real Numbers

Real numbers cover integer and decimal numbers, positive or negative. The range of numbers that the DM42 can handle is approximately 10-6143 to 106144 with a precision of 34 digits.

Complex Numbers

A complex number consists of two real numbers associated to form its real part and its imaginary part (rectangular coordinate mode).
Complex numbers are always stored internally in rectangular form but can be displayed directly:
0.2343 i1.4456
or in polar coordinate mode with a magnitude and an angle:
1.4645 ∡80.7937
Both of the examples here represent the same complex number.
To enter a complex number in rectangular mode:
real part ENTER imaginary part COMPLEX
To enter a complex number in polar mode:
Magnitude ENTER angle COMPLEX
The COMPLEX function either combines real numbers (or matrices) in the X and Y stack registers to form a complex number (or matrix) in X, or it performs the opposite operation by splitting the complex number (or matrix) in X into two real numbers (or matrices) in X and Y.
The role of the real number (or matrix) taken from X when combining X and Y or left in X when splitting the complex number (or matrix) in X depends on the display mode, rectangular or polar, in force when COMPLEX is executed. If rectangular then X is/was the imaginary part. If polar then X is/was the angle.
Complex numbers are displayed in polar mode normalised such that the magnitude is always positive and the absolute value of the angle does not exceed 180 degrees.

Alpha Strings

The alpha register contains strings of text up to 44 characters (2 lines on the HP-42S) in length.
Real variables and elements of real matrices (including REGS ) can also contain strings of up to 6 characters in length. Basically, you can store snippets of text anywhere you can store real numbers. However, you cannot store two such snippets in a complex variable.
With Free 42 it's possible to have strings with more than 6 or 44 characters. The related functions are in the function catalog: CATALOG STR.

Matrices

Matrices can be one-dimensional or two-dimensional. A matrix can have any number of rows and columns as long as there is enough memory in the DM42 to store all of its individual elements.
See Matrix Operations for more details.

Lists

Lists are a new data type introduced by Free42, which is an ordered collection of objects of any type, including other lists.
List functions are included with Free42 string functions in the function catalog: CATALOG STR.

Modes


Angles and Coordinates

Press MODES
The angle specifiers DEG, RAD and GRAD tell the DM42 to use degrees, radians, and gradians respectively when displaying and interpreting angles.
RECT and POLAR tell the DM42 to display and interpret complex numbers in rectangular and polar mode, respectively.

Other Modes

Press MODES
SIZE resizes the REGS matrix variable, thus defining the number of storage registers you can use.
QUIET switches off the internal buzzer and keeps the DM42 nice and.... quiet!
CPXRES allows the DM42 to return complex results when working on real numbers (e.g. square root of a negative number) while REALRES ensures that only real numbers are returned. In this case, operations that would otherwise return a complex result trigger an Invalid Data error. Operations given a complex number as an argument will return a complex number regardless of the CPXRES/REALRES setting.
KEYASN means that variables and programs assigned to the CUSTOM menu with the ASSIGN command will be shown in the CUSTOM menu. If LCLBL is selected then local alpha labels populate the CUSTOM menu.

Display Formats

Press DISP
FIX, SCI and ENG instruct the DM42 to display real numbers in fixed decimal, scientific and engineering notation, respectively, with a set number of decimals.
When ALL is selected, numbers are displayed with up to 12 digits precision, which was the native precision of the HP-42S.
Depending on where in the world you are, you will be used to using a dot as the decimal separator and a comma for grouping digits three by three before the decimal (e.g. 1,234.56 ) or, as in most of Europe, a comma as the decimal separator and a dot for grouping digits before the decimal (e.g. 1.234,56 ). RDX. selects the dot as the decimal separator and RDX, selects the comma.

Printing

Press PRINT
PRON and PROFF enable and disable printing by setting or clearing respectively flags 21 and 55.
MAN leads to items being printed manually. NORM leads to input and calculation results alone being printed automatically while TRACE sends a trace of all operations to the printer.
Additional modes are described under "Matrix Operations" and "Statistics."

Executing Functions & Programs


Any function or program can be executed by pressing XEQ and entering its name. If there is more than one program with the same name then when you attempt to XEQ that program, the one closest to the permanent .END. marker will be executed.
Only the current program will be searched if the name that you give is that of a local label.

Quick access to programs and functions

There are four ways to get at your programs and at the DM42's functions quickly:

Addressing modes

Some functions require a parameter that tells them on what specific item to operate. These functions accept one or more of the following addressing modes:

Programming


Program-Entry


* Use or if no menu is displayed.

Labels

A program label is simply a marker used to identify a program or a routine within a program.
Global labels can be accessed from anywhere in memory (and therefore should be unique). Global labels are distinguished from local labels by quotation marks (such as LBL "SAMPLE" ).
Local labels can be accessed only within the current program (and should be unique within the current program). There are two types of local labels:

The Do-lf-True Rule

The do-if-true rule determines how program lines are executed when a conditional function is encountered. If the condition is "true," the line immediately following the conditional is executed. If the condition is "false," the line following the conditional is skipped.

Looping

The ISG and DSE functions control looping. Each accesses a variable or register containing a control number in the form ccccccc.fffii; where ccccccc is the current counter value, and fff is the final counter value, and ii is the increment size (default is 1). Both ISG and DSE follow a variation of the do-if-true rule: if the count is not complete, the line following the instruction is executed (usually a branch to the top of the loop).
For example, this program segment counts from 1 to 52 by threes (executing the loop 18 times) and then beeps.
17 1.05203
18 STO "COUNT"
19 LBL 01

23 ISG "COUNT"
24 GTO 01
25 BEEP

Using a Variable Menu

A variable menu may be displayed by the Solver or Integration applications, or by the VARMENU function within a program. Each label in the menu represents a variable. While the menu is displayed, you can:
You can select and use any function menu without exiting from the variable menu.

The Solver

The Solver is a root finder that allows you to solve for an unknown variable in an expression, given values for all the other variables. Expressions are written as programs. There are three parts to a Solver program:

After entering the program, these are the steps for using the Solver:

A Simple Example: For the expression A + B = C, rewrite the expression as A + B - C = 0. The Solver program looks like this:

01 LBL "SIMPLE"
02 MVAR "A"
03 MVAR "B"
04 MVAR "C"
05 RCL "A"
06 RCL+ "B"
07 RCL- "C"
08 END

Hint: create the variables before entering the program. After entering the program, you can use it to solve for any variable, given a value for each of the others. For example, find A when B = 12 and C = log(B).

Select the program: SOLVER SIMPL
Store B: 12 B
Store C: LOG C
Solve for A: A

Numerical Integration

The Numeric Integration application allows you to calculate an approximation of a definite integral. The integrand, f(x), is written as a program similar to a Solver program (see The Solver ). That is, the program must use a global label, declare the menu variables, and evaluate f(x).

After entering the integrand program, here are the steps for using the Integration application:
  1. Press ∫f(x)
  2. Select an integrand program from the menu.
  3. Use the variable menu to store a value into each of the variables that should remain constant.
  4. Select the variable of integration by pressing the corresponding menu key.
  5. Store the lower limit (LLIM ), the upper limit (ULIM ), and the accuracy factor (ACC ).
  6. Press to calculate the integral. The approximation for the integral is returned to the X-register and the uncertainty of computation is returned to the Y-register.

Matrix Operations

To create a new m × n matrix, enter the dimensions:
m ENTER n (for m rows and n columns) and then press:
MATRIX NEW for a matrix in the X-register.
Or MATRIX DIM ENTER name ENTER for a matrix in a variable. If the matrix already exists, the DIM function redimensions it.

Edit the matrix in the X-register:
MATRIX EDIT

Edit a named matrix:
MATRIX EDITN name

When a matrix is being edited it is said to be indexed. (To index a named matrix without editing it, use the INDEX function.) Whenever there’s an indexed matrix, two pointers are used to indicate the row and column of the current element: I and J, respectively.

Wrap and Grow Modes. If the index pointers are positioned to the last (lower-right) element in a matrix and you move to the right one position:
Wrap mode is automatically selected whenever you enter or exit the matrix editor. (The WRAP and GROW functions are in the second row of the editor menu.)

Matrix Arithmetic. Most arithmetic and other operations work for matrices just as for individual numbers. Anytime a matrix is used in a mathematical operation with a complex number, the result is a complex matrix. Therefore, you can make any matrix complex by adding 0 + i0 to it:
0 ENTER COMPLEX +
or 0 ENTER COMPLEX STOM + name

To solve a system of simultaneous linear equations represented by the matrix equation AX = B:
  1. Press MATRIX SIMQ.
  2. Key in the number of unknowns. The calculator automatically creates or redimensions the matrix variables MATA, MATB, and MATX.
  3. Optional: If your equations involve complex numbers, make MATA and/or MATB complex (as shown at the top of this page).
  4. Press MATA , fill the matrix and press EXIT
  5. Press MATB , fill the matrix and press EXIT
  6. Press MATX to calculate the solution matrix. Use the matrix editor keys to view the results.

Statistics

Statistical data is accumulated into 6 or 13 sequential storage registers. Initially, the first summation register is R11. Use the ΣREG function to change the location of the first summation register. ΣREG does not move the data in the registers.

Options to set the summation mode:
Clear the summation registers:
CLEAR CLΣ

Options to accumulate data:

To undo mistakes:
Put the incorrect data in the stack (try LASTx ).
Press Σ- and continue accumulating data.

To select a curve model for forecasting:
Press STAT CFIT MODL
and then one of the following:

Base Conversions

Real numbers are displayed according to the current base mode (Hexadecimal, Decimal, Octal, or Binary). You can change the base mode using the BASE menu or by manually executing HEXM, DECM, OCTM, or BINM. Decimal mode is automatically selected when you exit from the BASE menu.
By default integer numbers have a 36-bit size as on the HP-42S. With the WSIZE function this size can be set from 1 to 64 bits.
Press and hold SHOW to display:

When the BASE menu is displayed, the following keys are temporarily redefined with these integer functions:
± BASE±2’s complement.
÷ BASE÷integer divide.
× BASE×nteger multiply.
- BASE- integer subtract.
+ BASE+integer add.

Bits are numbered from right to left beginning with 0. Bit 35 (or the most significant bit depending on WSIZE) is the sign bit. Negative numbers are represented in 2’s complement form. Nondecimal numbers longer than WSIZE are displayed as <Too Big>

HP-42S Functions

Under CATALOG FCN):

A

ABSAbsolute value
ACOSArc cosine
ACOSHArc hyperbolic cosine
ADVAdvance paper
AGRAPHAlpha graphics
AIPAlpha integer part
ALENGAlpha length
ALLAll display format
ALLΣALLΣ mode (13 sum regs)
ANDLogical AND
AOFFAlpha off
AONAlpha on
ARCLAlpha recall
AROTAlpha rotate
ASHFAlpha shift
ASINArc sine
ASINHArc hyperbolic sine
ASSIGNAssign CUSTOM menu key
ASTOAlpha store
ATANArc tangent
ATANHArc hyperbolic tangent
ATOXAlpha to X
AVIEWAlpha view

B

BASE+Base add
BASE-Base subtract
BASE×Base multiply
BASE÷Base divide
BASE+/-Base change sign (2’s compl.)
BEEPBeep
BESTBest fit model
BINMBinary mode
BIT?Bit test (x-th bit of y)
BSTBack step

C

CFClear flag
CLAClear alpha register
CLALLClear all memory
CLDClear display
CLKEYSClear CUSTOM menu keys
CLLCDClear LCD
CLMENUClear programmable menu
CLPClear program
CLRGClear registers
CLSTClear stack
CLVClear variable
CLXClear X-register
CLΣClear summation registers
COMBCombinations
COMPLEXComplex
CORRCorrelation
COSCosine
COSHHyperbolic cosine
CPXRESComplex-result enable
CPX?Complex test
CROSSCross product
CUSTOMCUSTOM menu

D

DECMDecimal mode
DEGDegrees mode
DELDelete program lines
DELAYPrinter delay time
DELRDelete matrix row
DETDeterminant
DIMDimension matrix
DIM?Dimensions of matrix in X
DOTDot product
DSEDecrement, skip if ≤ zero

E

EDITEdit matrix in X-register
EDITNEdit named matrix
ENDEnd of a program
ENGEngineering display format
ENTEREnter
EXITALLExit all menus
EXPFCurve-fitting model: exp.
E↑XNatural exponential
E↑X-1Nat. exp values near zero

F

FCSTXForecast x given y (stat)
FCSTYForecast y given x (stat)
FIXFixed dec. display format
FRNMFrobenius norm of X matrix
FPReturn fractional part

G

GAMMAGamma function
GETKEYPut next key number to X-reg
GETMGet matrix
GRADGrads angular mode
GROWGrow mode (matrix edition)
GOTOGo to label

H

HEXMHexadecimal mode
HMS+Add x and y using H.MMSSss
HMS-Subtract x from y H.MMSSss

I

I+Inc. row pointer (matrix)
I-Dec. row pointer (matrix)
INDEXIndex matrix
INPUTUser input (prog. only)
INSRInsert row (matrix edition)
INTEGIntegrate
INVRTInvert matrix in X-register
IPReturn integer part
ISGIncrement, skip if greater

J

J+Inc. column pointer (matrix)
J-Dec. column pointer (matrix)

K

KEYASNKey-assignments mode
KEYGOn key, go to
KEYXOn key, execute

L

LASTXLast x
LBLLabel
LCLBLLocal label mode
LINFLinear fit model
LINELinear mode (six sum regs)
LISTList program lines
LNNatural logarithm
LN1+XNat log for values near zero
LOGCommon logarithm
LOGFLogarithmic fit

M

MANManual printing
MAT?Matrix test
MEANArithmetic mean (average)
MENUProgrammable MENU
MODModulo
MVARMenu variable

N

N!Factorial
NEWMATNew matrix
NORMNormal printing
NOTLogical NOT

O

OCTMOctal mode
OFFOff
OLDOld element value
ONContinuous on
ORLogical OR

P

PERMPermutations
PGMINTProgram to integrate
PGMSLVProgram to solve
PIpi
PIXELPixel on
POLARPolar mode
POSAPosition in alpha
PRAPrint alpha
PRLCDPrint LCD
PROFFPrinting off
PROMPTPrompt
PRONPrinting on
PR?Print program
PRSTKPrint stack
PRUSRPrint user vars and labels
PRVPrint variable
PRXPrint X-register
PR2Print summation registers
PSEPause
PUTMPut matrix
PWRFPower fit

Q

QUIETQuiet mode

R

RADRadians mode
RANRandom number
RCLRecall
RCL+Recall add
RCL-Recall subtract
RCL×Recall multiply
RCL÷Recall divide
RCLELRecall element
RCLIJRecall IJ pointers
RDX,Radix comma
RDX.Radix period
REALRESReal-results only
REAL?Real test
RECTRectangular mode
RNDRound
RNRMRow norm
ROTXYRotate y by x bits
RSUMRow sum
RTNReturn
R<>RRow swap row
R↑Roll up
R↓Roll down

S

SCIScientific notation
SDEVStandard deviation
SEEDSeed (for RAN)
SFSet flag
SIGNSign
SINSine
SINHHyperbolic sine
SIZESize of REGS
SLOPESlope
SOLVESolve for variable
SQRTSquare root
SSTSingle step
STOStore
STO+Store add
STO-Store subtract
STO×Store multiply
STO÷Store divide
STOELStore element
STOIJStore IJ pointers
STOPStop program
STR?String test
SUMRecall Σx and Σy

T

TANTangent
TANHHyperbolic tangent
TONETone (0-9)
TRACETrace printing
TRANSTranspose matrix

U

UVECUnit vector

V

VARMENUVariable menu
VIEWView

W

WMEANWeighted mean
WRAPWrap mode

X

X<>x exchange
X<>Yx exchange y
XEQExecute
XORExclusive OR
XTOAX to alpha
X2Square, x2

Y

YINTY-intercept
YXPower, yx

1-+

1/XReciprocal
10XCommon exponential, 10x
+Add
-Subtract
×Multiply
÷Divide
+/-Change sign
%Percent
%CHPercent change

Summation

Σ+Summation plus
Σ-Summation minus
ΣREGSet loc. of 1st sum reg
ΣREG?Recall loc. of 1st sum reg

→ Conversions

→DECTo decimal.
→DEGTo degrees.
→HMSTo hours-minutes-seconds.
→HRTo decimal hours.
→OCTTo octal.
→POLTo polar.
→RADTo radians.
→RECTo rectangular.

Matrix Pointers

Index pointers left.
Index pointers up
Index pointers down
Index pointers right

Percentage

%Percent
%CHPercent change

Hidden Matrix Functions

These functions hidden in the HP-42s are at the end of the DM42 catalog:
[MIN]Gets a column smallest element
[MAX]Gets a column largest element
[FIND]Searches a matrix for a given element


Test Functions

If true, execute the next program line. If false, skip the next program line.
X<0?less than zero
X<Y?less than y
X≤0?less than or equal to zero
X≤Y?less than or equal to y
X=0?equal to zero
X=Y?equal to y
X≠0?not equal to zero
X≠Y?not equal to y
X>0?greater than zero
X>Y?greater than y
X≥0?greater than or equal to zero
X≥Y?greater than or equal to y


Free42 Extensions

The Free42 Extensions can be found in the second and third rows of the CATALOG: CATALOG . They are grouped in several sub-catalogs, which correspond with the sections below.
A few functions are not in the CATALOG and need to be accessed by their name with XEQ name or ASSIGN name:

Time and Date Functions

ADATEAppends the contents of the X register to the ALPHA register, formatted as a date value.
ATIME Appends the contents of the X register to the ALPHA register, formatted as a time value.
ATIME24Like ATIME, except it always formats the time in 24-hour format.
CLK12FDisplay the time in 12-hour format with AM/PM.
CLK24Display the time in 24-hour format.
DATEReturns the current date to the X register.
DATE+Takes a date from Y, and adds a number of days from X.
DDAYSNumber of days between the dates in Y and in X.
DMYSet the date format to day/month/year.
DOWCalculates the day of the week for the date in X. (sunday=0; monday=1; etc)
MDYSet the date format to month/day/year.
TIMEReturns the current time in X in 24-hour format.
YMDSet the date format to year/month/day.

Extended Functions

ANUMScans the ALPHA register for a number, and places it into X.
RCLFLAGGets the state of all flags and returns them as a complex number.
STOFLAGRestores the state of all flags that were retrieved using a previous RCLFLAG.
X<>FExchanges flags 0-7 with the X register.

BASE Enhancements

A...FSets HEXM mode and activates the A...F menu.
BRESETResets all BASE modes back to the HP-42S defaults: WSIZE 36, signed, not wrapped.
BSIGNEDToggles signed mode.
BWRAPToggles wrapped mode.
WSIZESets the word size to the number in X, between 1 and 64.
WSIZE?Returns the current word size.

Programming Utilities

CPXMAT?Tests whether the object in the X register is a complex matrix.
ERRMSGReturns the error message for the most recent error to be caught using flag 25.
ERRNOReturns the error number for the most recent error to be caught using flag 25.
FUNCSave the contents of the stack and LASTx, and restore then when the function returns, according to the parameter.
GETKEY1Like GETKEY, except it does not halt program execution when EXIT or Shift-EXIT are pressed.
LSTOCreates local variables that exist only for the duration of the current subroutine, and are automatically deleted when it returns.
LASTORelates to LSTO like ASTO relates to STO.
LCLVCLV for local variables. LCLV only deletes local variables that were created at the current RTN level.
NOPNo Operation, encoded as 0xF0, which corresponds to TEXT 0 in the HP-41.
PGMMENUPresents a menu of all global labels that have MVAR instructions
PGMVARPrints all the variables associated with the given LBL through MVAR declarations.
RTNERRReturn Error from a function.
RTNNOReturn from conditional function, RTNNO causes the line after the calling XEQ to be skipped.
RTNYESReturn from conditional function, return to the line after the calling XEQ.
SKIPSkips the next line, like a test that always tests false.
SST↑Step Out: Starts program execution, continuing until just after the end of the current function.
SST→Step Over: Executes one line of code, and if that line is a function call, it is executed in that one step.
SST↓Step Into: Executes one line of code, alias for the original SST function. Not in CATALOG.
TYPE?Returns an integer, representing the type of the object in the X register.
1: Real Number, 2: Complex Number, 3: Real Matrix, 4: Complex Matrix, 5: String, 6: List
VARMENU1Modified version of VARMENU.
X=? X≠? X<? X>? X≤? X≥?
Compare X to any register or variable.
0=? 0≠? 0<? 0>? 0≤? 0≥?
Compare any register or variable to 0.

String and List Functions

These string functions introduced by Free42 work with unlimited-length strings, on the stack. (see XSTR for creating such strings)
APPENDAdds the object in X to the string or list in Y. If Y is a string, the contents of X will be converted to a string. If X is a list, it will be added to Y as one element.
C→NConvert character to number.
EXTENDAdds the object in X to the string or list in Y. If Y is a string, the contents of X will be converted to a string. If X is a list, it will be added to Y element by element.
HEADRemoves and returns the first character or element from the string or list named by the function's parameter.
LENGHTReturns the length of the string or list in X.
→LISTCreates a list from objects on the stack. The number of objects is taken from the X register.
LIST→Performs the inverse of the →LIST operation.
LIST?Tests whether the object in X is a list.
LXASTOLike LASTO, but the entire ALPHA register, not just the first 6 characters.
NEWLISTReturns a new empty list.
NEWSTRReturns a new empty string. Equivalent to XSTR "".
N→CConvert number to character.
N→SConvert number to string.
POSFinds the first occurrence of the string/list X in Y. Or of the string/list X in Z starting from Y.
REVReverse the string or list in X.
SUBSTRFrom the string/list in Z, gets the substring/sublist starting at index Y and ending just before index X.
S→NConvert string to number.
XASTOLike ASTO, but the entire ALPHA register, not just the first 6 characters.
XSTRCreate a string directly in the X register, without needing the ALPHA register and without the six-character limit of ASTO.
XVIEWThis function works just like AVIEW, except it takes the text from the X register rather than the ALPHA register, so it doesn't have the 44-character length restriction of AVIEW.

Stack

The big stack functions are enabled only if the option "Dynamic Stack Extension" is checked in Setup → Settings.
4STK4-level Stack. Turns off big stack mode, returning to the TZYX stack.
DEPTHReturns the current stack depth.
DROPDrops level 1. In 4-level mode, the stack is replenished with zeroes from the top.
DROPN nDrops levels 1..n. In 4-level mode, the stack is replenished with zeroes from the top.
DUPDuplicates level 1.
DUPN nDuplicates levels 1..n. In 4-level mode, n must be 2 or less.
L4STKLocal 4-level Stack, automatically restore the previous stack mode when the current function returns.
LNSTKLocal N-level Stack, automatically restore the previous stack mode when the current function returns.
NSTKN-level Stack. Turns on big stack mode.
PICK nGets the object from level n.
R↑N nRolls up levels 1..n. R↑ is equivalent to R↑N depth.
R↓N nRolls down levels 1..n. R↓ is equivalent to R↓N depth.
UNPICK nPuts an object into level n. Consumes the contents of level 1, unlike STO, and n refers to the stack level number after X has been dropped.

Other Extensions

A2LINECreate program lines containing the current contents of the ALPHA register, to be set.
A2+LINECreate program lines containing the current contents of the ALPHA register, to be appended.
CAPSNOP on the DM42 which is always in Mixed mode.
FMAFused Multiply-Add. Calculates Z*Y+X using the DM42's native FMA function.
MixedNOP on the DM42 which is always in Mixed mode.
PCOMPLEXWorks like COMPLEX, but always in polar mode.
RCOMPLEXWorks like COMPLEX, but always in rectangular mode.
STRACEStack Trace mode. Variation on TRACE mode, printing the entire stack instead of just X.
X2LINECreate program lines containing the current contents of the X register, to be set.

Not in CATALOG

SST↓Step Into: Executes one line of code, alias for the original SST function.
WIDTH
HEIGHT
Get the display size, in pixels. The main use of these functions is to make programs that use PIXEL and AGRAPH resolution-independent.


HP41 Function Names

Some function names used in the DM42 are different from those on the HP-41, even though they work identically.
The HP-41 function names do not appear in the function catalog, when executed they are automatically converted to the corresponding DM42 function.

HP-41DM42
CHS+/-
DEG→DEG
D-R→RAD
ENTER↑ENTER
FACTN!
FRCFP
HMS→HMS
HR→HR
INTIP
OCT→OCT
P-R→REC
RDNR↓
R-D→DEG
R-P→POL
ST+STO+
ST-STO-
ST*STO×
ST/STO÷
X<=0?X≤0?
X<=Y?X≤Y?
*×
/÷


Using the ALPHA Menu

To type an alpha string into the alpha register:
  1. Press ALPHA to select the ALPHA menu.
  2. Optional: press ENTER to turn on the cursor (in Program-entry mode, inserts the I- symbol).
  3. Type the string using the characters shown below. Use shift to type lowercase letters.
  4. Press EXIT or ENTER

Flags

Flags 0-10 are indicated by annunciators at the top of the display.
Flags 36-80 are read-only and cannot be altered with SF, CF, FS?C, or FC?C.

Virtual variables

The concept of "Virtual Variables" is used to manage some of the new features specific to the DM42 calculator. These are variables that do not (and cannot, for that matter) exist in the DM42's variable table, but are used to read or change state variables specific to DM42.
DevID(read-only) Hardware device ID
GrMod(read-write) Graphic Modes
  • 0 = HP-42S resolution 131x16
  • 1 = reserved for future use
  • 2 = DM42 half resolution 200x120
  • 3 = DM42 full resolution 400x240
ResX(read-only) X-resolution for current graphics mode set in GrMod
ResY(read-only) Y-resolution for current graphics mode set in GrMod
Vbat(read-only) battery voltage


F-Buttons

The top row consists of six unprinted buttons referenced as F-Buttons (F1-F6) or soft-menu buttons.
Note that font changes using F5/F6 affect displaying of calculator stack and font in program mode and are stored independently for both stack and program mode.

Screenshot

Pressing SHIFT and DISP simultaneously makes a screenshot and saves a BMP graphics file in the folder /SCREENS.
The file name is made up by the current date and time.

Setup Menu



Setup Menu → File

Save and Load DM42 Programs to FAT Disk as *.raw files.

Setup Menu → Calculator State

The complete calculator state can be saved and loaded as one file (*.f42).

Setup Menu → Settings


Setup Menu → System

Warning: Certain actions in this menu can destroy all stored data of the calculator.
Please run 'Save Calculator State' in 'File' menu first to preserve data over potential RESET.


About


Top