]> thyrsus.com Git - mad.git/commitdiff
Page numbers all through, index entries up to asterisk.
authorEric S. Raymond <esr@thyrsus,com>
Sun, 20 Jun 2004 04:57:51 +0000 (04:57 +0000)
committerEric S. Raymond <esr@thyrsus,com>
Sun, 20 Jun 2004 04:57:51 +0000 (04:57 +0000)
doc/mad-manual.xml

index 5c9dfabe68b45fc05ed41dd30547b717d956b17e..0487e86298a115d496ff3ca6d9b49ce83c7ac107 100644 (file)
@@ -510,6 +510,7 @@ University of Michigan students and staff.</para>
 <para>In order to present a problem to a digital computer for
 solution, it is necessary to transmit to the machine a statement of
 the problem, a procedure for solving it (usually called an algorithm
+<indexterm><primary>Algorithm</primary></indexterm>
 for the solution of that problem), and the data which is needed in the
 solution.  In fact, a statement of the problem is not really
 necessary, since the algorithm and data are sufficent for a computer,
@@ -970,21 +971,21 @@ format description also causes the printing of some constant
 alphabetic information preceding thenumber; namely, the remark
 "A TOO SMALL, A = ".</para></listitem>
 
-<listitem><para>The next two statements following the last TRANSFER TO ST
-set the initial values of two vectors named ALPHA and BETA.
-Although VECTOR VALUES statements can be used to preset
-vectors to specified numeric values, in both instances here
-the values are <emphasis>format descriptions</emphasis>.  The
-strings of characters between the dollar signs (MAD quotation
-marks!) are to be taken literally as they appear and stored in
-designated vectors.  The actual format specifications are
-described in more detail in Chapter II, but, for example, the
-first description: S1,3F15.6* means that the first item is to
-be a space (S1), followed by three (3) numbers printed with a
-decimal point but no exponent (F), each occupying fifteen card
-or print positions (15), and that there will be six positions
-to the right of the decimal point (.6).  The asterisk (*)
-indicates the termination of the description.</para></listitem>
+<listitem><para>The next two statements following the last TRANSFER TO
+ST set the initial values of two vectors named ALPHA and BETA.
+Although VECTOR VALUES statements can be used to preset vectors to
+specified numeric values, in both instances here the values are
+<emphasis>format descriptions</emphasis>.  The strings of characters
+between the dollar signs (MAD quotation marks!) are to be taken
+literally as they appear and stored in designated vectors.  The actual
+format specifications are described in more detail in Chapter II, but,
+for example, the first description: S1,3F15.6* means that the first
+item is to be a space (S1), followed by three (3) numbers printed with
+a decimal point but no exponent (F), each occupying fifteen card or
+print positions (15), and that there will be six positions to the
+right of the decimal point (.6).  The asterisk
+(*)<indexterm><primary>Asterisk</primary></indexterm> indicates the
+termination of the description.</para></listitem>
 
 <listitem><para> The final statement indicates the end of the statements
 and is the last statement executed when a definite termination
@@ -1158,20 +1159,22 @@ constants with exponent are;
 "-" sign.  Positive constants may be preceded by a "+" sign.</para>
 </sect3>
 
