mad — compiler for MAD (Michigan Algorithmic Decoder)


mad [-c ] [-d ] [-g ] [-I ] [-l ] [-L ] [-o target] [-S ] [file...]


This program is a work of reconstructive archeology, a compiler for the Michigan Algorithmic Decoder (MAD) language from 1962. It first translates MAD code into C, then uses the local C compiler to make an executable binary.

For details on the MAD language, see the MAD reference manual which is shipped with the distribution and available at the project website.


Options are as follows:


Generate an object file, ".o", for each MAD source file.


Debug. Enables verbose progress messages from parser and lexer.


Specify name of executable output binary; if there is more than one input file the name of the first file is used.


Dump tuples from which code is generated.


Specify name of additional include directories.


Specify name of additional library files.


Specify name of additional library directories.


Generate a 'C' source file, "*.c", for each MAD source file.

When MAD is called as a filter, the generated C is written to standard output as though -c had been used.


Because the semantics of MAD assumes an integer occupies a 36-bit word, code generated by this compiler may fail in obscure ways on a 32-bit machine. Code generation assumes that a MAD integer fits in a C int and is thus best performed on a 64-bit machine.


Eric S. Raymond . There is a MAD resource page at