]> thyrsus.com Git - mad.git/commitdiff
Inserted pagebreak indications.
authorEric S. Raymond <esr@thyrsus,com>
Wed, 18 Feb 2004 11:34:26 +0000 (11:34 +0000)
committerEric S. Raymond <esr@thyrsus,com>
Wed, 18 Feb 2004 11:34:26 +0000 (11:34 +0000)
doc/mad-manual.xml

index eef3f59afae7002c10a14ca1bac096192ad594b3..08cd8985f6c4b8d1d841581d1eea0e3f0ee466f4 100644 (file)
@@ -41,7 +41,7 @@ stretched from FORTRAN in 1955 until the rise to dominance of C after
 assumptions of computing in 1962 and earlier.</para>
 
 <para>Some features of MAD are only superficially odd.  The all-caps 
-listings look strange to modern eyes; the IBM 709 on which it was
+listings look strange to modern eyes; the IBM 704 on which it was
 implemented had a pre-ASCII, pre-EBCDIC six-bit character set with no
 lower-case letters and lacks several punctuation marks that later
 became standard.  The limitation to six characters in variable names,
@@ -211,7 +211,7 @@ standard output.  Printer control codes +, 1, 2 and 4 are ignored
 (treated as 0 or space). Tape and drum devices are not
 supported.</para>
 
-<para>The 709 had 36-bit words; MAD floats are translated to C
+<para>The 704 had 36-bit words; MAD floats are translated to C
 doubles, which on modern machines have 32 or 64 bits.  Precision and
 overflow of numeric results may therefore differ.  The original MAD
 limit of 6 characters on variable names, labels, and string constants
@@ -314,6 +314,9 @@ the original style in DocBook.</para>
 hand-drawn across them).  The original also some contained hand-drawn
 script characters:</para>
 
+<para role='notebox'>Redactor's comments in the body of the text are
+decorated like this.</para>
+
 <informaltable>
 <tgroup cols='2'>
 <thead>
@@ -368,7 +371,7 @@ the original.  Notably, "section 1.1" becomes "Section 1.1"
 
 <para>EPSLON and COMPLX and the like are not typos.  As pointed out
 earlier, MAD variable names are limited to the 6 characters in a
-six-bit character set that would fit in the IBM 709's 36-bit
+six-bit character set that would fit in the IBM 704's 36-bit
 word.</para>
 
 <para>A few typos in the original have been fixed; if you're really
@@ -586,9 +589,15 @@ THROUGH BACK, FOR ALPHA = 12, 3 ALPHA .G. 90 .OR. .ABS. (X+Y) .LE. EPSLON
 
 <para>Here we have substituted ".G." for ">", ".LE." for "&le;",
 ".ABS. (X+Y)" for "|x + y|".  (The reason for these simple
-substitutions is characters such as >, &le; as input to the computer.
-Such details are fully presented <!-- beginpage --> 
-in Chapter II of this manual.)</para>
+substitutions is the lack of characters such as >, &le; as input to
+the computer.  Such details are fully presented <!-- beginpage --> in
+Chapter II of this manual.)</para>
+
+<para role='notebox'>The IBM 704 on which MAD was implemented had a
+very primitive pre-ASCII character set.  It did not even include
+lowercase letters, let alone fancy punctuation like &lt; and &gt;.
+ASCII still lacks &le; and &ge;, but writing these as &lt;= and &gt;=
+became universal in later ASCII-based languages.</para>
 
 <para>The flow diagram for our previous example, then, may be
 rewritten as follows: (In order to keep the notation familiar when
@@ -737,7 +746,7 @@ the function now need only call upon it by name, as in the statement:</para>
 LARGEQ = 1. + MAX. (6,Q)/3.
 </programlisting>
 
-<para>Note that the set (in this use of MAX.) hose largest element is
+<para>Note that the set (in this use of MAX.) whose largest element is
 desired is called Q, and N has the value 6.  No DIMENSION statement is
 needed for A is the EXTERNAL FUNCTION definition program above, since
 A is there only as a "dummy variable", anyway.  When
@@ -964,10 +973,11 @@ incrementing of i is not really necessary.</para>
 </mediaobject>
 
 <!-- beginpage -->
-<!-- 
-the listing in the original was defective, missing continuation
-punches everywhere but in INTERNAL FUNCTION F.
--->
+
+<!-- This listing in the original was defective,
+missing continuation punches everywhere but in INTERNAL FUNCTION
+F. -->
+
 <programlisting>
 &newton2;
 </programlisting>
@@ -1997,6 +2007,7 @@ instructions.  (i.e. function returns).</para>
 location to be used for temporary storage.  Consecutive elements will
 be used as required by the following statements.</para>
 </listitem>
+<!-- beginpage -->
 <listitem>
 <para>SAVE DATA &scriptL;</para>
 
@@ -2043,6 +2054,7 @@ available for use by successive SAVE statements.</para>
 </listitem>
 </orderedlist>
 </sect2>
+<!-- beginpage -->
 <sect2><title>Input-Output Statements</title>
 
 <para>In this section the follwing definition the following
@@ -2112,6 +2124,7 @@ according to format &scriptF;.
 </varlistentry>
 <varlistentry>
 <term>WRITE BINARY TAPE &scriptN;, &scriptL;</term>
+<!-- beginpage -->
 <listitem>
 <para>Transmits &scriptL; to tape &scriptN; in binary form as one
 record.</para>
@@ -2174,7 +2187,7 @@ READ BCD TAPE, or READ BINARY TAPE statement the subroutine SYSTEM. (a
 subroutine which returns control to the system in which the translated
 program is imbedded) is automatically entered.  This action can be
 changed by executing the statement EXECUTE SETEOF.  (&scriptS;).  The
-subroutine SETEOF. sets the read routines to transfer to the
+subroutine SETEOF. <!-- beginpage --> sets the read routines to transfer to the
 executable statement labelled &scriptS; when an end-of-file is
 encountered.  If the statement EXECUTED SETEOF. (0) is executed the
 read routines will be reset to enter SYSTEM. when an end-of-file is
@@ -2204,9 +2217,9 @@ cancels the previous one.</para>
 <sect2 id='format_specs'><title>Format Specifications</title>
 <!-- in the original this title, unlike other sect2s, was all-capsed -->
 
-<para>When information is read from (or punched in) a card into (or from) a
-computer, it is necessary to know how this information has been
-allocated among the available columns of the card.  Similarly,
+<para>When information is read from (or punched in) a card into (or
+from) a computer, it is necessary to know how this information has
+been allocated among the available columns of the card.  Similarly,
 whenever information is to be printed by a printer (either on-line of
 off-line), it is necessary to know how this information has been
 allocated among the columns available on the printer.  A description
@@ -2215,10 +2228,11 @@ always, such a specification is accompanied by a list of variables
 whose values are to be printed or punched or whose values are to be
 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 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 section 3.7), computed, or read in as data.</para>
