A program for typesetting data formats

Last-Updated: 2021-08-30

Sources

Goal of this program

As from the manual (142.pdf), written by the author of DFORMAT, Jon L. Bentley:

Data formats ranging from computer words to packets on a data network are often described by pictures composed of rectangles. The PDP-8, for instance, uses this instruction format:
The DFORMAT program allows such diagrams to be included in TROFF documents. The above diagram is described as
.begin dformat
style bitwid .3
PDP-8 Instr
        0-2 OP Code
	3 Indirect Bit
	4 Page-Zero Bit
	5-11 Page Address
.end
DFORMAT is implemented as a preprocessor for the PIC language. Its implementation (about 100 lines of AWK) is included in this paper.

I highly suggest you take a look at the manual only for the many diagrams illustrating the possibilities of this program.

As written by the author, the code is included in the paper but is now also hosted on github.com (sathlan/dformat).