Trailing-Edge - PDP-10 Archives - decuslib20-04 - decus/20-0134/focal.doc
There is 1 other file named focal.doc in the archive. Click here to see a list.

        Status of FOCAL for DECsystem-10.

1.0     Summary of changes
        ------- -- -------

        Ian Pugsley would appreciate your comments  on  FOCAL-10.
        Please send comments, suggestions or problems to:
        Digital  Equipment  Australia,  60  Park  street,   South
        Melbourne, Victoria 3205 Australia.

2.0     External changes.
        -------- -------

3.0     Internal changes.
        -------- --------

4.0     Bugs fixed.
        ---- ------

5.0     Changes to installation instructions.
        ------- -- ------------ -------------

        Monitor software level is now indicated by the  parameter
        "MONITOR".  MONITOR should be set to one of the following
        values or to a higher value.

        3.27 (Assumes monitor does nothing for the user.)
        4.72 (Assumes Teletype fill characters  are  provided  by
        the monitor     and  RENAME  does  not  require  a  prior
        5.03 (Assumes protection can be specified at ENTER  time,
        and the CORE UUO sets C(.JBREL))
        5.04 (Assumes DEVCHR UUO can accept a channel number.)
        5.05 (Assumes monitor can handle all brands of alt mode.)
        5.06 (Assumes KI-10 floating-point trap works correctly.)

        FOCAL.MAC will now assemble  two  different  .REL  files,
        depending upon whether the symbol FNEW is defined or not.
        If FNEW is not defined, a .REL file  is  generated  which
        has  the  full high segment for the .SHR file, and a null
        low segment.  If FNEW is defined (insert  "EXTERNAL FNEW"
        at the front of the source) then a .REL file is generated
        which may be named FOCALL.REL, and placed  on  SYS:   for
        loading  with  user-programs  that need FNEW.  Users then
        create  their  own  FNEW.REL  file  on  DSK,  and   issue
        "EXECUTE SYS:FOCALL,DSK:FNEW" in order to load FOCAL with
        FNEW and start FOCAL.
FOCAL.DOC version 5J(345)-1 [19-Oct-76]                    Page 3

6.0     Known bugs.
        ----- -----

6.1     GETTAB is a reserved word not beginning with  the  letter

7.0     Monitor sensitivity.
        ------- ------------

        FOCAL-10 will run on all monitors.  However, the assembly
        parameter  MONITOR  should  be set as high as possible to
        obtain the maximum efficiency and minimum core size  (see
        installation instructions).

        There is  a  monitor  feature  which  causes  a  spurious
        character  to  appear before the asterisk after a REENTER
        in those  cases  where  type-out  was  in  progress  when
        control-C  interruption occurred.  This will not be fixed
        in FOCAL.

        FOCAL-10 is difficult to use on 2741 terminals.

8.0     Summary of suggestions and ideas for  contemplation.
        ------- -- ----------- --- ----- ---  --------------

8.1     LIBRA LIST (without wild-cards).

8.2     Computed GOTO.

8.3     FOCAL to look at and use the SWITCH.INI file.

8.4     Sub-file directories.

8.5     The format descriptor %Emm.nn should  be  eliminated  and
        made to depend upon %mm.nn alone.

8.6     Extended exponent.

8.7     Bye.

8.8     DO command to allow a variable name as an argument.   The
        only incompatibility would be that if a variable name ALL
        or A existed, then DO ALL and DO A would have  a  meaning
        different  from  the present one.  The intention would be
        that if the variable name referred to a string, then  the
        string would be interpreted as a FOCAL command string.

8.9     The GO logic should be improved still further.

8.10    Turn of the debug switch on a QUIT command.

8.11    Make UUOMAC (on page 10 of  FOCAL.MAC)  depend  on  SPEED
        rather than on PDP-6.
FOCAL.DOC version 5J(345)-1 [19-Oct-76]                    Page 4

8.12    In order to speed up FOCAL, we should  try  to  eliminate
        some UUO calls.

8.13    Invent a re-sequencing feature such as  MODIFY  2.13=2.15
        or MAKE 2.13=2.15.
FOCAL.DOC version 5J(345)-1 [19-Oct-76]                    Page 5

9.0     Distribution notes.
        ------------ ------

17Jul72 Released v(127) (not sources) to John  Nugent  for  KI-10
17Jul72 Released v(127) to Townsville.
02Aug72 Released v(127) to ARL, Melbourne.
11Sep72 Created edit (131).
28Oct72 Sundry changes occurred while I was in Maynard.  From now
        on  please  look  at  page  1 of FOCAL.MAC for historical
01Nov72 Created v2.  Released v2 to Hakan Agvald in Sweden.
07Dec72 Created v2A.  Released v2A to UWA and UQ.
--May73 Released v3 to JCU at about this date.
--Jul73 Released v3A to UWA at about this date.
--Aug73 Released v3A to Alan Williamson to take to Maynard.
26Oct73 Released v3A(216) to David Abel (JCU).
13Nov73 Released v3B(234) to UWA.
20Nov73 Released v3B(234) to UQ.
21Feb74 Released v3C(245) to UQ, JCU, ARL, Stockex, La Trobe.
18Mar74 Released v3C(245) to UWA.
14Jun74 Released v3D(252) to Floyd Benson.
21Nov74 Released v4(272) to Charles Denny (.REL,.RND,.RNO,.FCL)
21Nov74 Released v4(272) to Bernard Eiben (.MAC,.RND,.RNO,.CTL)
09Feb75 Released v5(303) to La Trobe University.
06Mar75 Released v5A(306) to La Trobe University.
23Mar75 Released v5B(311) to La Trobe University.
24Feb76 Released v5J(331) to La Trobe University.
25Feb76 Released v5J(331) to ARL.
09Aug76 Released v5J(344) to La Trobe University.
12Aug76 Released v5J(344) to Digital Equipment New Zealand.
11Sep76 Released v5J(344) to Australian National University.
FOCAL.DOC version 5J(345)-1 [19-Oct-76]                    Page 6

10.0    Serial list of bug reports.
        ------ ---- -- --- --------

30Jan74 H.  Grebler:
        1.  FOCAL types out  .001  in  an  erroneous  manner  for
        2.  The F-format selector (TYPE  should  also  be
        trapped  against erroneous values in the way that
        is.  These bugs were fixed in edit #241.

 7May74 M.  Rahilly:
        1.  On input of a number with many  places  of  decimals,
        the  error  message  is  %Floating  overflow  instead  of
        %Floating underflow.
        2.  Also the message comes  out  once  for  every  excess
        digit, instead of once only.
        These problems were fixed in edit #257.

1974    H.  Davies:
        We need a sleep facility.
        This was fixed in edit #303.

20Feb75 R.  McLean:
        MODIFY can produce a null line.
        This was a documentation problem and had been regarded as
        a "feature"!  This was fixed in edit #313.

20Feb75 R.  McLean:
        A  switch  is  required  on  the  LIBRA SAVE  command  to
        suppress saving the symbol table.
        Note that this is possible with a  (somewhat  cumbersome)
        sequence of commands such as
        However,  the  problem  was  fixed  in   edit   #305   by
        suppressing the symbol table if a list is given.

24Mar75 H.  Davies:
        On an ASK command, FOCAL treats  a  leading  space  as  a
        delimiter  if  some  character is typed without a leading
        space, rubbed out, and replaced with a leading space.
        This was fixed in edit #312.
FOCAL.DOC version 5J(345)-1 [19-Oct-76]                    Page 7

11.0    Serial list of changes.
        ------ ---- -- --------

2.6     The format of error messages was changed to give  a  text
        instead of a code number.

2.8     PDP-6 floating overflow and floating underflow now 'trap'
        in the double-precision case.

2.9     Floating-point underflow and  overflow  now  print  error

2.11    "division  by  zero"  error  message  now   replaced   by
        "floating-point overflow".

2.12    "logarithm of zero requested" error message now  replaced
        by "floating-point overflow".

2.13    Integer format is now used for %mm.00 specification.

2.14    Numeric typeout now has a floating sign.

        (edit number 122 included changes up to this point.)

#123    If a function call has no parentheses following it, it is
        assumed that there is no argument.

#133    Error messages now appear in upper and lower case.

#142    Device "TTY" can now be used to release a channel.

3.4     The FTTRAP assembly feature-test switch was  replaced  by
        PDP-6 in most places.

3.5     I have now changed the I/O UUO's to  do  character-input,
        character-output, and string-output as separate UUO's, to
        speed things.

        (edit number 123 included changes up to this point.)

2.16    GETTAB function added (approx 30Aug72).

        (edit number 132 included changes up to this point.)

#135    A fast GETLN routine is now implemented.

#137    The VERSTR macro is used to save core.

4.3     The 'ASK' command with ??  around the argument now  works
        reasonably, and does not echo the input.

4.5     Old monitors without Teletype filling characters can  now
        have  fill  characters inserted by FOCAL if assembled for
FOCAL.DOC version 5J(345)-1 [19-Oct-76]                    Page 8

4.6     Exponentiation is now done as accurately as possible,  to
        make things like 3**3-27 give exactly zero.

4.7     UUOs can optionally  be  replaced  by  PUSHJ's  to  avoid
        monitor overhead in the PDP-6.

4.9     The TYPNUM routine TDZA MQ,MQ  instruction  assumed  that
        integers  were represented in AC,MQ.  This is now made to
        be true for all precisions.

        (edit number 120 included fixes up to here)

4.12    Single-precision FATN function for  very  small  negative
        argument now works correctly.

4.14    Double-precision  FATN  accuracy  is  now   improved   by
        better-optimizing the reduction formulae.  There is still
        inaccuracy of about one part in 3*10**13 at  an  argument
        of  0.27,  and  an  inaccuracy of about one in 10**14 for
        argument of one, but  elsewhere  it  has  full  accuracy.
        (approx 30Aug72).

4.16    FOCAL now allows for monitor bug not clearing core  on  a
        RUN or GET.

        (edit number 122 includes fixes up to this point.)

4.21    LIBRA SAVE with a list  of  more  than  one  element  now

4.25    PDP-6 DFSB now does not call a UUO  from  within  itself.
        (it used to give the wrong answers for zero ac.)

        (edit number 132 included changes up to this point.)

#136    When a new I/O channel is initted,  any  current  use  is
        correctly suspended.

#140    FATN now makes a better guess at number of iterations.

#141    Wide formats now print more accurately and correctly.

#156    Changed all occurences of "@nn" to "0(nn)" where nn is an
        accumulator mnemonic, in UUO/OPDEF/MACRO arguments.  This
        solves the problem that the MACRO definition uses the  ()
        as  enclosing  the  MACRO arguments, whereas the @ uses a
        23-bit field.  The problem was that  large  arguments  to
        FCHR caused illegal memory references.

#157    Modified GETTAB routine to correctly handle  full  36-bit
        answers.   There  still  exists  a  limitation  here  for
        single-precision versions of FOCAL, in that  they  cannot
        retain  all  36  bits  in  a 27-bit fraction field.  That
        problem will remain a limitation of the  single-precision
FOCAL.DOC version 5J(345)-1 [19-Oct-76]                    Page 9

        versions,  and will not be changed.  The original bug was
        that if bit 1 was on alone with bit 35, we got  erroneous
        floating-point overflow.

#160    The DFSB UUO routine was moved slightly to save core.

#161    Bug corrected which would cause a loop inside FOCAL if  a
        program  contained a statement such as "ASK +4", which is

#162    Control-C intercept during ASK data has now been removed.
        It is necessary to use control-P now.

#163    Leading spaces are now allowed as ASK  data.   Previously
        they  had  caused  the  ASK  command  to  assume that the
        element of data was  zero,  because  a  space  terminates
        data.   It now will terminate data only after a non-space
        has been typed.  (A "non-space" is a character with ASCII
        value more than 40 octal.)

#164    The EXP. routine was improved in both  timing  and  size.
        This  was  done by separating the input number not into a
        straight integer and fraction, but into an integer  which
        was  nearest to the number and a fraction between -.5 and
        +.5.  In this way it is easier to figure  out  the  sign.
        FOCAL,  in  case  you  may  not  know  it, has no complex
        arithmetic, but if it is asked to take a negative  number
        to  a  fractional power, it will give a sign which is the
        sign of the real part of  the  result,  and  a  magnitude
        which is the magnitude of the result.  The imaginary part
        is ignored.

#165    The GETNM routine was improved in both size  and  timing.
        This  was done by cutting a few pieces of code and making
        the entire  routine  accept  a  sign.   The  exponent  is
        handled by re-entrant use of the routine.

#166    DFLOAT was corrected so that it returns numbers as signed
        36-bit  integers.   PFLOAT  will  now  handle  numbers of
        either sign.

#167    All odd functions,(those  functions  which  change  their
        sign  and  only their sign if the sign of the argument is
        changed) now call a new routine  "ODDFNC"  which  handles
        these cases more economically.
FOCAL.DOC version 5J(345)-1 [19-Oct-76]                   Page 10

#170    The FOCAL function has been expanded now so that it  will
        take  a  single  argument greater than or equal to 23 and
        return  a  signed  36-bit  number  which  is  the  number
        contained  in that address of FOCAL's low segment.  It is
        intended to be used by programs wishing to determine  the
        amount  of  core  which  has  been used, channels in use,
        buffer sizes etc.


#171    Some items in FOCAL's data-base (in the low segment) were
        moved  around,  so  that  the FOCAL function could access
        most of the items without too many problems such  as  the
        precision of FOCAL and the type of processor running.

#172    The operations FSBRI and FMPRI were defined for the PDP-6
        version in such a way that they could be used in the code
        without special cases having to be written to handle  the

#173    The appending of the word " error" to error messages  was
        made  more  economical  by using a flag in the error word
        (Y) and putting it in specially each time.

#174    Because the KI-10 has pages of only half the size of  the
        PDP-6  and  KA-10, the core-expansion coding was modified
        according  to  the  recommended  method   (see   Software

#175    The GETNM routine was slightly modified to save core.

#176    The error message pertaining to the  attempts  to  use  a
        channel  which  was not initted or which was initted in a
        wrong direction was altered, so that it now has  its  own
        special message "Device not correctly INITted"

#177    The error messages for input  and  output  device  errors
        were slightly modified to save core.


#200    A correction was made so  that  LIBRA  delete  etc. would
        work  properly.   Until  now FOCAL would not accept lower
        case modifiers for LIBRA.

#201    There was a problem  with  unsubscripted  variable  names
FOCAL.DOC version 5J(345)-1 [19-Oct-76]                   Page 11

        longer  than  three  characters.   The  routine to handle
        subscripts did not clear the right half of the name field
        if  there  was no subscript, so the extra characters were
        interpreted as a kind of subscript.  This was fixed.

#202    Single precision FOCAL did not work in the area  of  data
        entry  and  number input, because of the erroneous coding
        of the PFLOAT routine.  This has now been fixed.


#203    Since the double-precision compare UUO was only  used  at
        one  place  in  the  program,  it was replaced by in-line
        code.  This saved space and time.

#204    The PDP-6 routines for double precision do not work.   It
        is thought that this may be because the carry-one flag is
        not set in the same way by the 166 processor as it is for
        the  PDP-10  in the case of the MOVNS instruction.  Hence
        the  NEGANS  routine  was  modified  to  eliminate   this

#205    One word was saved in the RETURN  instruction  processor,
        by  allowing  the interpreter to remain active during the
        remainder of the line.  This should have no effect except
        to do a bit of typing if the trace was active.
        One word was saved at FIX:  by using a  MOVM  instead  of
        MOVE and TSC.
        One word was saved in the INCHR UUO processor.  This  was
        done by using JRSTs instead of PUSHJs and POPJs.


#206    A convention was adopted internally that the sign bit  of
        the   low   order   word   (in   double   precision)   of
        floating-point numbers should be zero.   Hence  all  data
        items in the source program were adjusted if required.

#207    The double-precision PDP-6 NEGANS routine was adjusted to
        the above convention for bit 0 of the low order word.

#210    There was a bug relating  to  initialization  of  an  I/O
        channel  which  caused  core-expansion to occur under the
        monitor's  control  rather  than  under  FOCAL's.    This
        sometimes  caused  loss  of symbols, uncontrolled looping
        etc.  The fix was to correct the FIT:  routine to use  an
FOCAL.DOC version 5J(345)-1 [19-Oct-76]                   Page 12

        internal core-flag rather than .JBREL which is set by the


#211    There was a bug in the  core-expansion  code  (at  FIT+6)
        which caused buffers to be set up incorrectly.

v3A     Released 1-Jun-73.

#211    To allow C.A.I.  programs to run in FOCAL, it was decided
        to  allow  active  lines  to  be eligible for deletion or
        modification.  This was done  by  changing  the  internal
        checking  routine  so it performed harmlessly when a user
        attempted to delete a line which he was either  executing
        or  using  as  a  call  to  the  line being executed (for
        example with a DO.)

#212    One word of code was saved at location NEGANS.

#213    The factor for converting sine  and  cosine  in  degrees,
        namely    PI/180,    was    slightly   inaccurate.    The
        multiple-precision  package  was  used  to  compute  this
        factor more accurately, and the new value is now in place
        in FOCAL.

#214    The method of loading the PDP-6 version has been changed,
        and the internal arrangement of low and high segments has
        been altered.  It is now no longer necessary to  use  the
        /H  switch  to  LOADER, since the assembly switch ensures
        correct loading.  However, it is important that  the  low
        segment  of  FOCAL  is  loaded first, before DDT or FNEW,
        since the "FOCAL" function depends on this.

#215    The  algorithm  for  logarithm  in  double-precision  was
        slightly modified.

#216    A constant used in the double-precision  exponential  was
        adjusted  in  accuracy.  The constant, eightth root of 2,
        is used in computing fractional powers.

#217    There was a problem with RETURN statements  from  a  line
        number  greater  than 31.99.  This originated back in the
        days when FOCAL only allowed line numbers  up  to  31.99.
        The problem is now fixed.
FOCAL.DOC version 5J(345)-1 [19-Oct-76]                   Page 13

#220    The NEWLIN routine was corrected so  that  a  line  could
        overwrite itself.  This is a side-effect of the edit 211,
        which allowed deletions of active  lines.   Of  course  a
        line  overwriting  itself  does  no good, since the rules
        require that it merely erase itself, but at least it  now
        does no harm.

#221    The PDP-6 double floating divide routine had an error  in
        that  the  low order word was wrong half the time.  It is
        necessary to check for overflow from the low order  word,
        and the final JUMPGE/SOJA was required.

#222    The reduction formula for double-precision logarithm  was
        changed  so  that it used floating-point division instead
        of fixed-point division.  This is useful when running  on
        a  KI-10,  because  it  is  considerably faster.  It also
        saves a little space in core.

#223    It   was   discovered,   after    writing    the    FOCAL
        multiple-precision  package,  that  some  of the internal
        double-precision constants were not fully accurate.  This
        deficiency was remedied by this edit.

#224    Because of the change from LOADER to LINK-10,  I  had  to
        modify  the  instructions for loading FOCAL.  I took this
        opportunity to correct a misunderstanding some people had
        concerning  the  PDP-6  version,  which  has to be loaded
        first and has to be loaded in  one  segment.   This  edit
        forces  the  assembler  to  create a one-segment program,
        regardless of the commands used to load  it.   Of  course
        the low segment of FOCAL still has to be loaded first, in
        order  that  the  FOCAL  function  retain   its   defined

#225    I have now removed the requirement that the PDP-6 version
        be  run with the parameter MONITOR=3.27.  This is because
        the raison d'etre of the PDP-6 version has  now  changed.
        It exists now not because someone might have a PDP-6, but
        rather that they may have a  KA-10  and  wish  to  retain
        62-bit  precision.   It  won't  be  as good as the KI-10,
        which computes three words and rounds the low order  bit,
        but  it  should  give  better  precision  than  the KA-10
        version, at the cost of cpu-time.

#226    Users of the FCOSD and  FSIND  functions  in  FOCAL  will
        often   use  arguments  which  are  integers,  and  often
        multiples or submultiples of 90 degrees.  For this reason
        it  is  desirable  to make a special computation directly
        from the argument to the  fraction  of  quadrant,  rather
        than  first  converting  it  into  radians  and then into
        quadrants.  The rounding errors saved will  usually  give
        much  better  results,  specially  when  computing  large
FOCAL.DOC version 5J(345)-1 [19-Oct-76]                   Page 14

#227    There was a problem in that FOCAL went into a loop if you
        had  GOTO  followed  by  double  periods.   This has been
        corrected by a re-written GETLN routine.

#230    The monitor manual  says  (and  the  Maynard  programmers
        refuse to deny) that a DECtape RENAME must be preceded by
        a CLOSE.  This is in contrast to a disk RENAME which must
        not  be preceded by a CLOSE (in case some other user then
        grabs the file in between), and so FOCAL has been changed
        to make a special case for DECtape RENAME.

#231    The PDP-6  double-floating-divide  routine  was  slightly
        modified  in  the hope that another half bit of precision
        could be squeezed out of it.  It has not been proved that
        the precision is in fact improved, but at least it is not
        made worse.  Perhaps some kind  numerical  analyst  could
        prove it one way or the other for me.

#232    The SQRT, ATAN, ABS, SIGN  functions  were  removed  from
        FOCAL-10.   This  is  because  small  computer FOCALs may
        perhaps be using these names  as  variables,  and  it  is
        therefore bad to have them as reserved words in FOCAL-10.
        The  policy  has  been  adopted  for  FOCAL-10  that  all
        reserved  words  shall  commence with the letter "F".  To
        this end, the functions FSIND, FCOSD and FLOG10 have been
        added  to  the  function table in anticipation of the day
        when SIND, COSD and LOG10 will be deleted.

#233    The multi-file channel numbers are now decimal.   Also  a
        bug  was fixed in that ASK /0, TYPE /0 and OPERATE /0 now
        work as per the manual.

#234    A bug was corrected which  previously  caused  a  problem
        during  floating  point traps which typed error messages.
        Accumulator PC is now saved in the trap handler.

v3B     Released 14-Nov-73.

#235    The PDP-6 double-floating-multiply routine had a  problem
        in  that  multiplication  by  2  caused a rounding error.
        This was because of a lack of internal precision, and the
        problem has now been corrected.  (21-Dec-73)

#236    The Teletype input routine (used for initial command  and
        for  ASK  data)  is  now gathered on the stack instead of
        into free core.  It solves the long-standing problem that
        if  free core is unavailable you couldn't type a command,
        even an ERASE command.  (21-Dec-73)

