DM42 Programming tool

Listing copied

Encoder/Decoder

DM42 Listing: (copy to clipboard) PC: Hex Code:
Status:
Upload and decode .raw file:

Select a .raw file to upload from your computer. It will be decoded and the corresponding listing displayed above.

Encode and download .raw file:

Click on the Encode button to encode your program and then download it as a .raw file by clicking on the Download button.

A few notes on program input:

Please note that you do not have to prefix a program that you enter with a line such as:

00 { nn-Byte Prgm }

Nor do you have to enter line numbers. Both of these will be added automatically when you click on the "Encode »" or "« Decode" button provided there are no errors in your program or hex data.

Comments can be entered either on their own on lines or after DM42 instructions. An '@' sign and anything following it will be considered as a comment and not contribute to the encoded raw data. There is, however, some scope for ambiguity when an '@' sign appears inside a string, program name or variable name. Take the following example:

01 "1" @ "1" or "2"

Does this represent the string 1" @ "1" or "2 or does it represent the string 1 followed by the comment @ "1" or "2"?

This is where the "Greedy comments" checkbox comes in. If it is checked, then the parser will attempt to match as much of the program line as possible to a comment and the above line will be interpreted as the string 1 followed by the comment @ "1" or "2". If, on the other hand, the checkbox is unchecked then the parser will try and match as much of the line as possible to actual program instructions, meaning that the above example will be interpreted as the string 1" @ "1" or "2.

Special sequences such as \GS (see below) in comments can be translated to their Unicode equivalents if the "Translate comments" checkbox is checked. Eg. if this is the case then the line:

01 SQRT @ calculate \v/X

...will be translated to:

01 SQRT @ calculate √X

Many of the characters used in HP-42S/DM42 programs cannot be entered directly with a keyboard. In order to help with this, we provide several special "codes" that you can use and there are also easy-to-type mnemonics for instructions that use them. This encoder also accepts HP-41 style instructions, eg. you can type ST/ 10 instead of STO÷ 10 or RCL T instead of RCL ST T.

The table below shows what equivalent instructions you can use and also gives the HP-41 equivalent that you can use if there is one. If you do use an HP-41 equivalent, it will subsequently be "translated" back to the HP-42S version in the final listing.

In order to get: You can type:
HP-42S/DM42 style HP-41 style
R↑ R^  
R↓ R\v or Rv RDN
ENTER   ENTER^
Σ+, Σ-, CLΣ, PRΣ, ΣREG, ΣREG? \GS+, \GS-, CL\GS, \GSREG, \GSREG?
SUM+, SUM-, CLSUM, PRSUM, SUMREG, SUMREG?
 
X≠0?, X≤0?, X≥0? X#0?, X<=0?, X>=0?
├"string" (append to alpha) |-"string"
→POL, →REC \->POL, \->REC R-P, P-R
→DEG, →RAD \->DEG, \->RAD R-D, D-R
→OCT, →DEC \->OCT, \->DEC
+/- CHS
N! FACT
IP, FP INT, FRC
→HMS, →HR \->HMS, \->HR HMS, HR
×, ÷ x, / *, /
STO+, STO- ST+, ST-
STO×, STO÷ STO*, STO/ ST*, ST/
STO ST Y, STO IND ST Y STO Y, STO IND Y

You will also need similar codes to type the special characters in strings, labels and variable names:

In order to get: You type (case-sensitive!):
÷ \:-
× \x
\v/
\S
\FUZ
Σ \GS
\|>
π \PI
¿ \?
\<=
line feed [LF]
\>=
\#
\</
\v
\->
\<-
£ \PND
μ \m
° \o
Å \Ao
Ñ \N~
Ä \A"
\<\
\E
Æ \AE
\...
Escape character [ESC]
Ö \O"
Ü \U"
\.

Version History