-<sect3><title>Alphabetic Constants</title>
-<para>An alphabetic consists of from one to six admissible
-characters preceded and followed by the character "$".  The admiss-
-ible characters include all letters of the alphabet, the digits 0
-through 9, the special characters +, -(minus sign), -(dash), *,
-/, =, ). (. ., the comma "," and the blank space, to be represented
-here occasionally (but not punched on input cards), as the character
-"&squ;".  Thus the following are alphabetic constants: $ABCD$, $TO BE$,
-$DEC. 4$, $5 +3=8$.  Note that blank spaces, while ignored elsewhere
-in the language, count as characters in alphabetic constants. An
-alphabetic constant is stored internally as an integer, and any
-constant containing fewer than six characters will be extended to six
-characters by adding blanks on the right; thus $ABCD$ will appear
-internally as $ABCD&squ;&squ;$
+<sect3><title>Alphabetic Constants</title> <para>An alphabetic
+constant<indexterm><primary>Alphabetic Constants</primary></indexterm>
+consists of from one to six admissible
+characters<indexterm><primary>Admissible
+Characters</primary></indexterm> preceded and followed by the
+character "$".  The admiss- ible characters include all letters of the
+alphabet, the digits 0 through 9, the special characters +, -(minus
+sign), -(dash), *, /, =, ). (. ., the comma "," and the blank space,
+to be represented here occasionally (but not punched on input cards),
+as the character "&squ;".  Thus the following are alphabetic
+constants: $ABCD$, $TO BE$, $DEC. 4$, $5 +3=8$.  Note that blank
+spaces, while ignored elsewhere in the language, count as characters
+in alphabetic constants. An alphabetic constant is stored internally
+as an integer, and any constant containing fewer than six characters
+will be extended to six characters by adding blanks on the right; thus
+$ABCD$ will appear internally as $ABCD&squ;&squ;$
 </para>
 
 <note><para>The Retrocomputing Museum implementation neither enforces
@@ -1189,7 +1192,8 @@ machine word.</para></note>
 
 <para>The name of a variable consists of one to six letters or digits,
 the first of which must be a letter.  If the variable is defined as an
-n-dimensional array variable (see <xref
+n-dimensional array variable<indexterm><primary>Array
+Variables</primary></indexterm> (see <xref
 linkend='dimension_declaration'/>) then the name of an element of the
 array consists of the variable name, (i.e one to six letters or
 digits, starting with a letter), followed by the appropriate
@@ -1232,10 +1236,13 @@ and COS. (X) are values of functions.</para>
 </sect2>
 
 <sect2><title>Arithmetic Operations</title>
-<para>The following arithmetic operations are available:</para>
+<para>The following arithmetic
+operations<indexterm><primary>Arithmetic
+Operattions</primary></indexterm> are available:</para>
 
 <orderedlist numeration='loweralpha'>
-<listitem><para>Addition, written as "+", e.g., Z5 + D.</para></listitem>
+<listitem><para>Addition, written as "+", e.g., Z5 + D.
+<indexterm><primary>Addition</primary></indexterm></para></listitem>
 
 <listitem><para>Subtraction, written as "-", e.g., Z5 - D.  (Note,
 both the minus sign and the dash are accepted.)</para></listitem>
@@ -1266,7 +1273,9 @@ means -(X<superscript>-.5</superscript>).
 
 <sect2><title>Arithmetic Expressions</title>
 
-<para>Arithmetic expressions are defined inductively as follows:</para>
+<para>Arithmetic expressions<indexterm><primary>Arithmetic
+Expressions</primary></indexterm> are defined inductively as
+follows:</para>
 
 <orderedlist numeration='loweralpha'>
 <listitem><para>All integer, floating point, and alphabetic constants,
@@ -1277,7 +1286,8 @@ values of functions are arithmetic expressions.</para></listitem>
 <listitem><para>If E and F are any arithmetic expressions and V and
 individual or subscripted array variable, then the following
 are also arithmetic expressions: +E, -E, .ABS.E, E + F, E - F,
-E * F, E/F, E.P.F, and (E).</para></listitem>
+E * F, E/F, E.P.F, and (E).<indexterm><primary>.ABS.</primary></indexterm>
+<indexterm><primary>Absolute Value</primary></indexterm></para></listitem>
 
 <listitem><para>The only arithmetic expressions are those arising in
 (a) and (b).</para></listitem>
@@ -1298,7 +1308,8 @@ language (where M and P are boolean expressions):</para>
 have the value 0B.</para></listitem>
 
 <listitem><para>M.AND.P has the value 1B if and only if both M and P
-have the value 1B.</para></listitem>
+have the value 1B.
+<indexterm><primary>.AND.</primary></indexterm></para></listitem>
 
 <listitem><para>M.THEN.P has the value 0B if and only if M has the
 value 1B and P has the value 0B.</para></listitem>
@@ -2354,10 +2365,11 @@ read.  (Occasionally, the information is contined entirely in the
 format specification, so the list may be empty.)  A format
 specification is a string of alphabetic characters (as 
 <!-- beginpage II.26 --> 
-described below) terminated by an "*".  This string is stored six
-characters per computer word in a vector with integer mode.  This
-vector may be preset (see <xref linkend='VECTOR_VALUES'/>), computed,
-or read in as data.</para>
+described below) terminated by an "*"<indexterm><primary>Array
+Variables</primary></indexterm>.  This string is stored six characters
+per computer word in a vector with integer mode.  This vector may be
+preset (see <xref linkend='VECTOR_VALUES'/>), computed, or read in as
+data.</para>
 
 <sect3 id='carriage_control'><title>Carriage Control</title>
 
@@ -2921,7 +2933,8 @@ linkend='statement_labels'/>).</para></listitem>
 <xref linkend='funcdefs'/>).</para></listitem>
 
 <listitem><para>A vector appearing as the dimension vector of some
