Introduction
A .DMO file is a demonstration for
Derive, the
computer algebra system for DOS made by Soft Warehouse of Honolulu. It is a plain text
file of expressions to work through, with comment lines that say what each one shows.
Derive’s help file lists a Demo command, “run demonstration in DMO file”. The
copy of Derive 2 on this Mac came with six: ALGEBRA.DMO,
ARITH.DMO, CALCULUS.DMO, FUNCTION.DMO,
MATRIX.DMO and TRIG.DMO.
The syntax is the same as in a .MTH utility file, with one difference: comments are lines that start with a semicolon, and nothing is wrapped.
Structure
Like a utility file, a demo is lines of ASCII text ending in 0D 0A, with a
1A (Ctrl-Z) byte after the last line. All six files end that way. There is
no signature and no header.
| Line | Looks like | Meaning |
|---|---|---|
| Comment | ; Cross product of two vectors | Starts with ;, runs to the end of the line. It describes the expression that follows |
| Expression | CROSS([1, 2, 3],[a, b, c]) | A Derive expression, a step of the demo. A definition such as OUTER(v,w):=… is a step like any other, and is used by the steps after it |
| Blank | Separates a step with its comment from the next |
Unlike in a utility file, expressions are written as people type them: spaces round
operators, no brackets round the argument of a function (LN 6 - LN 2,
EXP LN x, DET [[1, a], [1, x]]), and a product by juxtaposition
(2 x^3). The files use no ~ continuation (none of the six has a
line ending in one), and long expressions stay on one line, up to 114 characters.
; Expands as necessary to simplify expressions
(x+a)^2-2*a*x
; Define OUTER to compute the outer product
OUTER(v,w):=VECTOR([ELEMENT(v,i)],i,DIMENSION(v)).[w]
; The outer product of two vectors
OUTER([a, b, c], [2, 3, 4])
ALGEBRA.DMO and MATRIX.DMOThe comment before an expression is its caption. Some steps have none, when the
previous comment covers several lines of working, as in TRIG.DMO and
FUNCTION.DMO.
A worked example
The first 0x30 bytes of ALGEBRA.DMO, and its last 16. The comment is a
line of its own, and the expression after it starts at 0x30.
00000000: 3b20 4578 7061 6e64 7320 6173 206e 6563 ; Expands as nec
00000010: 6573 7361 7279 2074 6f20 7369 6d70 6c69 essary to simpli
00000020: 6679 2065 7870 7265 7373 696f 6e73 0d0a fy expressions..
00000030: 2878 2b61 295e 322d 322a 612a 780d 0a0d (x+a)^2-2*a*x...
…
000003d0: 2b79 5e32 2f78 5e32 2d32 2929 290d 0a1a +y^2/x^2-2)))...
In the file viewer
The viewer shows the text coloured, with the comments in grey. The Overview tab has a table of the demo’s steps: the number of each, the comment before it, the expression (shortened) and its line. Text that does not read as Derive is not taken as a demo, which keeps the extension free for other formats that use it.
Related files
- .MTH: a Derive utility file, the same syntax with definitions and expressions kept for loading.
Not described
This page is a partial reference, read from the six demonstration files of Derive 2 (each found in five copies on this Mac) and nothing else.
| Item | Reference | Viewer |
|---|---|---|
| Playing a demo | Not checked against a running Derive: whether it shows each comment and waits for a key, and how it enters and simplifies each expression. That a comment is a caption and an expression a step is inferred from the file text | Does not play the demo or simplify anything; it lists the steps as text |
| Expression syntax | The typed forms seen in the six files are listed. The full grammar and the list of built-in functions are not given | Colours a fixed list of built-in function names, and does not check syntax |
| Comments | Only comments that start a line were seen. Whether a ; later in a line is a comment is unknown | Treats only a line that starts with ; as a comment |
| Later Derive versions | Demo files of later versions were not examined | Takes any text that reads as Derive |
| Step table | Not applicable | Each expression line is a step, and the comment lines before it are its caption, joined and shortened. Where several comment lines come before several expressions, the caption goes to the first expression only |
Links
Software
- Derive – the computer algebra system that plays these demonstrations (DOS, later Windows)
- Any text editor – the files are plain ASCII text with DOS line endings
Reference
- Derive (computer algebra system) – Wikipedia’s account of the program and its history