#237    I have attempted to improve the capability of the monitor
        SAVE  command,  so that you will be able to stop FOCAL at
        any time and SAVE it.  (9-Jan-74)

#240    There was a problem in that the command TYPE %Emm.nn /chn
        failed  because  accumulator  T2  was  not preserved, and
FOCAL.DOC version 5J(345)-1 [19-Oct-76]                   Page 15

        because there was no comma between  the  arguments,  this
        was required.  The problem is now fixed.  (15-Jan-74)

#241    Two  problems  were  reported  relating  to  type-out  in
        E-format.   The  first  was that TYPE %10.5 should really
        give a warning because it is confusing for  the  user  to
        have  it  automatically  revert  to  E-format.  The FOCAL
        specifications were changed to give a  warning  only  and
        ignore  the  request  unless  the user gave %0 or %.  The
        second problem was  that  TYPE  %,.001  gave  00.00000E-6
        because  the  code  at  FIX:   did not work correctly for
        double precision negative numbers close to a power of  2.
        This   is   fixed   now.    This   corrects  patch  #205.

#242    The EVAL routine was modified to run faster if  no  unary
        sign preceded the expression.  Also ** for exponentiation
        now works if a space separates the **'s.  (1-Feb-74)

#243    FOCAL will now trap expressions which illegally terminate
        with an operator such as 5+6* or 5*6+.  (1-Feb-74)