+specification is a string of alphabetic characters (as <!-- beginpage
+--> 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 section 3.7), computed, or read in as
+data.</para>
 
 <sect3 id='carriage_control'><title>Carriage Control</title>
 
@@ -2263,6 +2277,8 @@ move to the next line before printing, as will be seen from the
 following table.  In each case the carriage control character is
 effective before the rest of the specification is carried out.</para>
 
+<!-- beginpage -->
+
 <informaltable frame='none' colsep='0' rowsep='0' role='centered'>
 <tgroup cols='2'>
 <tbody>
@@ -2321,7 +2337,9 @@ external medium as follows:</para>
 
 <para>(For the purposes of input-output the Boolean values 0B, 1B are
 considered as integers and will be punched in cards and appear in
-print as 0, 1.)  The integer indicates the size of the field; i.e.,
+print as 0, 1.) 
+<!-- beginpage -->
+The integer indicates the size of the field; i.e.,
 the number of available columns to be used.  For example, K3 indicates
 a 3-column octal field, C23 indicates a 23-column character field,
 andf S31 indicates a blank field of 31 columns.</para>
@@ -2365,6 +2383,7 @@ form (if 5 decimal places are requested, for example):</para>
 <para role='centered'>
 +0.x<subscript>1</subscript>x<subscript>2</subscript>x<subscript>3</subscript>x<subscript>4</subscript>x<subscript>5</subscript>E&plusmn;n<subscript>1</subscript> n<subscript>2</subscript>
 </para>
+<!-- beginpage -->
 
 <para>where n<subscript>1</subscript>n<subscript>2</subscript> is the
 exponent.  On <emphasis>input cards</emphasis> numbers in E fields
@@ -2417,6 +2436,7 @@ specification is assumed to be in alphabetic (BCD) form both inside
 the computer and outside.</para>
 
 </sect3>
+<!-- beginpage -->
 <sect3 id='field_repetition'><title>Repetition of Basic Field Specifications</title>
 
 <para>If several consecutive fields can be described by the same basic
@@ -2478,6 +2498,7 @@ For <emphasis> E fields </emphasis>, the "scale factor" causes the
 number itself to be modified, but the exponent is correspondingly
 modified so the true value of the number remains <emphasis> unchanged
 </emphasis>.  Thus the number 0.9321E-3 would print as 0.9321E-03
+<!-- beginpage -->
 according to the specification E18.4*, but it would print as
 93.2100E-05 according to the specification 2PE18.4*.  Unlike an F
 number, the <emphasis> value </emphasis> is the same in either
@@ -2526,7 +2547,9 @@ floating point ten column field.  Note that blanks are completely
 ignored throughout all format specifications except when they occur as
 characters in a Hollerith string.  Note also, that while every field
 specification of types S, I, E, F, K, and C must be followed by
-commas, the comma may be omitted after a Hollerith string of the type
+commas, the comma may be omitted after a 
+<!-- beginpage -->
+Hollerith string of the type
 described here.  The comma may be used, however, if desired.</para>
 </sect3>
 
@@ -2580,7 +2603,9 @@ names of variables (in this case, the three variables A(6), A(7), and
 A(8).)  During the transmission of information, the input or output
 subroutine scans both the list and the specification simultaneously,
 correlating corresponding entries, and associating a field size, a
