This is a disassembler (written in C) to decode Modula-2 M-Code in Lilith object (.OBJ) files.
It is derived from Niklaus Wirth's original decoder which he wrote in 1984 for the Modula-2 Single Pass Compiler. The source code for this compiler, along with the original Modula-2 sources for the decoder, were discovered in 2021.
The 1984 version of the decoder is significantly less complex than an earlier version written by Ch. Jacobi in 1981 for the Modula-2 Multipass Compiler.
This code is still work in progress. It will already run on many object files, but will not produce the correct output for most of them yet.
- Download the .tar.gz packages from the "Releases" page.
- Extract and build:
$ tar xzf mdecode-x.y.tar.gz $ cd mdecode-x.y $ ./configure $ make && make install
USAGE: mdec [-hV] [-o output_file] [object_file]
-h Show this help information
-V Show version information
-o Decode to output_file (default: STDOUT)
object_file is the filename of a Lilith M-Code (OBJ) file.
(Reads from standard input if no filename given.)
-
mdec test.OBJ
Decodes the object file test.OBJ and writes the disassembled result to standard output.
-
mdec -o test.txt test.OBJ
As above, but writes the output to the file test.txt instead.