#244    Code is now included in the source of FOCAL to allow  the
        construction  "TYPE  $$"  to  give  the symbol table with
        octal  commented  into  it.   This  is  very  handy   for
        debugging  logical  operations  in  FOCAL programs.  This
        code is conditional upon version number.  It will  be  in
        version 4.  (4-Feb-74)

#245    The type-out of zero was  incorrectly  output  as   .0000
        instead  of 0.0000 for E-format or F-format which allowed
        sufficient width.  It is felt that the  specification  is
        indeed  correct,  and FOCAL has been modified to conform.

v3C     Released 14-Feb-74.

#246    There was some inaccuracy with the type-out  of  numbers,
        and  it  was  discovered  that this was due mostly to the
        fact that I converted all numbers to a logarithm and back
        again.   This  double-conversion  was  removed.  Also the
        code in this area was cleaned up.  Also the RFIX  routine
        was  slightly  improved  so that the instruction used for
        rounding did exactly add 0.5 instead of  adding  0.5  and
        then rounding again.  (18-Mar-74)

#247    Some specific numbers were typed out incorrectly when the
        field  width for the type-out was greater or equal to the
        accuracy of the computer.  The error was manifest  as  an
        overflow  on  to  the  sign field instead of changing the
        exponent field to one higher and  shifting  the  printout
        one  place  to  the  right.   The  correction is to add a
        slight weight to the log10 so  that  any  errors  in  the
        log10  will  be  on the high side, never on the low side.
        This  does  have  the  slight  disadvantage  that  a  few