-array in a dimension declaration is assigned integer mode (see <xref
+array<indexterm><primary>Array Variables</primary></indexterm> in a
+dimension declaration is assigned integer mode (see <xref
 linkend='dimension_declaration'/>).</para></listitem>
 
 <listitem><para>A vector which is preset by a vector values
@@ -3076,7 +3089,8 @@ not have the same mode.  The mode must be established by the
 appropriate MODE declaration for each of the variables.  Occurrences
 within an EQUIVALENCE declaration do not establish mode.</para>
 
-<para>A nonsubscripted array variable name in an EQUIVALENCE statement
+<para>A nonsubscripted array variable<indexterm><primary>Array
+Variables</primary></indexterm> name in an EQUIVALENCE statement
 represents that element of the array (considered as a one-dimensional
 vector) whose subscript is zero.  Reference in an EQUIVALENCE
 statement to an array element of any number of dimensions may be made
@@ -3251,26 +3265,26 @@ III.</para>
 
 <sect3 id='external_functions'><title>External Function Definitions</title>
 
-<!--
-In the original, "variables and functions in the main program" was
-typoed as "variables and function in the main program" (incorrect
-singular).
--->
-<para>These statements define functions not yet available in the
-language or as standard package programs ("subroutines").  The
-designatyion "EXTERNAL" implies that the statements which follow are
-to be translated indpendently of the main program in which they are to
-be used.  (Because of this independence this block of statements is to
-be considered an entirely separate program, and must have its own
-DIMENSION and MODE declaration, etc.)  The word "EXTERNAL" also
-implies that occurrences of variables and functions in the current
-function definition program have no relation whatever with occurrences
-of similarly named variables and functions in the main program
-(or other definition programs), and no difficulties will be
-encountered because of the use of similar names.  The modes of the
-arguments (if other than the normal mode), must be declared in the
-usual way (see <xref linkend='mode_declaration'/>), but arrays which
-are arguments need not be dimensioned.</para>
+<!-- In the original, "variables and functions in the main program"
+was typoed as "variables and function in the main program" (incorrect
+singular).  --> <para>These statements define functions not yet
+available in the language or as standard package programs
+("subroutines").  The designation "EXTERNAL" implies that the
+statements which follow are to be translated indpendently of the main
+program in which they are to be used.  (Because of this independence
+this block of statements is to be considered an entirely separate
+program, and must have its own DIMENSION and MODE declaration, etc.)
+The word "EXTERNAL" also implies that occurrences of variables and
+functions in the current function definition program have no relation
+whatever with occurrences of similarly named variables and functions
+in the main program (or other definition programs), and no
+difficulties will be encountered because of the use of similar names.
+The modes of the arguments (if other than the normal mode), must be
+declared in the usual way (see <xref linkend='mode_declaration'/>),
+but arrays<indexterm><primary>Array Variables</primary></indexterm>
+which are arguments need not be
+dimensioned.<indexterm><primary>Arguments of
+Functions</primary></indexterm></para>
 
 </sect3>
 <sect3 id='internal_functions'><title>Internal Function Definitions</title>
@@ -3288,8 +3302,9 @@ variables and functions will be used.  Names of variables and
 functions which occur as arguments of the function being defined are
 designated "dummy arguments" (or "bound variables").  They must be
 distinct from those appearing elsewhere in the program.  The modes of
-dummy arguments (if other than normal mode) must de declared in the
-usual way, but arrays which are arguments need not be
+dummy arguments (if other than normal mode) must be declared in the
+usual way, but arrays<indexterm><primary>Array
+Variables</primary></indexterm> which are arguments need not be
 dimensioned.</para>
 
 <para>One form of internal function definition (not available as an external
@@ -3462,11 +3477,12 @@ follows.)</para>
 
 <para>The list of dummy variables in the declaration statement itself
 (statement A in the preceding paragraph) may contain only
-nonsubscripted variable names (either individual or array) or function
-names (without arguments).  Within the definition program itself (the
-statements between statement A and statement B), a function name will
-usually occur with arguments, and an array variable will usually occur
-with subscripts.</para>
+nonsubscripted variable names (either individual or
+array)<indexterm><primary>Array Variables</primary></indexterm> or
+function names (without arguments).  Within the definition program
+itself (the statements between statement A and statement B), a
+function name will usually occur with arguments, and an array variable
+will usually occur with subscripts.</para>
 
 <para>A few comments about the last example.  This definition program
 defines a single-valued function of X, called INVSF..  Since no mode
@@ -4394,6 +4410,7 @@ file.</para>
 </sect2>
 <!-- beginpage III.42 -->
 <sect2><title>Example 4<emphasis role='note'>: Actuarial computation</emphasis></title>
+<indexterm><primary>Actuarial Example</primary></indexterm>
 
 <para><emphasis>Problem</emphasis>: Computation of actuarial commutation
 columns based on an arbitrary set of mortality rates and an interest
@@ -4905,9 +4922,10 @@ during the reading or the writing of magnetic tape.</para></listitem>
 <term>SETERR</term>
 <listitem><para>This name may appear explicitly in the form
 SETERR.(S), where S is an expression in statement label mode
-designating a point of return after an illegal data character or
-illegal format specification has been encounterered by an input-output
-subroutine.</para></listitem>
+designating a point of return after an illegal data 
+<!-- beginpage IV.6 -->
+character or illegal format specification has been encounterered by an
+input-output subroutine.</para></listitem>
 </varlistentry>
 
 </variablelist>
@@ -4918,6 +4936,7 @@ input-output routines call ERROR.</para>
 </sect1>
 </chapter>
 
+<!-- beginpage DEFINE.1 -->
 <appendix><title>The DEFINE Statement in MAD</title>
 
 <note><para>DEFINE is not supported in the Retrocomputing Museum
@@ -4966,6 +4985,7 @@ complete explanation which follows it.</para>
 periods (e.g. .LOGADD.).</para>
 
 </sect1>
+<!-- beginpage DEFINE.2 -->
 <sect1><title>Modes</title>
 
 <para>The modes already existing in MAD are referred to in operator
@@ -5010,16 +5030,18 @@ as before, except within operator and conversion definition programs.</para>
 </mediaobject>
 
 <para>where .NAME. is the name of the operator being defined (the operator
-may be either binary or unary), and .OPER. is the name or symbol of
-some exist&shy;ing or previously defined operator.  This statement
-establishes the precedence (relative to the missing-parenthesis
-convention) of the operator .NAME. as being (1) immediately above that
-of .OPER. (but below all those already above .OPER.), (2) equal to
-that of .OPER., or (3) immediately below that of .OPER. (but above all
-those already below .OPER.). The name .OPER. could also be a single
-character, such as *, +(binary), -(binary), or /.  Unary minus can be
-referred to in such statements by the name -U.  Unary plus should not
-be used.</para>
+may be either binary or unary), and .OPER. 
+is the name or symbol of some exist&shy;ing or previously defined
+operator.  This statement establishes the precedence (relative to the
+missing-parenthesis convention) of the operator .NAME. as being (1)
+immediately above that of .OPER. (but below all those already above
+.OPER.), (2) equal to that of .OPER., or (3) immediately below that of
+.OPER. 
+<!-- beginpage DEFINE.3 -->
+(but above all those already below .OPER.). The name .OPER. could also
+be a single character, such as *, +(binary), -(binary), or /.  Unary
+minus can be referred to in such statements by the name -U.  Unary
+plus should not be used.</para>
 
 </sect1>
 <sect1><title>The MODE STRUCTURE STATEMENT</title>
