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 is a partial reference and a partial viewer, built from the six demonstration files of Derive 2 (each found in five copies on this Mac) and nothing else.
Known, not yet covered
- Reference: Derive’s full expression grammar and list of built-in functions. They are documented in the Derive user manual, which was not available here; only the typed forms seen in the six files are listed.
- Reference: demo files of later Derive versions. They are published products and their files could be examined; they were not.
- Viewer: playing the demo or simplifying anything. The steps are listed as text.
- Viewer: syntax checking, and built-in functions beyond a fixed list of names. Others are left plain.
- Viewer: captions. Where several comment lines come before several expressions, the caption is attached to the first expression only.
Unknown
- Reference and viewer: how Derive plays a demo (whether it shows each comment and waits for a key, and how it enters and simplifies each expression). No public description was found, and it was not checked against a running Derive. That a comment is a caption and an expression a step is inferred from the file text.
- Reference and viewer: a
;after the start of a line. Only lines that start with;were seen, so whether a later;is a comment is unknown; the viewer does not treat it as one.
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