FOCAL.DOC version 5J(345)-1 [19-Oct-76]                   Page 16

        E-format  numbers  will  now type as 0.nnnnE+mm, but this
        shouldn't worry anybody.  (8-Apr-74)

#250    The default E-format field width has now been modified to
        %E5.04, so that in most simple cases the total field size
        will initially be the  same  as  for  F-format.   In  the
        single-precision  cases  this will also minimize problems
        of lack of accuracy showing through.  (8-Apr-74)

#251    A large symbol-table with most of the  symbols  having  a
        zero  index  looks  a bit messy because of all the (0)'s.
        At the expense of one additional  word  of  core  I  have
        tested  for  this  special case, and so now those symbols
        with  a  zero  index   will   have   the   index-printing
        suppressed.   Also the number of spaces after the "S" and
        before the symbol is reduced to one.  (16-Apr-74)

#252    The MODIFY command used to be  incapable  of  deleting  a
        question  mark  in column 1 of the data line.  In fact it
        caused the debug flag  to  get  switched  on.   This  was
        because  we  flipped  the "INTERP" flag too late, and the
        question mark was taken as program rather than  as  data.
        The  fix  is just to move the TLZ instruction from MOD:+6
        up  two  lines  to  just  before   the   JSP   PC,NEWTXT.