@@ -5061,6 +5083,7 @@ will be made below to schemes of "type 1" and "type 2" as indicated
 above, and to the M and N contexts and the mode number r which appear
 in these schemes.</para>
 
+<!-- beginpage DEFINE.4 -->
 <para>After the DEFINE statement (but not necessarily immediately
 after) must be one or more <emphasis>sequence definition
 programs</emphasis>.  Each of these programs consists of one MODE
@@ -5104,6 +5127,8 @@ programs:</para>
 MAD language or appear in the M position in another MODE STRUCTURE
 statement.</para>
 
+<!-- beginpage DEFINE.5 -->
+
 <para>(2) Every context appearing in the program containing the
 definition program must appear in an M position in some MODE STRUCTURE
 statement.  This applies in particular to contexts occurring in N
@@ -5154,6 +5179,7 @@ illustrated in the example by the instruction</para>
 
 <para role='centered'>JMP *+1, MQ, *+7</para>
 
+<!-- beginpage DEFINE.6 -->
 <para>This refers to the symbol MQ, which is one of four logical
 propositions:</para>
 
@@ -5239,6 +5265,7 @@ operation must be stored if not used.  This temporary may not be used
 for any other purpose.</para>
 </listitem>
 </varlistentry>
+<!-- beginpage DEFINE.7 -->
 <varlistentry>
 <term>T + integer constant -</term>
 <listitem>