-type of conversion, etc. to each variable.  If a Hollerith string is
+type of conversion, etc. to each variable. 
+<!-- beginpage -->
+If a Hollerith string is
 encountered in the specification, it is immediately transmitted, and
 it is not associated with any item on the "list."</para>
 
@@ -2630,6 +2655,7 @@ similar statement may be made for printed or punched output.</para>
 <para role='centered'>
 3F10.3 /4(F10.3, 6HBETA = I2)*
 </para>
+<!-- beginpage -->
 
 <para>the first line printed (or read) would have three fixed point numbers,
 subsequent lines would all be printed (or read) according to the
@@ -2687,6 +2713,7 @@ read and stored until needed.</para>
 </sect3>
 </sect2>
 </sect1>
+<!-- beginpage -->
 
 <sect1><title>Declarations (Non-executable statements)</title>
 
@@ -2737,6 +2764,7 @@ different modes.</para>
 <para>All constants are automatically assigned modes by the translator
 (see <xref linkend='constants'/>).  Other automatic assignments of
 modes are:</para>
+<!-- beginpage -->
 
 <orderedlist numeration='loweralpha'>
 <listitem><para>A name appearing in the statement label field is
@@ -2790,7 +2818,9 @@ A(1,1), A(I,J), B(I+6,J/3+3).</para>
 <para>Although any number of dimension declarations may be used in a
 program, as many variables as desired may be "declared" in any
 dimension declaration.  The declaration consists of the word
-DIMENSION, followed by the variables to be declared.  Each variable is
+DIMENSION, followed by
+<!-- beginpage -->
+the variables to be declared.  Each variable is
 immediately followed by one or two arguments (separated by a comma)
 enclosed in parentheses, as follows:</para>
 
@@ -2838,6 +2868,7 @@ respectively.  The matrix will be located at various places in the XA
 region depending on the value of V(1) at the time a reference is made
 ot a matrix element during execution of the program.  Observe that
 this ability to vary the location of the initial array element (i.e.,
+<!-- beginpage -->
 the array element with unit indices) within the linear array allows
 the effective use of negative subscripts - in spite of the fact that
 the defined ranges of the subscripts are positive.</para>
@@ -2926,6 +2957,7 @@ values of a, b, and C are printed immediately after they are brought
 in to help in finding trouble spots during the development of the
 program (not as necessary here as in longer problems, but a good
 idea!).</para>
+<!-- beginpage -->
 
 <para><emphasis>Flow Diagram:</emphasis></para>
 
@@ -2934,11 +2966,13 @@ idea!).</para>
     <imagedata fileref='fig7.png'/>
   </imageobject>
 </mediaobject>
+<!-- beginpage -->
 
 <para><emphasis>The Program:</emphasis></para>
 
 <programlisting>
 &quadratic;
+<!-- beginpage -->
 *DATA
           4.          -8.          4.
           0            5.         10.
@@ -3024,6 +3058,7 @@ original table had:
 
 <para>The problem is to write a program to generate the entire "truth
 table" for the given expression T.</para>
+<!-- beginpage -->
 
 <para><emphasis>Flow Diagram:</emphasis></para>
 
@@ -3032,6 +3067,7 @@ table" for the given expression T.</para>
     <imagedata fileref='fig8.png'/>
   </imageobject>
 </mediaobject>
+<!-- beginpage -->
 
 <para><emphasis>The Program:</emphasis></para>
 
@@ -3053,6 +3089,7 @@ NORMAL MODE IS BOOLEAN
 instead of the BOOLEAN declaration.</para>
 
 </sect2>
+<!-- beginpage -->
 <sect2><title>Example 3</title>
 
 <para><emphasis>Problem:</emphasis> To approximate 
@@ -3090,6 +3127,7 @@ external function or an internal function.</para>
     <imagedata fileref='fig9.png'/>
   </imageobject>
 </mediaobject>
+<!-- beginpage -->
 
 <para><emphasis>The Program:</emphasis></para>
 
@@ -3100,9 +3138,11 @@ external function or an internal function.</para>
 <para>If, for some reason, the integral of sin 3x - cos(rx + 1) were
 needed if 0 &le; x &le; 3, and the integral of sin 3x - cos(rx)
 otherwise, the program might then be as follows:</para>
+<!-- beginpage -->
 
 <para><emphasis>The Program:</emphasis></para>
 
+<!-- beginpage after H = (B-A)/N -->
 <programlisting>
 &simpsmain;
 </programlisting>
@@ -3115,7 +3155,7 @@ otherwise, the program might then be as follows:</para>
          0          2.         10          10.
 </programlisting>
 
-<para>An alternate way tio write the first eight lines of this
+<para>An alternate way to write the first eight lines of this
 program, illustrating one use of the FUNCTION NAME mode, would
 be:</para>
 
@@ -3131,6 +3171,7 @@ READ      READ FORMAT INPUTS,A,B,N,R
        TRANSFER TO READ
        FUNCTION NAME S
 </programlisting>
+<!-- beginpage -->
 
 </sect2>
 </sect1>