#253    The names of the months as they are printed  out  at  the
        heading  of  the  listing produced by WRITE or LIBRA SAVE
        are now changed to consist of one upper case  letter  and
        two  lower  case  letters  instead  of  three  upper case
        letters.  (26-Jun-74)

#254    The virtual-memory monitor no longer uses the contents of
        .JBDDT  in  the  job  data area to indicate the amount of
        core to be saved by a monitor SAVE command.  Instead, the
        left  half  of  .JBCOR  and  .JBSA  are  used.  FOCAL was
        changed to reflect the new specifications.  (26-Jun-74)

v4      With the advent  of  version  4,  the  obsolete  commands
        beginning  with  backarrow or equals disappear, as do the
        obsolete commands with a file-specifier to begin followed
        by equals or backarrow.  Also edit 244 becomes effective,
        to  allow  symbol-table  in  octal.    The   LIBRA   CALL
        improvements  scheduled  for  version  4 were deferred to
        version 5 because they do not yet  work,  and  they  take
        additional core storage.  (26-Jun-74)

#255    LIBRA SAVE command now saves the symbol table as well  as
        the  program  lines.  This is more helpful to novices and
        to people who want  to  save  programs  part-way  through
        execution.   It  will  of  course  use  more  disk space.

#256    The speed of LIBRA CALL has been  improved,  by  slightly
        increasing  the  size of the core chunks allocated during
FOCAL.DOC version 5J(345)-1 [19-Oct-76]                   Page 17

        program building.  (6-Jul-74)

#257    Input of numerics with large number of decimal places had
        three   problems.    Firstly  the  error  message  showed
        overflow  instead  of  underflow.   Secondly  the   error
        message  came  out  once for each excess digit instead of
        only once for  the  whole  number.   Thirdly  all  digits
        beyond  the  eleventh  decimal  place  were  only held to
        single   precision   instead   of    double    precision.

#260    There was a problem with library files commencing with  a
        blank  line.   This  arose because part of the LIBRA CALL
        procedure involved translating  crlf's  into  nulls,  and
        placing the whole LIBRA file into the immediate-mode text
        area of core.  The core-expansion routine then looked  up
        into  the immediate-mode text area, saw the initial null,
        and  thought  it  could  go  ahead  and  use  the  space!

#261    The SQUEEZ routine was operating incorrectly, in that the
        pointers  were  adjusted  before the new space was zeroed
        instead of after.  The end result was that SQUEEZ tricked
        itself  into  believing  the  garbage was meaningful, and
        FOCAL text being inserted into the middle  of  a  program
        caused some other text higher up to be lost.  (23-Jul-74)

#262    The sine/cosine routines were modified to use a  variable
        number of terms in the power series.  This has both speed
        and accuracy advantages for FOCAL.  In order  to  compute
        the size of the last significant term, it should be noted
        that the smallest RATIO  of  last  significant  to  first
        non-significant  term  occurs  for  x=PI/4 when there are
        11,17 or 19 significant terms for fraction sizes of 27,54
        or 62 bits.  (5-Aug-74)

#263    Single-precision FATN for very small  negative  arguments
        had the wrong sign.  This was corrected by changing FOCAL
        to use the double-precision method for  both  single  and
        double-precision computations.  It also enhances accuracy
        somewhat for the single-precision case.  (9-Aug-74)

#264    The   double-precision   KA-10   FEXP    was    returning
        non-normalized  numbers  in  certain  cases.  The problem
        arose because I forgot that FSC  of  the  low-order  word
        normalizes   the   low-order   word,   which   is  wrong.
        Correction is to insert FADL AC,MQ.  (9-Aug-74)

#265    The exponential function was modified to make both single
        and double precision methods the same.  They both use the
        continued fraction series instead  of  an  approximation.
        It  turns  out  that  you don't need very many terms, and
        that it is fairly economic in terms of  core  storage  to
        compute the coefficients.  (28-Aug-74)
FOCAL.DOC version 5J(345)-1 [19-Oct-76]                   Page 18

#266    There  was  an  error  in  the  type-out  routine   which
        manifested  itself  as a floating overflow message during
        type-out of small numbers with a long  fraction  part  of
        E-format.   The reason for the error was that pre-typeout
        normalization required adjustment  with  an  out-of-range
        factor.   Correction  was  a  minor  modification  of the
        adjustment algorithm.  (8-Sep-74)

#267    Scanning for empty space in the text storage  area  while
        inserting  a  new  line  was  changed  to commence at the
        low-core end,  so  that  repeated  calling  of  the  same
        library   file  would  not  result  in  unnecessary  core
        expansion.  (8-Sep-74)

#270    End-of-file  handling  was   improved,   so   that   more
        reasonable  things  happen.   For  example  FCHR(-1)  now
        returns -1 when end-of file is  encountered,  instead  of
        letting FOCAL exit.  (8-Sep-74)

#271    The  FIXOAT  routine  was  re-written,  to  prevent   the
        fraction  part  ever  reaching  +1.  The problem was that
        2^(-1) was not computed accurately, and  did  not  equate
        exactly with 1/2.  (12-Sep-74)

#272    Corrections to edit #267.  (21-Sep-74)

#273    Code was added to check for and reject  the  forms  ASK %
        and  ASK $.   The  code  was  made  conditional on having
        enough core;  meaning that the code is  in  all  versions
        except  the KA-10 double-precision version which is a bit
        tight for core.  (14-Oct-74)

#274    A new logarithm algorithm was invented, and used in place
        of  the  existing  ones in those cases which are short of
        core, namely KA-10 double-precision.   The  algorithm  is
        based on successive squaring and exponent-extraction;  it
        is slower but smaller and more accurate.  (21-Oct-74)

#275    The accumulator values were changed  in  anticipation  of
        the  day  when  the Subroutine Calling Convention will be
        adhered to.  (21-Oct-74)

#276    String  variables  and  string  expressions  were  added.

#277    It was discovered that for  KA-10  double-precision,  the
        number  576400000000,  146001000000 is normalized but its
        negative via DFN  (201377777777,  146777000000)  is  not.
        Therefore  negation  was made subject to normalization as
        well.  I.e. DFN was followed by FADL.  (27-Oct-74)

#300    The new logarithm method (edit 274)  was  made  mandatory
        for  all  versions  of FOCAL.  This ensures good accuracy
        and compact code for every situation, even  though  speed
        of logarithms and fractional powers will suffer slightly.
FOCAL.DOC version 5J(345)-1 [19-Oct-76]                   Page 19

        I have demonstrated that  the  new  method  gives  better
        precision than the old:  sometimes as much as five in the
        least significant bit.  For arguments close to unity, the
        logarithm  is very small and may bear a significance only
        as great as the argument itself.  (3-Feb-75)

#301    A few instructions have been saved by minor re-coding  in
        a few places.  (3-Feb-75)

#302    The  EVAL  routine  with  a  null   argument   or   empty
        parentheses  has  now  been defined as numeric with value
        zero.  This was necessary  in  order  that  legality  and
        format   decisions   could  be  made  internally  without
        unnecessary delay or confusion.  The  previous  confusion
        of  undefined numeric/string status caused illegal memory
        reference due to bad format null  string  representation.

#303    Functions LOG, LOG10, COS, COSD, SIN, SIND, and EXP  were
        removed   because   they  violated  the  rule  about  all
        functions commencing  with  the  letter  F.   The  FHIBER
        function  was introduced to allow FOCAL programs to sleep
        or hibernate if required.  (6-Feb-75)

v5      The announcement  to  the  world  that  string  variables
        exist.  (6-Feb-75)

#304    The title on the listing of FOCAL.MAC  now  depends  upon
        the  assembly  parameter  FNEW,  and  will  also show the
        version number, precision, and cpu-type.  (23-Feb-75)

#305    LIBRA SAVE now does not save the symbol-table when a list
        is given.  This reduces disk requirement for saved files.

#306    FNEW is now allowed;  FOCAL now complies with the Calling
        Sequence Standard.  (1-Mar-75)

#307    Repair edit #305 to  save  INCHN  and  OUTCHN  correctly.

#310    .JBERR is now incremented under the following conditions:
        1.  FHIBER function in a detached job.
        2.  FHIBER function when TRMNO.  UUO is illegal.
        3.  Error return on GETTAB UUO in GETTAB function.
        4.  Any error detected by FOCAL, whether it results in  a
        printed message or not.  (11-Mar-75)

#311    FOCAL now gives an error message if an attempt is made to
        set  an  output  format  with  a  width  greater  than 99
        columns.  Previously this  resulted  in  a  type-out-time
        PDL OV message.  (11-Mar-75)

#312    There was a problem in that the ASK data "leading  space"
        flag got clobbered if you inserted a non-space and rubbed
        it out.  This was solved by not having a flag  any  more,
FOCAL.DOC version 5J(345)-1 [19-Oct-76]                   Page 20

        but  rather  by  looking  at  the previous character each
        time, to see if it was a space too.  You will be safe  if
        the  new  space  follows  another  space;  but if not, it
        won't be a leading space.  (2-Apr-75)

#313    Echoing of rubbed out characters used to be in  the  same
        form  as  TECO,  except for MODIFY command.  This has now
        been changed  so  that  all  rubbed  out  characters  are
        embedded  in  reverse slants.  For half-duplex terminals,
        the rubbed out character is  not  echoed,  but  rather  a
        reverse  slant  is  typed  for each rubbed-out character.

#314    Control-R now repeats the prompt character  and  displays
        the  first part of the line (cleaned up) for input lines,
        ASK data, and MODIFY work.  Also  control-P  may  now  be
        used  to  abort  a  modify command if you decide that you
        don't want to complete the modifications.  (5-Apr-75)

#315    In an OPERATE command, a non-existent device  now  causes
        an   error   message   instead   of   a  channel-release.
        Channel-release can now only be caused by OPENing TTY  on
        the channel.  (25-Apr-75)

#316    Error messages used to come out on the TTY if  fatal  but
        on  the  current  output device if non-fatal.  This seems
        stupid because the user really wants to see them straight
        away,  and  he's  sitting  at  the terminal.  This change
        makes it always come on to TTY.  (18-Sep-75)

#317    MODIFY command will now correctly handle lines containing
        question  marks,  and  will  allow  question  marks to be
        inserted.  (20-Sep-75)

#320    The ASK command can, as you know, be used to type text in
        the  same  way  as  the TYPE command, including new lines
        etc.  What I have now done is to arrange to  regard  this
        feature as a kind of cue for the input.  The advantage is
        that you can then have all useful output  (results,  say)
        going to the line printer, whilst that message requesting
        input will go  to  the  TTY.   In  actual  fact,  I  have
        arranged  for  all  output during an ASK command to go to
        TTY, but only if input is expected from TTY.  (4-Oct-75)

#321    MODIFY should be handled the same way because the  output
        from MODIFY is really only for the guidance of the person
        doing the typing.  (4-Oct-75)

#322    The debug feature turns out to be very difficult  to  use
        for  debugging  a  program which has output directed to a
        file other than  TTY.   To  assist  with  debugging,  and
        hopefully  not  inconvenience too many people who use the
        feature to plug data into  output  files,  we  will  make
        debug output always go to TTY.  (4-Oct-75).
FOCAL.DOC version 5J(345)-1 [19-Oct-76]                   Page 21

#323    Data transmission errors causing failures of  IN  or  OUT
        UUOs  now  causes the device status bits (from the GETSTS
        UUO) to  be  printed  in  the  error  message  by  FOCAL.

#324    Change I/O routines so that file output to other than TTY
        only  occurs  during  the  WRITE TYPE and LIBRA commands.

#325    Logical IF using = and # operators.  (10-Oct-75)

#326    Logical IF using .NE.  and .EQ.  operators.  (13-Oct-75)

#327    The format of I/O error messages which return  a  monitor
        code  number  have been changed.  The old format error-##
        has been  changed  to  error  #.   This  will  save  some
        locations of core.  (21-Oct-75)

#330    A BACKSPACE from the keyboard will now perform  the  same
        function  as a RUBOUT except that the BACKSPACE is echoed
        and the rubbed-out  characters  are  not  displayed;   no
        back-slashes  are used.  This simulates the 5.07 monitor.

#331    The  GO  command  can  now  accept  a  comment  after   a
        semi-colon without an error.  (15-Feb-76)

#332    The half-duplex terminal test has now been replaced  with
        a  local-copy  test,  which is really more correct, since
        the feature being adjusted is the layout  of  backslashes
        on  the  paper.   The  DPOP  UUO  was  not in fact called
        anywhere, and so it was removed along with  its  handler.
        The trap handler had some inaccessible code in it, and so
        it was cleaned up and abbreviated.  (1-Apr-76)

#333    The SET command will no longer create a new  symbol-table
        entry  when  a new symbol is set to zero.  This will save
        core and cannot affect programs because if  an  undefined
        symbol  is  referenced  it  is  given  the  value of zero
        anyhow.  Some inaccessible code in the SQUEAZ routine  is
        eliminated.  (2-Apr-76)

#334    Commands to FOCAL must now consist of alphabetic  letters
        only.   This  means that commands such as TYPE2.6 with no
        spaces will be more meaningful to novices and  folk  used
        to  BASIC.   Also  I  have modified the INCREM and DECREM
        macros in the source so that they may have  an  argument.

#335    The logical operators .LT., .LE., .GT.,  and  .GE.   have
        been  added.   The  PRINTX pseudo-op has been replaced by
        the macro PX in most places to make  it  a  fatal  error.

#336    The INCREM and DECREM macros have been removed  from  the
FOCAL.DOC version 5J(345)-1 [19-Oct-76]                   Page 22

        source  code.  The FADRI instruction is now simulated for
        the PDP-6 version so some code  is  simpler.   The  DEXCH
        code for the KI-10 double-precision version is faster and
        uses a PUSHJ to a literal rather than a UUO.  (11-Apr-76)

#337    The efficiency of the  WRITE  command  was  increased  by
        removing   the  character-counter  to  the  error-handler
        routine.  (11-Apr-76)

#340    The EVAL  routine  was  speeded  up  and  the  expression
        routine  was  modified  to  correct the case of -1.EQ.-1.

#341    A better try at edit #340.  (17-Apr-76)

#342    FNEWGO now attempts to find FOCAL.SHR on NEW and  OLD  if
        it cannot find it on DSK or SYS.  This should help people
        who want to run FORTRAN subroutines with newer  or  older
        than standard FOCAL.  (2-May-76)

#343    The symbol-table is now searched  with  a  binary  search
        method.  This speeds up production programs which tend to
        have a large number of fixed symbols.  There are  several
        side-effects of this change.  Firstly the symbol table is
        stored in alphabetical order rather  than  chronological,
        which  will  affect  the  appearance  of the symbol-table
        printout.   Secondly  the  actual  setting  up   of   the
        symbol-table will be slightly slower because shuffling is
        required to  make  it  alphabetical.   Thirdly  a  slight
        increase  of  space is required for the symbol-table - an
        increase of 33% for double-precision, but no increase for
        single  precision;   this is required to avoid a division
        instruction in  the  inner  loop.   Fourthly  it  is  now
        possible  to  change  the  way  a FOR loop works when you
        erase the symbol table;  the error message on  the  ERASE
        is  no  longer  required,  and the FOR will exit from the
        loop when it cannot find the index any more.  (25-Jul-76)

#344    ASK for a string will  now  accept  a  string  containing
        spaces  and  commas.   The  terminator  for  a  string is
        line-feed alone;   carriage-return  is  ignored;   ESCAPE
        aborts the ASK input.  I also took the opportunity in the
        source file, of defining  KL  to  allow  future  hardware
        dependencies.  (31-Jul-76)

#345    LOOKUP  is  now  non-fatal  except  in  case   of   KA-10
        double-precision  version  of FOCAL.  This means that you
        can test for the existence of a file by  opening  it  for
        input  and seeing whether or not you get an error.  LIBRA
        SAVE   now   generates   backup    except    for    KA-10
        double-precision  version of FOCAL.  The backup takes the
        form of renaming an existing file if any to  .BAK,  after
        deleting  any .BAK file;  then the LIBRA SAVE proceeds as
        it would have without an existing file of the same  name.
        A  few internal changes were made at LIMSET to reduce the
FOCAL.DOC version 5J(345)-1 [19-Oct-76]                   Page 23

        core size;  MAXLN,MINLN were  replaced  by  LUPARG.   The
        MACRO  exclusive OR operator ^!  was introduced to assist
        definition   of   certian   opcode   fiddle   parameters.