@@ -5297,7 +5324,7 @@ sequence.)</para>
 multiplication if it were not already in the MAD language.  The three
 sequence definition programs define floating point multiplication and
 two conversions, respectively.</para>
-
+<!-- beginpage DEFINE.8 -->
 <programlisting>
        DEFINE BINARY OPERATOR .FMPY., PRECEDENCE SAME AS *(
        MODE STRUCTURE 0 .FMPY.0 TO 0
@@ -5345,7 +5372,7 @@ FAD       CF
 OUT    AC
 END
 </programlisting>
-
+<!-- beginpage DEFINE.9 -->
 <para>(2) The unary operator .SHIFT., which shifts an integer in the
 address part into the decrement part of a word, would be defined as
 follows (where mode 5 indicates an integer in the decrement part of
@@ -5396,7 +5423,7 @@ END
 program reference (LOC) is the operator .BIT., a Boolean binary
 operator whose value is 1B if A has a 1 in bit position B, and 0B
 otherwise.  (Bits are numbered here from the left, 0-35.)</para>
-
+<!-- beginpage DEFINE.10 -->
 <programlisting>
        DEFINE BINARY OPERATOR .BIT., PRECEDENCE SAME AS .E.
 
@@ -5442,6 +5469,7 @@ the rest of the instruction in (or after) column 12.  Blanks are
 ignored throughout, except in operating codes.</para>
 
 </sect2>
+<!-- beginpage DEFINE.11 -->
 <sect2><title>Operation Codes</title>
 
 <programlisting>
@@ -5487,7 +5515,7 @@ LBT
 </sect2>
 </sect1>
 </appendix>
-
+<!-- beginpage SIMPLIFIED.1 -->
 <appendix><title>Simplified Input-Output Statements</title>
 
 <sect1><title>(a) READ DATA</title>
@@ -5539,6 +5567,7 @@ may be values of single integer variables.  Longer strings of
 Hollerith characters may be entered as elements of arrays.  Such
 strings are divided into six character groups for storage.</para>
 
+<!-- beginpage SIMPLIFIED.2 -->
 <para>As an example illustrating many of the features described herein
 consider the data card set:</para>
 
@@ -5606,7 +5635,7 @@ simply preceded by ... .</para>
 </sect1>
 </appendix>
 <appendix><title>Supplement to the MAD Manual</title>
-
+<!-- beginpage SUPPLEMENT.1 -->
 <para role='centered'>November 15, 1960</para>
 
 <para>The notes which appear below describe several new features which have
@@ -5646,13 +5675,15 @@ code for that mode.  The digit codes are:</para>
 <para>The new modes 5, 6, and 7, which may be defined as described in
 the Appendix, may also be used.  The constant is converted
 <emphasis>as usual</emphasis>, but then is assigned the indicated
-mode, if the letter M is used.  Thus, if some new mode numbered 6 were
-defined for certain integers, then the appearance of the constant 32M6
-would assign mode 6 to the decimal integer 32.  The appearance of
-32KM6 would assign mode 6 to the octal constant 32, and the appearance
-of $AB$M6 would assign the mode 6 to the constant $AB$.  Similarly,
-the appearance of 32.1E-1M6 would assign mode 6 to the number 3.21
-which appears in storage in the usual floating point form.</para>
+mode, if the letter M is used.  Thus, if some new mode numbered 
+<!-- beginpage SUPPLEMENT.2 -->
+6 were defined for certain integers, then the appearance of the
+constant 32M6 would assign mode 6 to the decimal integer 32.  The
+appearance of 32KM6 would assign mode 6 to the octal constant 32, and
+the appearance of $AB$M6 would assign the mode 6 to the constant $AB$.
+Similarly, the appearance of 32.1E-1M6 would assign mode 6 to the
+number 3.21 which appears in storage in the usual floating point
+form.</para>
 
 <para>(4) A subroutine is not available, called ZERO., which will
 accept as arguments single variables or blocks (i.e., an "input list")
@@ -5687,10 +5718,12 @@ SAP, as usual.  The arguments must be the array name, followed by the
 n subscripts (integer expressions) in the usual order.  The value of
 the function which is to be computed is the <emphasis>linear
 subscript</emphasis> to be used to obtain the value desired.  For
-example, if one wished to store only the upper triangle (plus
-diagonal) of an upper triangular two-dimensional array (by rows,
-starting as A(2)), the subscription function F, could be defined as
-follows: (We shall assume a constant zero stored at A(1))</para>
+example, if one wished to store only 
+<!-- beginpage SIMPLIFIED.3 -->
+the upper triangle (plus diagonal) of an upper triangular
+two-dimensional array (by rows, starting as A(2)), the subscription
+function F, could be defined as follows: (We shall assume a constant
+zero stored at A(1))</para>
 
 <mediaobject>
   <imageobject>
@@ -5731,11 +5764,13 @@ stored as originally described in the MAD manual.  Thus, subroutines
 do not need to know whether a calling program is or is not using such
 storage conservation functions.</para>
 
+<!-- beginpage SIMPLIFIED.4  at soft hyphen-->
+
 <para>Two special subscription functions are available from the subroutine
 library: (a) SYMM. will handle two-dimensional symmetric arrays for
 which only the upper half (plus diagonal) is stored by rows.  (b)
 TRANSP. will handle a two dimensional array stored by rows (in full)
-but considered to be in transposed form.  In other words, if a matrix
+but considered to be in trans&shy;posed form.  In other words, if a matrix
 B is designated as having subscription function TRANSP., then a call
 of B(6,2) will, in fact, produce the linear subscript of B(2,6).</para>
 
@@ -5777,6 +5812,7 @@ to left, and the one most likely to be "true" in a conjunction, and
 the one most likely to be "false" in a conjunction, should be placed
 as far toward the right end of the expression as possible.</para>
 
+<!-- SIMPLIFIED.5 -->
 <para>Thus, if one were testing for values of X between 0 and 2 and
 between 5 and 6, one might write</para>
 
@@ -5821,7 +5857,7 @@ subroutine</emphasis>.</para>
 same as the precedence of .OR., and its definition is: M .EXOR. N has
 the value 1B if and only if either M or N has the value 1B, but not
 both.</para>
-
+<!-- SIMPLIFIED.6 -->
 <para>(11) Most diagnostic comments printed for errors in part I of
 the translation now include references to the appropriate section of
 the MAD manual.  These references appear in parentheses following the
@@ -5844,7 +5880,10 @@ subscript restrictions still hold, i.e.  i &le; 0, (V(i)+j) &le; 0.  For
 example, if A is a 4 x 3 matrix (m = 4, n = 3) and b = 1, then V(1) =
 0, V(2) = 3, V(3) 6, and V(4) = 9.</para>
 
+<!-- stray index entries go here -->
+<indexterm><primary>Array</primary><see>Vector</see></indexterm>
 </appendix>
+
 </book>
 <!--
 Local Variables: