home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / PARASOL / PARASOL.ARK / PARASOL.DOC < prev    next >
Text File  |  1986-10-06  |  157KB  |  5,744 lines

  1. @Ox1P
  2.  
  3.  
  4.                   P A R A S O L
  5.  
  6.              L A N G U A G E     M A N U A L
  7.  
  8.        Copyright (C) 1982 - 1986 by Para-Soft and Shay O. Walters
  9.                    All rights Reserved
  10.  
  11.       Placed in the Public Domain October, 1986 by Shay O. Walters
  12.  
  13.          PARASOL is a language I developed myself for my own business
  14.     use.   It  has been tailored to provide the features I needed for
  15.     the  applications I have developed over the last  several  years.
  16.     Due  to the overwhelming popularity of the MS-DOS systems running
  17.     on the 8086, I feel that there is no longer any need to keep this
  18.     to myself.   Therefore,  I am placing this into the public domain
  19.     so that others may benefit from it.
  20.          There used to be a more complete manual,  but a system crash
  21.     before it was backed up destroyed that effort.    I have spent what
  22.     time I could to polish this older version of the documentation to
  23.     the point that it could be really useful.   If you have  specific
  24.     questions,  I'll be glad to help if I can.  I can be contacted on
  25.     Compuserve at [73247,1163] or on GENIE at [SHAY].   (You are more
  26.     likely    to  get  a timely responce on GENIE...Compuserve  is  TOO
  27.     expensive).  Also, I can be reached (as of 10/86) at 803-799-0180
  28.     by  phone.   I am uploading a library of source code to a  video-
  29.     tape  rental  store  management system    which  should  give  many
  30.     examples  of  business-type  usage of the  language.   I  may  be
  31.     uploading  other  source at a later date.
  32.          All  the  usual  disclaimers apply.   I have used    this  for
  33.     several  years,  and for the last couple of years,  I have  found
  34.     only  one or two bugs,    and I use it quite a lot,  and I  compile
  35.     some VERY large programs (18,000 lines or so).     BUT, I generally
  36.     stick  with  a    known  layout and follow that  pattern    in  other
  37.     modules.  Other programmers may possibly do things in a way which
  38.     doesn't work,  so I can't guarantee that it will be bug-free  for
  39.     you,  but  I would like to be informed of anything you feel IS    a
  40.     bug.
  41.          Being public domain,  this is absolutely free for anyone  to
  42.     use  for  personal  use.   For any profit-making  usage  of  this
  43.     compiler  or  its  source-code,  a  $25.00  registration  fee  is
  44.     required.  Make your check payable to:
  45.  
  46.          Shay Walters / Para-Soft       Phone: 803-799-0180
  47.          P.O. Box 6273           GE-MAIL:  SHAY
  48.          Columbia, S.C.   29260       CompuServe: 73247,1163
  49.  
  50.          Registered  users will be informed of availability of  other
  51.     software  written  in  PARASOL    and  will  generally  get  better
  52.     support for problems or questions.
  53.          The  only    additional restriction I will impose is  that  if
  54.     anyone    uses this source code as a basis for writing  a  compiler
  55.     for  another  type of computer or operating system (say  8086  or
  56.     68000,    for  example) that I receive a copy of that source,  too.
  57.     It will not be disclosed to others, if that is what you wish.
  58.  
  59.  
  60.  
  61.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:1
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.          The library of the source code for the compiler contains the
  71.     following files:
  72.  
  73.          PASM.SUB        A SUBMIT file to assemble the compiler
  74.  
  75.          LBASE.ASM        The global memory definitions.
  76.  
  77.          LCOMMON.ASM    The global subroutines.
  78.  
  79.          LMISC.ASM        Miscellaneous support functions.
  80.  
  81.          LSTMT.ASM        The statement-compilation routines.
  82.  
  83.          LEOJ1.ASM        The final forward-reference fixup.
  84.  
  85.          LEOJ2.ASM        The support library for the compiled code.
  86.  
  87.          NOTE:   I    have used a modified version of LOAD which forces
  88.     all  undeclared data areas to binary zeros.   The  standard  CP/M
  89.     LOAD  program  will  fill any undeclared data  with  garbage.    I
  90.     suggest  that you use DDT instead of LOAD to make the  COM  files
  91.     (fill  memory  with zeros before reading in the  HEX  file).   It
  92.     "should" work with LOAD,  but I can't guarantee it.   I no longer
  93.     even have an unmodified copy of LOAD to try it with, it caused me
  94.     no  end of problems,  so I destroyed all copies of it many  years
  95.     ago  and use only the version I modified.   Since that's part  of
  96.     DRI's licensed programs, I can't release it with this package.
  97.         Also, the source,  as supplied  is not quite compatible  with
  98.     DRI's ASM assembler.  It will do better with MAC or RMAC.  I have
  99.     a specially modified version of ASM, as well.  If you want to try
  100.     using ASM,  you will need to eliminate all multi-statement lines:
  101.     Anywhere an exclamation mark ("!") appears, (except inside string
  102.     literals), it should be replaced  with    CR/LF.    DRI's ASM is doc-
  103.     umented as supporting the "!" as a multi-statement separator, but
  104.     it doesn't work following DB or DW pseudo-ops.     Also,    there are
  105.     several special characters such as underscore,    AT-sign (@),  and
  106.     period    which may  or may  not be  acceptable to  the various DRI
  107.     assemblers as part of a variable name.
  108.         The source code is really being supplied for those of you who
  109.     are just  curious about how the insides of a compiler  (at least,
  110.     this compiler) work.  If you have some special feature    you would
  111.     like to have in the language,  let me know about it,  and maybe I
  112.     can install the feature for you.
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:2
  128.  
  129.  
  130.  
  131.  
  132.  
  133.     LANGUAGE DESCRIPTION    LANGUAGE DESCRIPTION
  134.  
  135.  
  136.          PARASOL  is not modeled after any one  particular    language,
  137.     but has features derived from COBOL, ALGOL, and PASCAL (and maybe
  138.     just a touch of BASIC).  The individual statements are COBOL-like
  139.     while the structure of the language more closely follows ALGOL.
  140.          The language provides many high-level constructs, especially
  141.     in the area of file record I/O, yet it maintains the closeness to
  142.     the  machine  hardware which is so necessary in  those    difficult
  143.     situations.
  144.  
  145.          PARASOL  is a single-pass compiler.   The object code  (.COM
  146.     only,  no REL capability) is produced as the source code is read,
  147.     and  the source code is read only once.   Forward references  are
  148.     resolved  in  the  object file at whatever  points  the  compiler
  149.     detects  there resolution in the source code.    There is a  final
  150.     fix-up pass folling the end of the source file which connects all
  151.     forward references to the built-in support routines.
  152.  
  153.          PARASOL  was designed to be a highly-efficient language  for
  154.     the Z80 and 8080 microprocessors. Most PARASOL statements require
  155.     either several machine-level instructions,  or a subroutine-call.
  156.     However,  only    the subroutines needed by a program are  included
  157.     with  the  object-code    for that program,  there is not  a  large
  158.     subroutine library overhead as most high-level languages require.
  159.  
  160.          A    variety of compiler switches are supported which  provide
  161.     features ranging from compiler-listing format and disposition  to
  162.     run-time protection features.
  163.  
  164.          The  philosophy  behind  PARASOL  is  to  provide    the  most
  165.     efficient object code possible,  while retaining the  readability
  166.     which  makes program debugging and maintenance simpler.   PARASOL
  167.     was  designed  to be  straightforward,    easy-to-read,  and  self-
  168.     documenting.    It  was  not  designed    to  provide  the  maximum
  169.     processing power with the least coding effort.
  170.  
  171.          Although    PARASOL  is  actually  a   "medium-to-high-level"
  172.     language (as opposed to a high-level language),  it provides many
  173.     advanced  constructs  which are not found together in  any  other
  174.     single    language.   PARASOL  is ideally suited    for  applications
  175.     ranging  from  process-control to  business-accounting    packages.
  176.     For process-control,  and other "real-time" applications, PARASOL
  177.     offers    the advantages of very fast execution time,  and  compact
  178.     object-code size which minimizes the amount of ROM which must  be
  179.     included   in    a  controller.
  180.  
  181.          For business and accounting applications, PARASOL supports a
  182.     BCD  numeric format which eliminates "round-off" or  "truncation"
  183.     errors inherent in the binary floating-point formats used by many
  184.     other languages.   Also, due to the compact object-code produced,
  185.     an application module may contain more application functions than
  186.     many   other  compilers  will  allow  due  to  object-code   size
  187.     limitations.    This   allows  fewer  overlays     and/or   program
  188.     "chain"'s;  and even when one module must execute another module,
  189.     the  program-loading  time is reduced due to the smaller  object-
  190.     code size.
  191.  
  192.  
  193.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:3
  194.  
  195.  
  196.  
  197.  
  198.  
  199.     LANGUAGE DESCRIPTION    LANGUAGE DESCRIPTION
  200.  
  201.  
  202.          PARASOL  also provides the capability of compiling a program
  203.     which  is  larger than the available memory through  the  use  of
  204.     overlays.   See  the SEGMENTED statement for further  information
  205.     about this.
  206.  
  207.          PARASOL   is   generally  not  suited   to   scientific   or
  208.     mathematical  applications,  because  there is no  floating-point
  209.     capability, nor built-in provision for handling multi-dimensional
  210.     arrays.
  211.  
  212.          The  language syntax of PARASOL combines the readability  of
  213.     COBOL with the structure of ALGOL,  PASCAL,  etc.  All statements
  214.     start  with what would be called a VERB in  COBOL,  but  anywhere
  215.     that  a single source-statement may appear,  a list of statements
  216.     bounded  by BEGIN and END may appear.      Identifier-scope  rules            BEGIN     END
  217.     parallel those of ALGOL, where an identifier is global throughout
  218.     the  block in which it is declared,  and undefined  outside  that
  219.     block.
  220.  
  221.          Strictly speaking,  there are no reserved-words in PARASOL,
  222.     only key-words.   Key-words are 'reserved' in context only.   Any
  223.     key-word  may  be used as a variable-name or  statement-label  if
  224.     desired, although this is discouraged, since, when a syntax-error
  225.     is  encountered by the compiler,  it begins compiling again  with
  226.     the next key-word it finds following the error.  For example:
  227.  
  228.          ADD SUBTRACT TO MULTIPLY GIVING DIVIDE         ___              ______         ADD      TO          GIVING         ___              ______
  229.  
  230.     will  compile code which will add two values named "SUBTRACT" and
  231.     "MULTIPLY" and store the result in a variable named "DIVIDE".    A
  232.     problem  may arise,  however,  if the word GIVING is  misspelled.                           GIVING
  233.     The compiler will print an error for the unrecognised word,  then
  234.     will  attempt  to  compile  a  DIVIDE  statement.    For  further                       DIVIDE
  235.     information  see  the  section on  valid  identifier-names  which
  236.     follows.
  237.  
  238.          There is also a compiler option (LIMIT WORD) which makes all
  239.     key-words  into  reserved-words.   This prevents  any  accidental
  240.     usage    of  key-words  as  identifiers,   and  also  speeds   the
  241.     compilation process for very large programs.
  242.  
  243.          ARRAYs are not currently implemented in PARASOL.  This was a
  244.     design    consideration,    but  since  generalized  array-processing
  245.     could not be made as efficient as user-programmed POINTER  usage,                              POINTER
  246.     and  since  the  inclusion of arrays in the language  would  have
  247.     complicated  the  construction    of  the  compiler  enormously,    I
  248.     decided  to go with POINTER capability only.   I have found  that                POINTER
  249.     although  there  is  a    certain  amount  of  discomfort   getting
  250.     accustomed to working without arrays,  that the usage of POINTERs                                 POINTER
  251.     has  all the capabilities of arrays and many fewer  disadvantages
  252.     than one would expect.     Also the usage of POINTERs is inherently                           POINTER
  253.     more  flexible    than arrays,  since the memory past the end of    a
  254.     program which would generally be wasted,  can be used for storage
  255.     of data,  also a subscript generally must be re-evaluated,  and a
  256.     new index computed each time a subscript is used,  but a  POINTER                                  POINTER
  257.  
  258.  
  259.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:4
  260.  
  261.  
  262.  
  263.  
  264.  
  265.     LANGUAGE DESCRIPTION    LANGUAGE DESCRIPTION
  266.  
  267.  
  268.     can  be set once and used many times with no additional overhead.
  269.     The   usage  of  the  INDEX  statement    greatly  simplifies   the
  270.     implementation of arrays.
  271.  
  272.          There  is    no  provision  in  the    compiler  for  linking-in
  273.     relocatable  assembler routines,  but it is easy to perform  this
  274.     function  using DDT or a similar program.   Also there is  rarely
  275.     any need to resort to assembly-language coded routines, since all
  276.     assembler  capabilities are provided in PARASOL,  and  since  the
  277.     generated object code is nearly as efficient as assembly-language
  278.     coding.
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:5
  326.  
  327.  
  328.  
  329.  
  330.  
  331.     RUNNING PARASOL    RUNNING PARASOL
  332.  
  333.  
  334.          PARASOL consists of two object modules:
  335.  
  336.           1.   PARASOL.COM
  337.           2.   PARASOL2.OVL
  338.  
  339.          Both  of  these  files  must be available on  the    disk  for
  340.     correct operation.   PARASOL2.OVL contains the code for the final
  341.     forward-reference cleanup after the source has been processed, as
  342.     well as the built-in procedure library.  If PARASOL cannot locate
  343.     PARASOL2.OVL on the current drive/user,  it will also attempt  to
  344.     load it from drive A:, user 0.
  345.  
  346.          Start PARASOL with the following command:
  347.  
  348.     12B>PARASOL <source-name> [<option-list>]        PARASOL          [        ]
  349.  
  350.          The  source-name identifies the source file with a  required
  351.     extension of .SRC.   If source-name has an extension,  it will be
  352.     used for the object file.   The option-list is optional,  but, if
  353.     present, must be enclosed in square brackets.  For example:
  354.  
  355.     12B>PARASOL BUILD.CPM [PRINT CON]
  356.  
  357.          This  will  compile the source in BUILD.SRC and generate  an
  358.     object file as BUILD.CPM.  The compiler listing will be displayed
  359.     on the console.
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:6
  392.  
  393.  
  394.  
  395.  
  396.  
  397.     Compiler Switches    Compiler Switches
  398.  
  399.  
  400.  
  401.          There are several compile-time switches which may be used to
  402.     control  various aspects of the compiler.   These must appear  in
  403.     one of two places;  either on the CP/M command line following the
  404.     name  of the program to compile,  or as the first source line  of
  405.     the  program.    There  is one extension to this rule:  the  first
  406.     source line of the program may be a COPY statement which copies a                        COPY
  407.     one-line library containing the compiler switches.
  408.          Note that the compiler switches may appear BOTH on the  CP/M
  409.     command  line  in addition to the first source line for the  same
  410.     program.   The switches on the command line are processed  first,
  411.     and  some switches may only appear on the command line,  and  are
  412.     invalid if specified in the source-code.
  413.          The format of the compiler switches is:
  414.  
  415.           [ switch [ switch ] ... ]          _              _          [              ]          _              _
  416.  
  417.          Note  that  the  beginning and ending  square  brackets  are
  418.     boldface and underlined,  indicating that they are required.  The
  419.     "switch" is any of the options from the table below.
  420.  
  421.     ADDRESS        This option tells the compiler to list the address    ADDRESS
  422.                of the generated code on the compiler listing.
  423.  
  424.     CSTACK SIZE n  This  option specifies the size of the  compiler's    CSTACK SIZE n
  425.                stack.    The  work SIZE is optional.   "n" is  the                      SIZE
  426.                number  of  bytes to use for the compiler's  stack
  427.                space.    The  default value is 256 bytes.   It  is
  428.                possible  that  a very deeply nested  program  may
  429.                exceed  the  compiler  stack/symbol-table   space.
  430.                This   option  is  provided  to    circumvent   that
  431.                possibility.
  432.  
  433.     EXECUTE        This  option  specifies that the  compiler  should    EXECUTE
  434.                execute    this program immediately after    compiling
  435.                it.   The  program will not be executed    if  there
  436.                were any compile errors.
  437.  
  438.     INPUT x        This option must appear on the CP/M command line.    INPUT
  439.                This  allows  you to specify that the source  file
  440.                resides    on drive "x".    When this option  is  not
  441.                used, the source file is assummed to reside on the
  442.                current default drive.
  443.  
  444.     LIMIT STRING   This   option  provides    some  small  measure   of    LIMIT STRING
  445.                protection  against  STRING variables  overrunning                        STRING
  446.                their allocated space.  It causes all MOVEs of one                                 MOVE
  447.                string  to another to be a fixed number of  bytes.
  448.                The  number of bytes moved will be the smaller  of
  449.                the declared lengths of the two strings.
  450.  
  451.     LIMIT WORD     This  option  causes all PARASOL key-words  to  be    LIMIT WORD
  452.                treated as reserved-words.   A by-product of  this
  453.                is,  since  the compiler can skip the symbol-table
  454.                search  for  any key-words,  the compile  time  is
  455.  
  456.  
  457.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:7
  458.  
  459.  
  460.  
  461.  
  462.  
  463.     Compiler Switches    Compiler Switches
  464.  
  465.  
  466.                reduced somewhat.
  467.  
  468.     LEVEL           This  option  tells  the  compiler  to  print  the    LEVEL
  469.                syntactic-level counter beside each source line in
  470.                the compiler-listing file.
  471.  
  472.     MAP           This  option  specifies that the  compiler  should    MAP
  473.                list  a    map  of  the addresses    of  the  built-in
  474.                routines  added to the end of the  program.   This
  475.                map  will be included at the end of  the  compiler
  476.                listing file.
  477.  
  478.     MATCH           This  option tells the compiler to match-up BEGIN-    MATCH                               BEGIN
  479.                END pairs,  as well as block markers of all  other               END
  480.                types ( RECORD ENDREC,  etc.  ).   On the compiler                   RECORD ENDREC
  481.                listing,  whenever  the    ending    block  marker  is
  482.                found,    the   line-number  of  the  corresponding
  483.                beginning marker is listed.
  484.  
  485.     MPM           This  option specifies that the generated  object-    MPM
  486.                code MAY be run under MP/M,  and that the  PARASOL
  487.                MP/M-interface  routine should be included in  the
  488.                object-code.   See the section about running under
  489.                MP/M later in this manual.
  490.  
  491.  
  492.     NOWARN           This  option  inhibits compiler warning    messages,    NOWARN
  493.                inhibits  SEGMENT summary messages,  and  shortens                 SEGMENT
  494.                the compiler summary at the end of the compile.
  495.  
  496.     NSTAR           This  option specifies that the generated  object-    NSTAR
  497.                code  will  be  run in multi-user mode  under  the
  498.                n/Star  operating system of  Molecular  Computers.
  499.                 This  switch  allows the compiler  to  handle
  500.                various run-time error conditions correctly.   See
  501.                the  section about running under n/Star    later  in
  502.                this manual.
  503.                 If NSTAR is specified, MPM is assummed.                   NSTAR           MPM
  504.  
  505.     NUMBER           This  option  tells the compiler  to  print  line-    NUMBER
  506.                numbers on the compiler listing.
  507.  
  508.     PRINT [CON] [PRN] [DISK x .ext] [FULL]    PRINT  CON   PRN   DISK      FULL
  509.                This  option tells the compiler the disposition of
  510.                the  compiler-listing.    The  word  PRINT  may  be                               PRINT
  511.                followed by any of the above options in any order.
  512.                CON - print the listing to the console.               CON
  513.                PRN - print the listing to the printer               PRN
  514.                DISK x .ext - print the listing to a disk file on drive               DISK
  515.                "x".   The filename will be the same as the source
  516.                filename with an extension of ".PRN" unless ".ext"
  517.                is specified.
  518.                FULL - Print the full listing,  even if PRINT  OFF               FULL                       PRINT  OFF
  519.                appears within the source.
  520.  
  521.  
  522.  
  523.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:8
  524.  
  525.  
  526.  
  527.  
  528.  
  529.     Compiler Switches    Compiler Switches
  530.  
  531.  
  532.     STACK NONE     This  option  specifies    that the  object  program    STACK NONE
  533.                should  NOT have a stack allocated.   The  program
  534.                will use the small stack provided by CP/M.   It is
  535.                essential  that    this  option  be  used    only   by
  536.                programs  which    have  little or no  stack  usage,
  537.                since  the stack space available by CP/M is  quite
  538.                limited.   The  STACK  SAVE  option  is    generally                       STACK  SAVE
  539.                preferred.
  540.  
  541.     STACK SAVE     This option must appear on the CP/M command-line.    STACK SAVE
  542.                This option will allow a program to return to CP/M
  543.                without rebooting.   The CP/M stack is saved,  but
  544.                the PARASOL program has it's own stack.     When the
  545.                program    finishes  running,   the  CP/M    stack  is
  546.                restored,  and the program RETurns to CP/M.   This
  547.                option must not be used in any program which  uses
  548.                the  HIMEM construct for data-storage,  since that                HIMEM
  549.                is  likely to wipe-out the transient  CP/M  module
  550.                which is needed for this RETurn.
  551.  
  552.  
  553.     STACK num      This  option  allocates    a fixed  stack    of  "num"    STACK num
  554.                number  of bytes immediately following the  object
  555.                module.
  556.  
  557.     *NOTE*           Note  that if neither STACK NONE or STACK  num  is    *NOTE*                     STACK NONE    STACK  num
  558.                specified,  that  the object program's stack  will
  559.                begin just below the BDOS, and grow downwards from
  560.                there.    This provides the maximum allowable stack
  561.                space.
  562.  
  563.     STANDALONE     This  option specifies that the generated  object-    STANDALONE
  564.                code  will not be run under CP/M,  or  any  "CP/M-
  565.                compatible"  operating  system.      Any  statements
  566.                which  would  cause  a CP/M function  call  to  be
  567.                generated will be flagged with an error message.
  568.  
  569.     TAB n           This option tells the compiler at what interval to    TAB n
  570.                expand  TAB characters.     The default is  every    4
  571.                spaces.     Note that the CP/M default with ED,  and
  572.                BDOS  is every 8 spaces.   "n" can be 2,  4,  or 8
  573.                only.
  574.  
  575.     TABLE           This  option specifies that all PARASOL    generated    TABLE
  576.                built-in  routines  should be accessed  through    a
  577.                table  in the low memory of the program.   If this
  578.                is NOT specified,  all references to the  built-in
  579.                subroutines  will be direct.   The disadvantage to
  580.                this is that the compiler must maintain a forward-
  581.                reference  marker for each call to  each  built-in
  582.                subroutine,  until it has been determined at which
  583.                address    these  routines  will  be  loaded.   This
  584.                greatly    increases  the    symbol-table  size,   and
  585.                consequently  slows down the compiler,  since it's
  586.                symbol-table searches take longer.  Also, a larger
  587.  
  588.  
  589.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:9
  590.  
  591.  
  592.  
  593.  
  594.  
  595.     Compiler Switches    Compiler Switches
  596.  
  597.  
  598.                program may be compiled with TABLE specified  than                            TABLE
  599.                without    it,  since  a larger symbol-table may  be
  600.                handled.
  601.                 When TABLE is specified, the compiler inserts                 TABLE
  602.                a jump-table at a known address in low-memory, and
  603.                all  references    to built-in routines  go  through
  604.                this jump table.   When the built-in routines  are
  605.                actually  loaded into the object code,  this table
  606.                is  the    only thing which needs to be  patched  to
  607.                reflect those addresses.
  608.  
  609.     Z80           This  option specifies that the generated  object-    Z80
  610.                code will be run on a Z80 processor,  and that the
  611.                compiler should take advantage of the special  Z80
  612.                instruction set.
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:10
  656.  
  657.  
  658.  
  659.  
  660.  
  661.       EXPLANATION OF SYNTAX FORMAT USED IN THIS MANUAL      EXPLANATION OF SYNTAX FORMAT USED IN THIS MANUAL
  662.  
  663.  
  664.          Key-words are printed BOLDFACE, and where they are required,                   BOLDFACE
  665.     they  are  also  underlined.   This means that a  word    which  is             __________             underlined             __________
  666.     printed  boldface  but    not underlined may be  omitted    from  the
  667.     source    statement  with  no  effect  on  the  operation  of  that
  668.     statement.
  669.          When  a  clause  (group of words) is optional,  and  may  be
  670.     omitted, the entire clause is enclosed in brackets.
  671.          For example:
  672.  
  673.          ADD n1 TO n2 [ GIVING n3 ]         ___        ______         ADD    TO        GIVING         ___        ______
  674.  
  675.          The word TO is optional and may be omitted with no effect on              TO
  676.     the operation of the statement.
  677.          The  GIVING clause is optional and may be    omitted,  but  if          ______          GIVING          ______
  678.     used, the word GIVING is required.               ______               GIVING               ______
  679.  
  680.  
  681.          Generic  items  (items which describe the actual word to  be
  682.     placed in the position shown) are printed lower-case.
  683.  
  684.          When there is a choise of words, either key-words or generic
  685.     words,    they are printed inside braces ('{}'),    and any which are
  686.     not  defaults  are underlined.     This means that if a  choise  is
  687.     shown,    and one entry is NOT underlined, that it is assumed if it
  688.     is  omitted.   As a further explanation,  refer to the    following
  689.     example:
  690.          { RIGHT }           RIGHT
  691.          { LEFT  }           ____           LEFT           ____
  692.  
  693.          In this example,  there is a choise of LEFT or RIGHT.  Since                            LEFT    RIGHT
  694.     RIGHT is not underlined,  it is optional,  and will be assumed if    RIGHT
  695.     neither  is specified,    but LEFT is required if it is the  option                    LEFT
  696.     desired.   Also LEFT and RIGHT can be seen to be key-words  since            LEFT     RIGHT
  697.     they are printed boldface.
  698.          When a clause may be repeated,  the clause is followed by an
  699.     elipsis ('...').  For example:
  700.  
  701.          BYTE [id1] [VALUE value]         ____     _____         BYTE     VALUE         ____     _____
  702.             [, [id2] [VALUE value] ]...             _      _____             ,      VALUE             _      _____
  703.  
  704.          This indicates that the declaration of a second variable may
  705.     be  done in the same statement by following the first declaration
  706.     with a comma and another declaration;  likewise a third,  fourth,
  707.     etc. may follow.
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:11
  722.  
  723.  
  724.  
  725.  
  726.  
  727.          IDENTIFIERS, NAMES, LABELS, AND KEY-WORDS         IDENTIFIERS, NAMES, LABELS, AND KEY-WORDS
  728.  
  729.  
  730.          All  identifers  in PARASOL are composed  of  the    following
  731.     character-set:
  732.          The upper-case alphabet       A...Z
  733.          The lower-case alphabet       a...z
  734.          The numbers           0...9
  735.          The special symbols:       .    (period)
  736.                        _    (underscore)
  737.                        `    (grave accent)*
  738.                  * note that the grave accent (`)
  739.                     is NOT an apostrophe (')
  740.  
  741.          All  identifiers must begin with any character of the  above
  742.     set EXCEPT for a number.   Any character after the first may be a
  743.     number, if desired.
  744.          Case  (whether  a    letter    is  capialized    or  not)  is  NOT
  745.     significant  for key-words.   The word MOVE may be placed in  the
  746.     source as 'MOVE', 'move', or even as 'MoVe'.
  747.          NOTE  that case IS significant for all labels and    variable-
  748.     names,    for example, the following items are all considered to be
  749.     separate identifiers by the compiler:
  750.  
  751.          ABC abc Abc aBc a.bc ab.c ab_c A_BC
  752.  
  753.     As  an aid in choosing identifiers which do not conflict with any
  754.     key-words it is convenient to use the period,  underscore, and/or
  755.     grave-accent in all identifiers.   None of the key-words  contain
  756.     any  special characters or numbers,  so any identifier containing
  757.     one of these characters is certain to be recognised as not  being
  758.     a key-word by the compiler.
  759.          Identifiers may be any length up to 79 characters.                         79
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:12
  788.  
  789.  
  790.  
  791.  
  792.  
  793.         VARIABLE-TYPES SUPPORTED BY PARASOL        VARIABLE-TYPES SUPPORTED BY PARASOL
  794.  
  795.  
  796.          PARASOL supports the following variable types:
  797.  
  798.     BYTE    BYTE
  799.     WORD    WORD
  800.     STRING    STRING
  801.     BCD    BCD
  802.     FIELD    FIELD
  803.     BIT    BIT
  804.     RECORD    RECORD
  805.     BYTE-POINTER    BYTE-POINTER
  806.     WORD-POINTER    WORD-POINTER
  807.     STRING-POINTER    STRING-POINTER
  808.     BCD-POINTER    BCD-POINTER
  809.  
  810.          A    BYTE  variable is numeric and can have values from  0  to        BYTE
  811.     255.  Also, it may contain a single-character value.
  812.          A    WORD  variable is numeric and  can have values from 0  to        WORD
  813.     65535.    Also, it may contain a single- or double-character value.
  814.     If it contains a single-character value,  the hi-order byte is    a
  815.     null  character  (hex  code  ^h00).   If it  contains  a  double-
  816.     character  value,  the second character is the    high-order  byte.
  817.     All of the POINTER variables are treated as WORD variables unless           POINTER                WORD
  818.     preceded by '@'.             @
  819.          A    STRING    variable  is alphanumeric,  and may  contain  any        STRING
  820.     character except for the null character,  since this character is
  821.     used by the compiler to mark the end of the string.   The  length
  822.     of a string is limited only by the size allocated.
  823.          A    BCD variable is numeric and may contain any decimal value        BCD
  824.     from -99999999999999 to +99999999999999 (up to 14  digits).   BCD                                      BCD
  825.     variables  are    not  compatible with binary variables  (BYTE  and                                BYTE
  826.     WORD), and the CONVERT statement must be used to convert one type    WORD           CONVERT
  827.     to  another  before they can be used together  in  an  arithmetic
  828.     operation.   Compilers    which  handle  more than  14  digits  are
  829.     available  on request (up to 126 digits),  but it should be noted
  830.     that ALL BCD variables are fixed-length,  and each additional two         BCD
  831.     digits require one additional byte of storage per variable.
  832.          A    BIT variable is boolean (logical) and can have    only  the        BIT
  833.     values    TRUE (or 1) or FALSE (or 0).   BIT's are allocated 8 bits        TRUE           FALSE           BIT
  834.     per byte (if declared contiguously), and actually occupy only one
  835.     bit of storage.
  836.          A    FIELD  variable  is a fixed-length  string.   It  is  NOT        FIELD
  837.     interchangable    with  STRING variables    in  statements    requiring                  STRING
  838.     STRING    variables.   It  is  primarily designed for use  in  disk    STRING
  839.     records, and print-line formatting routines.  It IS allowed to be
  840.     used  in a MOVE statement to or from a STRING  variable,  and  in           MOVE                STRING
  841.     conditional expressions with STRING variables.                     STRING
  842.          POINTER  variables are all special cases of WORD  variables.         POINTER                     WORD
  843.     Any POINTER variable is treated exactly like a WORD variable when        POINTER                       WORD
  844.     referenced alone,  however, when the POINTER variable is preceded                         POINTER
  845.     by '@' ('AT' sign),  the pointer is treated as what it points to.        @
  846.     A  BYTE POINTER is treated as a BYTE variable,    a WORD POINTER is       BYTE POINTER         BYTE          WORD POINTER
  847.     treated as a WORD variable,  etc.  In all cases, the values which             WORD
  848.     are  referenced by the POINTER are the values starting in  memory                   POINTER
  849.     at the location whose address is in the POINTER  variable.   Note                        POINTER
  850.     that  since a STRING POINTER does not have a length declared,  it              STRING POINTER
  851.  
  852.  
  853.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:13
  854.  
  855.  
  856.  
  857.  
  858.  
  859.         VARIABLE-TYPES SUPPORTED BY PARASOL        VARIABLE-TYPES SUPPORTED BY PARASOL
  860.  
  861.  
  862.     is  treated as a STRING with "indefinite" length unless there  is             STRING
  863.     some other limitation provided (as with the MOVE statement).                            MOVE
  864.          A    RECORD variable is a collective reference to a    structure        RECORD
  865.     of variables, which may contain other RECORD variables.  A RECORD                          RECORD           RECORD
  866.     variable is referenced only in MOVE, ACCEPT, and FILE statements,                       MOVE  ACCEPT     FILE
  867.     and  implicitly  referenced in READ and  WRITE    statements.   The                       READ     WRITE
  868.     length    of a RECORD is the sum of the lengths of all  subordinate             RECORD
  869.     fields.
  870.          Note that since FIELDs and RECORDs have a length  associated                 FIELD    RECORD
  871.     with them,  there are no POINTERs for these types, since POINTERs                 POINTER             POINTER
  872.     do not have an associated length.
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:14
  920.  
  921.  
  922.  
  923.  
  924.  
  925.     NUMERIC QUANTITIES IN PARASOL    NUMERIC QUANTITIES IN PARASOL
  926.  
  927.  
  928.          The  following  varaible-types are considered to be  binary-
  929.     numeric by the compiler:
  930.  
  931.     BYTE,      WORD,     BYTE-POINTER,  WORD-POINTER,    BYTE,      WORD,     BYTE-POINTER,  WORD-POINTER,
  932.     STRING-POINTER,     BCD-POINTER,   @BYTE-POINTER,    STRING-POINTER,     BCD-POINTER,   @BYTE-POINTER,
  933.     @WORD-POINTER    @WORD-POINTER
  934.  
  935.     also the following are numeric,  but are listed separately, since
  936.     they are incompatible with the binary-numeric types listed above:
  937.     BCD, @BCD-POINTER    BCD, @BCD-POINTER
  938.  
  939.  
  940.                  NUMERIC CONSTANTS                 NUMERIC CONSTANTS
  941.          Numeric constants may be expressed in a variety of ways:
  942.  
  943.     (1): A character-string of length 1 or 2 (the first
  944.           character is the low-order byte).
  945.  
  946.     (2): An identifier preceded by '#', example:                    #
  947.           #x is a constant whose value is the 16-bit word
  948.           which is the address of 'x'.
  949.  
  950.     (3): An identifier preceded by '##', example                    ##
  951.           ##x is a constant whose value is the 16-bit word which
  952.           is the length (in bytes) of the identifier 'x'.
  953.           '##' may precede any variable type, the resulting value
  954.           is determined according to the following table:
  955.  
  956.           a statement-label   0
  957.           a BIT variable      0            BIT
  958.           a BYTE variable     1            BYTE
  959.           a WORD variable     2            WORD
  960.           a BCD variable      8 (assuming 14-digit BCD)            BCD
  961.           a STRING variable   the defined maximum length            STRING
  962.           a FIELD variable    the defined length            FIELD
  963.           a RECORD variable   the defined length            RECORD
  964.  
  965.     (4): An integer expression which is of the form:
  966.           [^<base>]<value>           ^
  967.          where <base> is H,D,O,Q,B,h,d,o,q, or b.
  968.          These represent:     H,h - Hexadecimal (base 16)
  969.                  D,d - Decimal       (base 10)
  970.                  O,o,Q,q - Octal   (base 8)
  971.                  B,b - Binary       (base 2)
  972.          If the base is ommitted, decimal is assumed.
  973.          Some examples are:
  974.           ^h0d - 13 decimal - carriage return character
  975.           ^q15 - 13 decimal
  976.           ^b1011 - 11 decimal
  977.           15 - 15 decimal
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:15
  986.  
  987.  
  988.  
  989.  
  990.  
  991.     NUMERIC QUANTITIES IN PARASOL    NUMERIC QUANTITIES IN PARASOL
  992.  
  993.  
  994.     (5): An expression of the form ( cnst operator cnst )                       (            )
  995.           Note that this is the ONLY usage in PARASOL for
  996.          parentheses.  Each "cnst" in this example may be derived
  997.          from any of the rules for constants, including this rule.
  998.          The operator may be any of the following:
  999.  
  1000.          operator  Resulting value
  1001.          --------  ---------------------------------
  1002.          +      The sum of the two values         +
  1003.          -      The result of subtracting the 2nd value from the 1st         -
  1004.          *      The product of the two values         *
  1005.          /      The quotient resulting from dividing the 1st value         /
  1006.           by the 2nd value
  1007.          MOD  The remainder resulting from dividing the 1st value         MOD
  1008.           by the 2nd value
  1009.          AND  The logical AND of the 16-bit bit-patterns formed         AND
  1010.           by the two values
  1011.          OR   The logical OR of the 16-bit bit-patterns formed         OR
  1012.           by the two values
  1013.          XOR  The logical exclusive-OR of the 16-bit bit-patterns         XOR
  1014.           formed by the two operands.
  1015.          MAX  The value of the larger of the two values         MAX
  1016.          MIN  The value of the smaller of the two values         MIN
  1017.  
  1018.     (6): An identifier defined in a SET statement to equal a                    SET
  1019.          constant.
  1020.  
  1021.  
  1022.  
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:16
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.     STRING QUANTITIES    STRING QUANTITIES
  1058.  
  1059.  
  1060.                   STRING VARIABLES                  STRING VARIABLES
  1061.  
  1062.          The  following  variable-types  are treated  as  strings  of
  1063.     characters.
  1064.     STRING    STRING
  1065.     @STRING-POINTER    @STRING-POINTER
  1066.     FIELD    FIELD
  1067.          Note that a FIELD variable is incompatible with STRING  type             FIELD                     STRING
  1068.     except in the MOVE statement and comparisons.              MOVE
  1069.  
  1070.                   STRING CONSTANTS                  STRING CONSTANTS
  1071.  
  1072.          A    string    constant may be declared using either  quotes  or
  1073.     apostrophes to delimit the characters.    For example:
  1074.  
  1075.          'This is a string delimited by "apostrophes"'         'This is a string delimited by "apostrophes"'
  1076.          "This string's delimiters are quotes"         "This string's delimiters are quotes"
  1077.  
  1078.          Note  that  a  string  constant is ended only  by    the  same
  1079.     delimiter  which  starts it.   A compiler limitation  prevents    a
  1080.     string    from  crossing    over a source line,  so  any  string  not
  1081.     terminated by the proper delimiter will be terminated at the  end
  1082.     of the line.  An error message will also be generated.
  1083.  
  1084.          Hex  values  for non-displayable characters may be  directly
  1085.     coded into strings delimited by ~ (tilde).  For example:                    ~
  1086.                "~1b~=11"
  1087.          This is an example of a string which would cause the  cursor
  1088.     to  be    positioned  to the top-left corner of some types  of  CRT
  1089.     display device.   This construct is very useful for this type  of
  1090.     usage (CRT control characters, printer option controls, etc.)
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:17
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.      CONDITIONAL EXPRESSIONS AND COMPARISONS     CONDITIONAL EXPRESSIONS AND COMPARISONS
  1124.  
  1125.  
  1126.          Conditional expressions are used in the IF, WHILE, and UNTIL                             IF  WHILE        UNTIL
  1127.     constructs.   These  statements will accept any of the    following
  1128.     formats:
  1129.     (1): numeric-value  logocal-op       numeric-value
  1130.     (2): numeric-value  relational-op  numeric-value
  1131.     (3): numeric-value
  1132.     (4): string-value   relational-op  string-value
  1133.     (5): string-value
  1134.     (6): bit-value
  1135.     (7): constant (including TRUE and FALSE)                 TRUE      FALSE
  1136.     (8): relational-op
  1137.  
  1138.          A    numeric-value  may be any numeric variable or  a  numeric
  1139.     constant.
  1140.          A    string-value  may  be any string  variable  or    a  string
  1141.     constant.   Note  that STRING and FIELD ARE compatible with  this                   STRING      FIELD
  1142.     construct.
  1143.          A logical-op may be AND, OR, or XOR.  These are evaluated by                 AND  OR     XOR
  1144.     performing the associated boolean operation, and the condition is
  1145.     TRUE  if  the result of the boolean operation is  NON-ZERO.   The
  1146.     condition is FALSE if the result is ZERO.
  1147.          Numeric-values,  constants,  and BIT-values are true if non-                          BIT
  1148.     zero,  and  false  if zero.   If numeric-values or constants  are
  1149.     used,  the expression is evaluated at compile-time.  A single JMP
  1150.     machine instruction will be generated,    if needed.   If it is not
  1151.     needed, no code will be generated.
  1152.          String-values alone are true if non-null, and false if null.
  1153.          Field-values  alone  are true if  non-blank,  and    false  if
  1154.     blank.
  1155.  
  1156.  
  1157.          Relational-op  may be >,>=,=,<>,<=,  or <.  These follow the                   > >= = <> <=      <
  1158.     'classical' definitions of the symbols where:
  1159.           >    is true if the value to the left is          >
  1160.             larger than the value to the right.
  1161.           >=    is true if the value to the left is          >=
  1162.             larger or the same as the value to the right.
  1163.           =    is true if both values are the same.          =
  1164.           <>    is true if both values are not the same.          <>
  1165.           <=    is true if the left-value is less than          <=
  1166.             or the same as the right-value.
  1167.           <    is true if the left-value is less than          <
  1168.             the right-value.
  1169.  
  1170.          In  option (8),  where only a relational-op  is  shown,  the
  1171.     condition is evaluated according to the microprocessor condition-
  1172.     codes as follows:
  1173.           <  is true if CARRY is true.
  1174.           <= is true if CARRY is true or ZERO is true                          __
  1175.           =  is true if ZERO is true
  1176.           <> is true if ZERO is false.
  1177.           >= is true if CARRY is false.
  1178.           >  is true if CARRY is false and ZERO is false.                           ___
  1179.          NOTE:  this  construct is designed to be used ONLY following
  1180.     an  MCALL  statement.    The  microprocessor  condition-codes  are
  1181.  
  1182.  
  1183.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:18
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.      CONDITIONAL EXPRESSIONS AND COMPARISONS     CONDITIONAL EXPRESSIONS AND COMPARISONS
  1190.  
  1191.  
  1192.     undefined following all other PARASOL statements,  and the effect
  1193.     of  any  given    statement on the condition-codes  may  very  well
  1194.     change    between different versions of PARASOL if  more    efficient
  1195.     methods of implementing that statement become known to me.
  1196.  
  1197.          STRINGs  are  compared from left to right on a  byte-by-byte         STRING
  1198.     basis.    The comparison is terminated on the first byte-pair which
  1199.     is not equal,  or when both bytes compared are null.   This means
  1200.     that  for  two STRINGs to compare equal,  they must be    the  same               STRING
  1201.     length,  since    the  null-terminator in the shorter  string  will
  1202.     compare less than any other character in the longer string if the
  1203.     lengths are unequal.
  1204.          FIELDs  are  compared as though the shorter FIELD    had  been         FIELD                     FIELD
  1205.     extended  with    blank  characters to be the same  length  as  the
  1206.     longer    FIELD.     Then both FIELDs are compared on a  byte-by-byte        FIELD           FIELD
  1207.     basis until either an un-equal condition is encountered, or until
  1208.     all characters have been compared.
  1209.          When  a STRING is compared with a FIELD,  the comparison  is             STRING               FIELD
  1210.     done  as if the STRING were MOVEd to a FIELD of the same  length,            STRING        MOVE       FIELD
  1211.     then   the  comparison    procedes  the  same   as   FIELD-to-FIELD                               FIELD    FIELD
  1212.     comparison.
  1213.  
  1214.  
  1215.  
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:19
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.     LOCAL REDEFINITIONS ('OVERRIDES')    LOCAL REDEFINITIONS ('OVERRIDES')
  1256.  
  1257.  
  1258.          In general,  anywhere a variable-name is allowed,    it may be
  1259.     followed  by  an override.   An overridden variable-name has  the
  1260.     following format:
  1261.  
  1262.          [@] variable-name [ override-list ]...                   _           _          @            [           ]                   _           _
  1263.  
  1264.          (Note   that   the  brackets  above   are     underlined   and
  1265.     boldface,indicating  that  they  are  required    by  the  language
  1266.     syntax, and not present only for the description.)
  1267.  
  1268.          The  override-list  contains  one or more of  the    following
  1269.     override-items, optionally separated by commas:
  1270.  
  1271.     + constant    The constant is added to the address of the    +
  1272.                variable-name.  This is most useful with
  1273.                STRING, FIELD, and RECORD variables.  Care               STRING  FIELD      RECORD
  1274.                should be exercised when using this with
  1275.                STRING variables, since there is no protec-               STRING
  1276.                tion provided to prevent accessing past the
  1277.                dynamic length of a string, and getting
  1278.                garbage left over from previous contents
  1279.                of the string.  NOTE that when using this                       ____                       NOTE                       ____
  1280.                override with POINTER variables, that the                     POINTER
  1281.                address of the pointer is modified, not the
  1282.                address of what the pointer references.    To
  1283.                change the address of what the pointer
  1284.                references, use the ADD statement.                       ADD
  1285.  
  1286.     - constant     Same as above, but the constant is subtracted    -
  1287.                from the address of the variable-name.
  1288.  
  1289.     BIT [:] constant   The variable is treated as a BIT variable    BIT  :                        BIT
  1290.                 with the bit position(s) specified by
  1291.                 the constant.  (Usually a hex constant).
  1292.                 The variable-name MUST NOT be preceded
  1293.                 by @.  Note that several bits in one                   @
  1294.                 byte may be referenced at once by using
  1295.                 a constant which has more than one bit
  1296.                 in its binary form.
  1297.  
  1298.     BP      The variable is treated as a 16-bit byte-pointer.    BP
  1299.           The variable-name MUST be preceded by @.                            @
  1300.  
  1301.     BYTE      The variable is treated as an 8-bit BYTE variable.    BYTE                          BYTE
  1302.           The variable-name MUST NOT be preceded by @.                                @
  1303.  
  1304.     FIELD      The variable is treated as a FIELD variable.    FIELD                       FIELD
  1305.          The name MUST NOT be preceded by @.                          @
  1306.          If the variable was originally a STRING, RECORD,                          STRING  RECORD
  1307.           or FIELD, the length of the original variable is             FIELD
  1308.           used if not overriden, otherwise, the LENGTH                            LENGTH
  1309.           override should be used to provide a length.    The
  1310.           variable-name MUST NOT be preceded by @.                            @
  1311.  
  1312.     LENGTH     This may be used to specify a length to be used,    LENGTH
  1313.  
  1314.  
  1315.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:20
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.     LOCAL REDEFINITIONS ('OVERRIDES')    LOCAL REDEFINITIONS ('OVERRIDES')
  1322.  
  1323.  
  1324.           or to provide a length for overriding variables
  1325.           which do not have a length with a type which
  1326.           requires a length.  This override is meaningful
  1327.           only when the resulting variable-type is either
  1328.           FIELD, STRING, or RECORD.  The variable-name          FIELD  STRING     RECORD
  1329.           MUST NOT be preceded by @.                      @
  1330.  
  1331.     RECORD      The variable is treated as a RECORD variable.    RECORD                       RECORD
  1332.           If the original variable was FIELD, STRING, or                           FIELD  STRING
  1333.           RECORD, the declared size will be used if not          RECORD
  1334.           overridden, otherwise, a LENGTH override must be                       LENGTH
  1335.           provided.  The variable-name MUST NOT be preceded
  1336.           by @.             @
  1337.  
  1338.     SP      The variable is teated as a 16-bit string-pointer    SP
  1339.           and MUST be preceded by @.                      @
  1340.  
  1341.     STRING      The variable is treated as a STRING variable, and    STRING                       STRING
  1342.           MUST NOT be preceded by @.                      @
  1343.  
  1344.     WORD      The variable is treated as a 16-bit WORD variable    WORD                          WORD
  1345.           and MUST NOT be preceded by @.                          @
  1346.  
  1347.     WP      The variable is treated as a 16-bit word-pointer,    WP
  1348.           and MUST be preceded by @.                      @
  1349.  
  1350.  
  1351.          If  multiple  offset  overrides  are  used  (+  constant,    -                              +        -
  1352.     constant), the resultant address is modified by the algebraic sum
  1353.     of all offsets used.
  1354.          If multiple type-overrides are used,  the last one specified
  1355.     is the one used.
  1356.          If  multiple  LENGTH  overrides  are  used,   the    last  one               LENGTH
  1357.     specified is used.
  1358.          Note  that  the  LENGTH override,    when  used  on    a  STRING                  LENGTH                   STRING
  1359.     variable  has  effect only under conditions outlined in the  MOVE                                     MOVE
  1360.     statement, since the length of a string is determined dynamically
  1361.     under all other conditions.
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:21
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.     LABEL DECLARATIONS    LABEL DECLARATIONS
  1388.  
  1389.  
  1390.          Note  that there is no explicit declaration for  identifiers
  1391.     to be used as statement-labels.   This causes an ambiguity in the
  1392.     scope rules as stated.    Consider the following example:
  1393.  
  1394.          :
  1395.          :
  1396.     goto label.1;
  1397.          :
  1398.          :
  1399.          begin
  1400.           :
  1401.          label.1:
  1402.           :
  1403.           :
  1404.           goto label.1;
  1405.           :
  1406.           :
  1407.           end;
  1408.          :
  1409.          :
  1410.     goto label.1;
  1411.          :
  1412.          :
  1413.     label.1:
  1414.          :
  1415.          :
  1416.  
  1417.          The  first goto will be compiled as a forward  reference  to
  1418.     'label.1'.   This  forward-reference  will be resolved    when  the
  1419.     'label.1' declaration is encountered inside the begin-block.  The
  1420.     second 'goto' is inside the block in which 'label.1' is declared,
  1421.     and  is a reverse-reference,  and is compiled as expected.   When
  1422.     the 'end' statement is encountered,  the declaration of 'label.1'
  1423.     is  removed  from the symbol-table.   When the    third  'goto'  is
  1424.     encountered,  it  references a label which is not in the  symbol-
  1425.     table  and is compiled as a forward-reference.     When the  second
  1426.     declaration of 'label.1' is encountered, the forward-reference is
  1427.     resolved.
  1428.          This  results in the situation where two 'goto's (the  first
  1429.     and  third) reference the same label,  but are compiled to branch
  1430.     to different places.  This can be easily avoided by always having
  1431.     unique    names for all identifiers used as labels.   The only  way
  1432.     around    this  ambiguity  would    be to  allow  an  explicit  LABEL                                    LABEL
  1433.     declaration  to  define the scope of a label,  and  this  may  be
  1434.     included  as a feature in a future version of PARASOL.     If is is
  1435.     included,  it will be optional so that any programs compiled with
  1436.     previous  versions  of    PARASOL will still compile  in    the  same
  1437.     manner.
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:22
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.     CP/M RESERVED MEMORY USAGE    CP/M RESERVED MEMORY USAGE
  1454.  
  1455.  
  1456.          Any  of  the CP/M reserved memory areas may be  accessed  by
  1457.     declaring  appropriate    EXTERNAL  variables.    The  majority  of                EXTERNAL
  1458.     PARASOL statements have no effect on this part of memory,  but if
  1459.     the program uses any part of this area,  the programmer should be
  1460.     aware that the following statements may modify it:
  1461.          REMOVE         REMOVE
  1462.          RENAME         RENAME
  1463.          FIND   (except when a FILE is used as the         FIND           FILE
  1464.             object of the statement, instead of a
  1465.             string-literal or string-variable.)
  1466.  
  1467.  
  1468.          Also the programmer should be aware that the OPEN    statement                              OPEN
  1469.     uses  data from this area (the default-fcb at address  ^h5c),  on
  1470.     the  first  OPEN (only) of a file containing the FILE1    or  FILE2            OPEN                 FILE1        FILE2
  1471.     clause.  So, for the program to work as intended, all files which
  1472.     use  the  FILE1 or FILE2 clauses should be OPENed prior to  using          FILE1    FILE2           OPEN
  1473.     the  REMOVE,  RENAME,  or FIND statements.         REMOVE   RENAME      FIND
  1474.          Also  the    compiler  generates  code  which  uses    the  CP/M
  1475.     default-dma  record at address ^h80 for all directory  operations
  1476.     during any disk-file related activities,  and since this is  also
  1477.     the area used for console-command-line storage,  the command-line
  1478.     should    be  processed  or  saved in  another  location    prior  to
  1479.     executing any disk-related statements.
  1480.          In  general,  if the contents of this area of memory are  of
  1481.     importance to yuor program, you should move a copy of it to local
  1482.     storage in the first statement of your program.  This will insure
  1483.     that you get a non-corrupted copy of it.
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:23
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.     ABBEVIATIONS USED FOR VARIABLE-TYPES    ABBEVIATIONS USED FOR VARIABLE-TYPES
  1520.  
  1521.  
  1522.          The  following abbreviations will be used in the  subsequent
  1523.     pages  to  indicate  the variable types allowed in  the  position
  1524.     indicated:
  1525.  
  1526.     bcd      A decimal variable.  It may be BCD or BCD-POINTER.                         BCD    BCD-POINTER
  1527.  
  1528.     bin      A binary variable.  It may be BYTE, WORD, BYTE-                        BYTE  WORD  BYTE-
  1529.           POINTER, or WORD-POINTER.          POINTER     WORD-POINTER
  1530.  
  1531.     num      A numeric variable, it may be any of the types
  1532.           allowed for 'bcd' or 'bin'.
  1533.  
  1534.     str      A string variable.  It may be STRING or STRING-                        STRING      STRING-
  1535.           POINTER.          POINTER
  1536.  
  1537.     cnst      A constant.  This may be expressed in decimal or
  1538.           any other radix(base) which is convenient.  Note
  1539.           that a constant may also be specified with a
  1540.           1- or 2-character string-literal, a '#' followed
  1541.           by an identifier, or an identifier declared as a
  1542.           constant in a SETstatement.                SET
  1543.  
  1544.     dcnst      A decimal constant.  This is generally only
  1545.           required when appearing in a statement with a
  1546.           BCD variable.          BCD
  1547.  
  1548.     lit      A string-literal enclosed in quotes(") or                              "
  1549.           apostrophes(').                  '
  1550.  
  1551.     rec      A RECORD variable.            RECORD
  1552.  
  1553.     bit      A BIT variable.            BIT
  1554.  
  1555.     id      Any identifier.  This may be either a statement-
  1556.           label, or a variable-name.
  1557.  
  1558.     var      Any variable identifier.
  1559.  
  1560.          All  other  variable-types  are spelled-out  and  are  self-
  1561.     explanatory.
  1562.  
  1563.          Note that the abbreviations given above may be followed by a
  1564.     dash  and a number when more than one occurrs in a  statement  in
  1565.     order  to allow the text to point out specific details about  the
  1566.     position indicated.
  1567.  
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:24
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.     ACCEPT statement    ACCEPT statement
  1586.  
  1587.  
  1588.            {lit} [ {lit}]
  1589.     ACCEPT {str} [,{str}]...    ______          _    ACCEPT    ______
  1590.            {rec} [ {rec}]
  1591.  
  1592.          If a string-literal is used, it is displayed as a prompt for
  1593.     a subsequent string or record variable.
  1594.          This  statement  uses the CP/M bufferred console input  call
  1595.     (function  10).   To meet the requirements of  CP/M,  the  STRING
  1596.     variable  which is to accept the value must be at least two bytes
  1597.     longer than the longest input string which is to be accepted.
  1598.          All CP/M line-editing features are available to the operator
  1599.     while  responding  to an ACCEPT.   This  statement  invokes  CP/M                 ACCEPT
  1600.     function  10  (read console buffer).   See the CP/M  programmer's
  1601.     guide for further information.
  1602.  
  1603.     EXAMPLES    ________
  1604.  
  1605.          :
  1606.          :
  1607.     string      con.in.string  42;  { max input length is 40 }
  1608.          :
  1609.          :
  1610.     accept "Enter your name",con.in.string;
  1611.     display "Your name is:",con.in.string;
  1612.          :
  1613.          :
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:25
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.     ADD statement    ADD statement
  1652.  
  1653.  
  1654.     ADD {cnst-1} TO {cnst-2} [ GIVING num-3]    ___               ______    ADD         TO        GIVING    ___               ______
  1655.         {num-1 }    {num-2 }
  1656.  
  1657.          The  value of (cnst-1/num-1) is added to (cnst-2/num-2)  and
  1658.     the result is stored in num-2 if no GIVING clause is present.  If                        GIVING
  1659.     a GIVING clause is present, the result is stored in num-3.      GIVING
  1660.          If cnst-2 is used, the GIVING clause MUST be used.                    GIVING
  1661.          If one or both source fields are 16-bit, and the destination
  1662.     field  is  8-bit,  a truncation warning will be  printed  on  the
  1663.     compile listing.
  1664.          For  binary  addition:  If  all  variables  are  8-bit,  the
  1665.     addition is performed modulus 256, if any variable is 16-bit, the
  1666.     addition is performed modulus 65536.
  1667.          For decimal addition, the addition is done to the modulus of
  1668.     the  maximum size of the BCD variable.                 BCD
  1669.          If both cnst-1 and cnst-2 are used,  the addition is done at
  1670.     compile-time, and the statement is optimised to a MOVE statement.                              MOVE
  1671.          If  either  cnst-1  or cnst-2  is    zero,  the  statement  is
  1672.     optimised to a MOVE statement.               MOVE
  1673.  
  1674.     EXAMPLES    ________
  1675.  
  1676.          :
  1677.          :
  1678.     string test.string 30 value "ABCDEFGHIJKLM";
  1679.     pointer to byte test.str.bp value #test.string;
  1680.     byte test.byte;
  1681.     bcd test.bcd.1,
  1682.          test.bcd.2;
  1683.          :
  1684.          :
  1685.     add 5 to #test.string giving test.str.bp;
  1686.           { Note that this will be optimised        }
  1687.           { Note that since 'test.str.bp' is not    }
  1688.           {     preceded by @, that it is treated as    }                     @
  1689.           {     a WORD variable for this statement    }               WORD
  1690.     move @test.str.bp to test.byte;   { This will move 'F' }
  1691.     add 3 to test.byte;     {  'test.byte' now contains 'I' }
  1692.     add 5 to test.bcd.1 giving test.bcd.2;
  1693.     add test.bcd.1 to 5 giving test.bcd.2;
  1694.           { Both of the above statements do the same thing }
  1695.          :
  1696.          :
  1697.          :
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:26
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.     AND/OR/XOR statements    AND/OR/XOR statements
  1718.  
  1719.  
  1720.          AND {cnst-1} WITH {cnst-2} [GIVING bin-3]         ___             ______         AND      WITH         GIVING         ___             ______
  1721.          {bin-1 }      {bin-2 }
  1722.  
  1723.          The  specified operation is performed on the variables in    a
  1724.     bit-by-bit manner.  The result of the operation is stored in bin-
  1725.     3  if the GIVING clause is present.   If the GIVING clause is not          GIVING                 GIVING
  1726.     present,  and  either  cnst-1 or cnst-2 is used,  the  result  is
  1727.     stored    in the bin variable specified.     If both bin-1 and  bin-2
  1728.     are  specified,  the  result is stored in bin-1  when  no  GIVING                                   GIVING
  1729.     clause is present.
  1730.          The receiving field determines whether the operation is done
  1731.     as an 8- or 16-bit operation.
  1732.          If  cnst-1 and cnst-2 are both used,  the GIVING clause must                               GIVING
  1733.     be  used.   Also  when    cnst-1 and  cnst-2  are  both  used,  the
  1734.     operation is done at compile-time, and the statement is optimised
  1735.     to a MOVE statement.         MOVE
  1736.          If  the  receiving field is 16-bit,  and one or both  source
  1737.     fields are 8-bit,  the 8-bit fields are treated as 16-bit  fields
  1738.     with a hi-order byte of binary zeros.
  1739.  
  1740.     EXAMPLES    ________
  1741.  
  1742.          :
  1743.          :
  1744.     byte a value ^b10100011,
  1745.          b value ^b01011100,
  1746.          c value 0;
  1747.     word i value ^b1100110011001100,
  1748.          j value ^b0110011001100110,
  1749.          k value 0;
  1750.          :
  1751.          :
  1752.          :
  1753.     and a with ^b00001111 giving c; {c now contains ^b00000011}
  1754.     and a with b giving c;          {c now contains zero}
  1755.     or a with b giving c;          {c now contains ^b11111111}
  1756.     xor i with j giving k;{k now contains ^b1010101010101010}
  1757.          :
  1758.          :
  1759.     { Example of a 'status-wait' loop }
  1760.     do
  1761.          input c from control.port;
  1762.          and c with ^h01;
  1763.          od until c <> 0;     {infinite loop until bit is set}
  1764.          :
  1765.     { This could be done more simply using the   }
  1766.     {      AND expression operator as follows    }
  1767.     do
  1768.          input c from control.port;
  1769.          od until c and ^h01;
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:27
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.     APPEND statement    APPEND statement
  1784.  
  1785.  
  1786.     APPEND {str-1} TO {str-2}    ______    APPEND           TO    ______
  1787.            {lit  }
  1788.  
  1789.          The value of (lit/str-1) is appended to the end of str-2.
  1790.          Note  that  no  check is done that the resulting  string  is
  1791.     within the limits declared for str-2.
  1792.  
  1793.     EXAMPLES    ________
  1794.  
  1795.          :
  1796.          :
  1797.     string a 80 value 'This is',
  1798.            b 20 value 'a test';
  1799.          :
  1800.          :
  1801.     append b to a; {a now contains 'This isa test'}
  1802.     {-- This should have been done as follows --}
  1803.     append " " to a;
  1804.     append b to a; {now a would contain 'This is a test'}
  1805.          :
  1806.          :
  1807.  
  1808.  
  1809.  
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.  
  1829.  
  1830.  
  1831.  
  1832.  
  1833.  
  1834.  
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:28
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.     BCD variable declaration    BCD variable declaration
  1850.  
  1851.  
  1852.     BCD bcd-1 [VALUE dcnst] [, bcd-2 [VALUE dcnst]]...    ___       _____     _      _____    BCD       VALUE          VALUE    ___       _____          _____
  1853.  
  1854.          This statement declares BCD variables.   Each variable  will
  1855.     require 8 bytes of storage with the standard BCD variable length.
  1856.     For  non-standard  BCD    lengths,  the  size can  be  computed  by
  1857.     dividing  the maximum number of digits by 2,  rounding up to  the
  1858.     next  whole number if the maximum number of digits was    odd,  and
  1859.     adding 1.
  1860.          The storage format of BCD variables is 'compatible' with the
  1861.     Intel-8087 numeric co-processor when the maximum number of digits
  1862.     is  16    (note that this is not the standard number of  digits  in
  1863.     PARASOL).   The  hi-order bit of the first byte is the sign  (0=+
  1864.     1=-),  the  low-7  bits of the first byte are  ignored,  and  the
  1865.     number    is stored in absolute-magnitude format in  the    remaining
  1866.     bytes as packed bcd digits.
  1867.  
  1868.  
  1869.  
  1870.  
  1871.  
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.  
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:29
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.     BEGIN statement    BEGIN statement
  1916.  
  1917.  
  1918.     BEGIN statement-list END    _____             ___    BEGIN             END    _____             ___
  1919.  
  1920.          This  statement-block  may  appear anywhere  that    a  single
  1921.     statement  is  allowed.   The statement-list is of the    following
  1922.     format:
  1923.     BEGIN    BEGIN
  1924.          [ data declarations ]
  1925.          [ procedure declarations ]
  1926.          [ executable statements ]
  1927.          END         END
  1928.  
  1929.          Any of the above items are optional, and may be omitted.  If
  1930.     either data-declarations,  or procedure-declarations are present,
  1931.     the  compiler will insert code in the object-code to jump  around
  1932.     them  when  the  BEGIN-block  is  'fallen-into'.   Note  that  in             BEGIN
  1933.     accordance with the identifier-scope rules previously given,  any
  1934.     data   or  procedures  declared  inside  a  BEGIN-block  may   be                            BEGIN
  1935.     referenced by name only from within the BEGIN-block.   They  will                        BEGIN
  1936.     be undefined outside the block.
  1937.          The  EXITBEGIN statement is allowed as any of the statements          EXITBEGIN
  1938.     in  the executable statements,    and will branch to the    statement
  1939.     following the END statement.              END
  1940.      EXAMPLES     ________
  1941.  
  1942.     test.prog: begin
  1943.          :
  1944.          :
  1945.     byte switch.1;
  1946.          :
  1947.          :
  1948.     move 0 to switch.1;
  1949.          :
  1950.          :
  1951.          begin
  1952.           string local.string 20;
  1953.           :
  1954.           :
  1955.          if switch.1 <> 0 then exitbegin fi;
  1956.          { This statement will 'goto' un.needed.label }
  1957.           :
  1958.           :
  1959.          end; {end of block}
  1960.     un.needed.label:
  1961.          :
  1962.          :
  1963.     end; {end of program}
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:30
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.     BIT variable declaration    BIT variable declaration
  1982.  
  1983.  
  1984.     BIT [id-1] [VALUE {TRUE }] [, [id-2] [VALUE {TRUE }] ]...    ___        _____  ____           _____  ____    BIT        VALUE  TRUE           VALUE  TRUE    ___        _____  ____           _____  ____
  1985.               {FALSE}            {FALSE}               _____             _____               FALSE             FALSE               _____             _____
  1986.               { 0    }            { 0   }                0                  0
  1987.               { 1    }            { 1   }                1                  1
  1988.  
  1989.          This  statement  will  declare a  BIT  variable.    Bits  are
  1990.     allocated   starting   with  the  high-order  bit  of    a   byte.
  1991.     Declarations  need not be done in the same statement in order  to
  1992.     be  allocated  in the same byte.   Any BIT variable which is  not                           BIT
  1993.     given a value is compiled as though a zero (FALSE) value had been
  1994.     assigned.
  1995.  
  1996.     EXAMPLES    ________
  1997.  
  1998.          :
  1999.          :
  2000.     byte bit.mapped.byte value ^h05;
  2001.           redefine bit.mapped.byte;
  2002.     bit  bit.7     value true,
  2003.          bit.6     value false,
  2004.          bit.5     value true,
  2005.          bit.4;
  2006.     bit  bit.3, bit.2, bit.1, bit.0;
  2007.     { this will initialise bit.mapped.byte to ^ha5 }
  2008.           endredef;
  2009.          :
  2010.          :
  2011.     move true to bit.1; {bit.mapped.byte now contains ^ha7}
  2012.     if bit.3 then
  2013.          display "bit.3 is true"
  2014.     else
  2015.          display "bit.3 is false"
  2016.          fi;
  2017.          :
  2018.          :
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:31
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.     BYTE variable declaration    BYTE variable declaration
  2048.  
  2049.  
  2050.     BYTE [id-1] [ VALUE cnst-1 ] [,[id-2] [VALUE cnst-2] ]...    ____          _____          _        _____    BYTE          VALUE               VALUE    ____          _____               _____
  2051.  
  2052.          This  statement declares an 8-bit binary  numeric    variable.
  2053.     Any BYTE's not given a VALUE will be initiallized to zero.        BYTE           VALUE
  2054.  
  2055.  
  2056.  
  2057.  
  2058.  
  2059.  
  2060.  
  2061.  
  2062.  
  2063.  
  2064.  
  2065.  
  2066.  
  2067.  
  2068.  
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074.  
  2075.  
  2076.  
  2077.  
  2078.  
  2079.  
  2080.  
  2081.  
  2082.  
  2083.  
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:32
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.     CALL statement    CALL statement
  2114.  
  2115.  
  2116.     CALL {label}    ____  _____    CALL    ____
  2117.          {cnst }          ____
  2118.          {id   }          __
  2119.  
  2120.          This  statement  compiles a machine-code  CALL  instruction.
  2121.     For maximum flexibility, the address referenced may be not only a
  2122.     label,    but a numeric constant,  or a variable identifier.   This
  2123.     allows    CALLing routines stored in ROM (with the constant option)        CALL
  2124.     or user implementation of machine-code routines in data-areas.
  2125.          Program  execution will transfer to the  address  specified,
  2126.     and   when   an  EXIT  statement,   or    a  machine-level   RETurn             EXIT
  2127.     instruction, is encountered, program execution will resume at the
  2128.     statement following the CALL statement.   Note that if a label is                CALL
  2129.     used,    and  that  label  is  a  procedure,   that  the  compiler
  2130.     automatically inserts an EXIT statement following the  procedure,                 EXIT
  2131.     so 'falling-out' of a procedure is all that is required to return
  2132.     from a procedure.
  2133.          If  the  label is the name of  a  SEGMENTED  procedure,  the                           SEGMENTED
  2134.     compiler will call a built-in routine to handle the overaly.   If
  2135.     the CALLed procedure is already in memory, it is simply branched-
  2136.     to.  If it is not in memory, it is first loaded from disk.
  2137.          If  a label is used,  it need not be declared prior to  this
  2138.     statement.  (forward-reference is allowed on the CALL statement).                             CALL
  2139.     The  exception to this is SEGMENTED procedures.   They may NOT be                  SEGMENTED
  2140.     forward referenced.
  2141.  
  2142.     EXAMPLES    ________
  2143.          :
  2144.          :
  2145.     procedure kettle.black:
  2146.     begin
  2147.           :
  2148.           :
  2149.          end;
  2150.          :
  2151.          :
  2152.     pot: call kettle.black;
  2153.          call another.way;
  2154.          :
  2155.          :
  2156.          goto end; {to prevent 'falling-into' routine below}
  2157.          :
  2158.          :
  2159.     another.way:
  2160.          :
  2161.          :
  2162.          exit;     {required, since this is not declared}
  2163.                { as a procedure             }
  2164.          :
  2165.          :
  2166.     end;
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:33
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.     CLOSE statement    CLOSE statement
  2180.  
  2181.  
  2182.     CLOSE file-id [REMOVE] [ERROR statement]    _____           ______    _____    CLOSE           REMOVE    ERROR    _____           ______    _____
  2183.  
  2184.          This  statement  invokes the CP/M function 16  (close-file).
  2185.     If the REMOVE option is used, CP/M function 19 (delete-file) will           REMOVE
  2186.     also be invoked.
  2187.          If the file is not a disk-file, the REMOVE and ERROR options                         REMOVE     ERROR
  2188.     are invalid, and this statement will do nothing.
  2189.          If the file is a DISK TEXT OUTPUT file,  this statement will                  DISK TEXT OUTPUT
  2190.     generate code which will insert end-of-file characters (hex  code
  2191.     ^h1a) onto the end of the text prior to CLOSEing the file.                        CLOSE
  2192.          The FILE STATUS of file-id will be set to the value returned         FILE STATUS
  2193.     by CP/M.
  2194.          If the ERROR clause is present, and the CP/M status returned            ERROR
  2195.     is ^hff,  the ERRORstatement will be executed, otherwise, program              ERROR
  2196.     execution  continues with the next statement following the  CLOSE                                    CLOSE
  2197.     statement.
  2198.  
  2199.     for examples, see the FILE statement    ___ _________ ___ ___ ____ _________                  FILE                  ____
  2200.  
  2201.  
  2202.  
  2203.  
  2204.  
  2205.  
  2206.  
  2207.  
  2208.  
  2209.  
  2210.  
  2211.  
  2212.  
  2213.  
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219.  
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:34
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.     CONVERT statement    CONVERT statement
  2246.  
  2247.  
  2248.     CONVERT str TO {UPPER} CASE    _______     _____    CONVERT     TO    UPPER  CASE    _______     _____
  2249.                {LOWER}            _____            LOWER            _____
  2250.  
  2251.          This  form  of the CONVERT statement translates  the  string                CONVERT
  2252.     given into upper-case or lower-case.   Only alphabetic characters
  2253.     are  affected;    numerics  and  symbols are not    changed  by  this
  2254.     statement.
  2255.  
  2256.     CONVERT bcd TO bin    _______    CONVERT     TO    _______
  2257.  
  2258.          This form of the CONVERT statement converts from BCD  format                  CONVERT                  BCD
  2259.     to  binary format.   If the bin variable is 8-bit (BYTE or  BYTE-                               BYTE     BYTE-
  2260.     POINTER) a truncation warning is produced.    POINTER
  2261.  
  2262.     CONVERT bin TO bcd    _______    CONVERT     TO    _______
  2263.  
  2264.          This form converts binary into BCD format.                        BCD
  2265.  
  2266.     CONVERT bcd TO str    _______    CONVERT     TO    _______
  2267.  
  2268.          This form converts BCD format into STRING format                BCD        STRING
  2269.  
  2270.     CONVERT str TO bcd [ERROR statement]    _______         _____    CONVERT     TO        ERROR    _______         _____
  2271.  
  2272.          This  form converts a STRING to BCD format.   See binary-to-                   STRING    BCD
  2273.     string conversion below for a description of the ERROR clause.                             ERROR
  2274.  
  2275.                {   OCTAL   }               _____               OCTAL               _____
  2276.     CONVERT bin TO {HEXADECIMAL} str    _______     ___________    CONVERT     TO    HEXADECIMAL    _______     ___________
  2277.                {  DECIMAL  }              DECIMAL
  2278.  
  2279.          This  form  of the CONVERT statement  converts  from  binary                CONVERT
  2280.     format to string format.   The radix (base) of the conversion may
  2281.     be  specified,    with  DECIMAL being  the  default.   HEXADECIMAL,                  DECIMAL                 HEXADECIMAL
  2282.     DECIMAL,   and    OCTAL  may  be    abbreviated  HEX,  DEC,  and  OCT    DECIMAL     OCTAL                 HEX   DEC          OCT
  2283.     respectively.    Both  OCTAL and HEX conversions are done with  NO                  OCTAL    HEX
  2284.     leading-zero suppression;  OCTAL gives 6 digits,  and HEX gives 4                   OCTAL              HEX
  2285.     digits.   DECIMAL  conversion  IS zero-suppressed,  and only  the          DECIMAL
  2286.     number    of significant digits present in the number are  produced
  2287.     (always at least 1 digit)
  2288.  
  2289.         {   OCTAL   }            _____            OCTAL            _____
  2290.     CONVERT {HEXADECIMAL} str TO bin [ERROR statement]    _______  ___________          _____    CONVERT  HEXADECIMAL      TO      ERROR    _______  ___________          _____
  2291.         {  DECIMAL  }           DECIMAL
  2292.  
  2293.          This  form  of the CONVERT statement  converts  from  string                CONVERT
  2294.     format    to  binary format.   As above,    OCT,  HEX,  and  DEC  are                        OCT   HEX     DEC
  2295.     acceptable abbreviations.   This statement will ignore 'overflow'
  2296.     conditions.   The  result  is computed to the modulus of the  bin
  2297.     variable.   The  ERROR    statement is provided to  detect  invalid             ERROR
  2298.     characters  in the string being formatted.   The conversion  will
  2299.     terminate on the first character in the string which is not valid
  2300.     for the specified radix.   If this character is not null (if  the
  2301.     entire    string    was  not  used    in  the  conversion),  The  ERROR                                    ERROR
  2302.     statement will be executed if specified; if no ERROR statement is                               ERROR
  2303.  
  2304.  
  2305.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:35
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.     CONVERT statement    CONVERT statement
  2312.  
  2313.  
  2314.     present,  execution  continues    with the statement following  the
  2315.     CONVERT  statement.   If  the first character in  the  string  is    CONVERT
  2316.     invalid for the specified radix, a value of zero is stored in the
  2317.     bin varible.  If the bin variable is 8-bit (BYTE or BYTE-POINTER,                            BYTE    BYTE-POINTER
  2318.     a truncation warning is produced).
  2319.  
  2320.  
  2321.     EXAMPLES    ________
  2322.  
  2323.          :
  2324.          :
  2325.     byte wk.byte value 10;
  2326.     word wk.word value 1000;
  2327.     string wk.str value "1234 This is a test 5678";
  2328.     bcd wk.bcd value -21;
  2329.          :
  2330.          :
  2331.     convert wk.str to upper case;
  2332.          {wk.str now contains '1234 THIS IS A TEST 5678'}
  2333.     convert wk.str to lower case;
  2334.          {wk.str now contains '1234 this is a test 5678'}
  2335.     convert wk.str to wk.word;
  2336.          {wk.word now contains 1234 in binary}
  2337.     convert wk.str to wk.word error display "this will show up";
  2338.          {the ERROR clause will be executed}          ERROR
  2339.          {wk.word still will get the value 1234}
  2340.     convert wk.byte to octal wk.str;
  2341.          {wk.str = '000012'}
  2342.     convert wk.bcd to wk.str;
  2343.          {wk.str = '-21'}
  2344.     convert wk.str to wk.word;
  2345.          {wk.word gets zero since the minus is not allowed}
  2346.          { for binary (all binary values are unsigned)    }
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:36
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.     COPY statement    COPY statement
  2378.  
  2379.  
  2380.     COPY file-specifier ;    ____            _    COPY            ;    ____            _
  2381.  
  2382.          This  statement copies text from a disk file into the source
  2383.     program at the point the COPY statement is encountered.  The text                 COPY
  2384.     copied    in is treated exactly as though it were being  read  from
  2385.     the  source file.
  2386.          The  distributed version of the compiler allows COPYs to  be
  2387.     nested once.   You can COPY file-1,  file-1 may then COPY file-2,
  2388.     but file-2 cannot COPY another file.  Special versions of PARASOL
  2389.     are available which extend this level, if needed.
  2390.          The semicolon following the COPY statement is required,  and                     COPY
  2391.     the COPY should be the only statement on the source line.        COPY
  2392.          The file-specifier is a CP/M file name enclosed in quotes or
  2393.     apostophes.   A drive-specifier may be present,  if desired.   If
  2394.     the PARASOL compiler cannot locate the file to be COPYed,  on the                              COPY
  2395.     specified  drive  (default  drive if  none  specified),  it  will
  2396.     suspend  compilation and ask for another filename for the library.
  2397.          If a compile-listing is being generated,  the COPY statement                               COPY
  2398.     will  be listed,  followed by the text in the disk file which was
  2399.     copied.   If  line-numbers  are  being printed    on  the  compile-
  2400.     listing, the numbering of source lines will be interrupted during
  2401.     the  listing  of the COPYed text,  and that text will  have  line                 COPY
  2402.     numbers of the form 'A9999' starting with 'A0001'.  The numbering
  2403.     of source lines will resume following the COPY    operation.   This                          COPY
  2404.     allows the maximum amount of correlation between the line-numbers
  2405.     printed  on  the compile-listing,  and the line-numbers  used  by
  2406.     'ED', the CP/M text editor utility.
  2407.          When COPYs ar nested, the nested COPY will have line numbers
  2408.     of the form "B9999" (starting with "B0001").
  2409.  
  2410.     EXAMPLES    ________
  2411.          Suppose  you had a disk file "CONIN.LIB" which contained the
  2412.     following text:
  2413.  
  2414.     record terminal.info;
  2415.          byte terminal.number,
  2416.           terrminal.count,
  2417.           terminal.type;
  2418.          string con.in.string 81;
  2419.          endrec;
  2420.     (^Z) (end-of-file character)
  2421.  
  2422.          Then you could write a source program of the form:
  2423.  
  2424.          :
  2425.          :
  2426.     copy "CONIN.LIB";
  2427.          :
  2428.          :
  2429.     accept con.in.string;
  2430.     display con.in.string;
  2431.     add 1 to terminal.count;
  2432.          :
  2433.          :
  2434.  
  2435.  
  2436.  
  2437.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:37
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.     interrupt-control statements    interrupt-control statements
  2444.  
  2445.  
  2446.     {DISABLE} INTERRUPTS     _______     DISABLE  INTERRUPTS     _______
  2447.     {ENABLE }     ______     ENABLE     ______
  2448.  
  2449.          This   generates  the  assembler  instructions  DI  and   EI
  2450.     respectively.
  2451.  
  2452.  
  2453.  
  2454.  
  2455.  
  2456.  
  2457.  
  2458.  
  2459.  
  2460.  
  2461.  
  2462.  
  2463.  
  2464.  
  2465.  
  2466.  
  2467.  
  2468.  
  2469.  
  2470.  
  2471.  
  2472.  
  2473.  
  2474.  
  2475.  
  2476.  
  2477.  
  2478.  
  2479.  
  2480.  
  2481.  
  2482.  
  2483.  
  2484.  
  2485.  
  2486.  
  2487.  
  2488.  
  2489.  
  2490.  
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:38
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.     DISPLAY statement    DISPLAY statement
  2510.  
  2511.  
  2512.     DISPLAY {lit} [, {lit} ]...[,;]    _______        _        __    DISPLAY        ,        ,;    _______        _        __
  2513.         {str}     {str}
  2514.  
  2515.          This statement displays string-literals and string-variables
  2516.     onto the console device.  All items appearing in a single DISPLAY                                  DISPLAY
  2517.     statement  will  be  displayed    contiguously  with  a    carriage-
  2518.     return/linefeed  following  the last item.   If it is desired  to
  2519.     suppress the final cr/lf, the DISPLAY statement should end with a                      DISPLAY
  2520.     comma.     If an ending comma is used,  the semicolon to    terminate
  2521.     the  statement    is required so that the compiler will be able  to
  2522.     determine where the statement ends.
  2523.          Note that 'display;' causes no action.   To cause display of
  2524.     nothing but a cr/lf, use 'display "";'.
  2525.  
  2526.     EXAMPLES    ________
  2527.  
  2528.          :
  2529.          :
  2530.     string wk.str 10;
  2531.     byte test.count;
  2532.          :
  2533.          :
  2534.     display "There are ",;     {note comma to suppress cr/lf}
  2535.     if test.count = 0 then
  2536.          display "no",;
  2537.     else
  2538.          convert test.count to dec wk.str;
  2539.          display wk.str,;
  2540.          fi;
  2541.     display " entries present";
  2542.          {if test.count = 0 this will display:           }
  2543.          {            There are no entries present       }
  2544.          {if test.count = 5 this will display:           }
  2545.          {            There are 5 entries present        }
  2546.  
  2547.  
  2548.  
  2549.  
  2550.  
  2551.  
  2552.  
  2553.  
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:39
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575.     DIVIDE statement    DIVIDE statement
  2576.  
  2577.  
  2578.     DIVIDE {cnst-1} BY {cnst-2}    ______    DIVIDE        BY    ______
  2579.            {num-1 }    {num-2 }
  2580.                       [ GIVING num-3]                    ______                    GIVING                    ______
  2581.                       [ REMAINDER num-4]                    _________                    REMAINDER                    _________
  2582.  
  2583.          This  statement divides the value of (cnst-1/num-1)  by  the
  2584.     value  of  (cnst-2/num-2).   If cnst-1 is specified,  the  GIVING                                   GIVING
  2585.     option must be used.   If no GIVING option is used, the result is                     GIVING
  2586.     stored in num-1.  If the GIVING option is used, the result of the                 GIVING
  2587.     divide is stored in num-3.
  2588.          If  the  REMAINDER clause is used,  the remainder    from  the              REMAINDER
  2589.     divide operation is stored in num-4.
  2590.          If  cnst-1  and  cnst-2  are  both  specified,   the  divide
  2591.     operation  is  done  at  compile-time,     and  this  statement  is
  2592.     optimised to a MOVE statement.               MOVE
  2593.          Pointer-variables,  not preceded by '@', are treated as WORD                                     WORD
  2594.     variables by this statement.
  2595.          If  the receiving-variable is 8-bit,  a  truncation  warning
  2596.     will  be  shown  on  the  compile  listing.   All  binary  divide
  2597.     operations  are done as 16-bit operations,  even if all variables
  2598.     involved are 8-bit.
  2599.          BCD  and  binary values cannot be mixed in  this  statement.         BCD
  2600.     All values must be binary, or all values must be BCD.                             BCD
  2601.  
  2602.  
  2603.  
  2604.  
  2605.  
  2606.  
  2607.  
  2608.  
  2609.  
  2610.  
  2611.  
  2612.  
  2613.  
  2614.  
  2615.  
  2616.  
  2617.  
  2618.  
  2619.  
  2620.  
  2621.  
  2622.  
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:40
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.     DO and WHILE statements - looping constructs    DO and WHILE statements - looping constructs
  2642.  
  2643.  
  2644.     [WHILE cond-1] [DO]     _____        __     WHILE        DO     _____        __
  2645.           statement-list
  2646.           [OD] [UNTIL cond-2]           __    _____           OD    UNTIL           __    _____
  2647.  
  2648.          This   statement    executes   statement-list   repetitively,
  2649.     optionally   depending     on  conditional   termination     of   the
  2650.     repetition.
  2651.          The WHILE clause causes cond-1 to be evaluated prior to each         WHILE
  2652.     execution of statement-list.   If cond-1 is true,  statement-list
  2653.     is executed.   If cond-1 is false,  execution continues following
  2654.     the OD or UNTIL clause.        OD      UNTIL
  2655.          The  UNTIL  clause causes cond-2 to be evaluated after  each          UNTIL
  2656.     execution  of  statement-list.     If  cond-2  is  true,    execution
  2657.     continues with the statement following the OD or UNTIL clause, if                           OD     UNTIL
  2658.     cond-2    is  false,  execution  continues with  the  WHILE  or  DO                                WHILE      DO
  2659.     statement.
  2660.          The  DO is required if the WHILE clause is omitted.   The OD          DO            WHILE                   OD
  2661.     is required if UNTIL clause is omitted.               UNTIL
  2662.          If both the WHILE and UNTIL clauses are  present,    execution             WHILE       UNTIL
  2663.     of  statement-list terminates whenever cond-1 becomes  false,  OR                                       __
  2664.     cond-2 becomes true.   If neither the WHILE nor the UNTIL clauses                          WHILE        UNTIL
  2665.     are  present,  execution of statement-list continues indefinitely
  2666.     (infinite  loop),  unless there is a provision within  statement-
  2667.     list to terminate the loop. (EXITDO)
  2668.          The  EXITDO  statement  may appear  as  a    statement  within          EXITDO
  2669.     statement-list.   If  an  EXITDO is executed,  program    execution                  EXITDO
  2670.     immediately resumes following the OD or UNTIL clause.                      OD    UNTIL
  2671.  
  2672.     EXAMPLES    ________
  2673.  
  2674.          :
  2675.          :
  2676.     procedure compute.power:
  2677.     begin
  2678.          move 1 to result;
  2679.          while exponent > 0 do
  2680.           multiply result by number;
  2681.           subtract 1 from exponent;
  2682.           od;
  2683.          end;
  2684.          :
  2685.          :
  2686.     do
  2687.          accept "Enter your guess ('0' to quit);",con.in.rec;
  2688.          if con.in.string = '0' then
  2689.           exitdo;
  2690.           fi;
  2691.          if con.in.string = my.guess then
  2692.           display "You are correct";
  2693.          else
  2694.           display "Wrong - try again";
  2695.           fi;
  2696.          od;
  2697.  
  2698.  
  2699.  
  2700.  
  2701.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:41
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707.     EDIT statement    EDIT statement
  2708.  
  2709.  
  2710.     EDIT {lit-1} WITH {lit-2} [GIVING str-3]    ____               ______    EDIT         WITH       GIVING    ____               ______
  2711.          {str-1}      {str-2}
  2712.  
  2713.          This statement is designed to format data for display on  an
  2714.     output device, usually a terminal or printer, although this is by
  2715.     no means the only use for this statement.
  2716.          (Str-2/lit-2)  specifies a 'picture' to use for the  editing
  2717.     operation.  The movement of characters,  insertion of characters,
  2718.     etc.  is  controlled  by  the characters present in  the  picture
  2719.     string.
  2720.          If  the GIVING clause is present,    the result is  stored  in             GIVING
  2721.     str-3.     If  the  GIVING  clause is not present,  str-1  must  be              GIVING
  2722.     specified,  and  str-1    will receive the edited data as  well  as
  2723.     supply    the  raw data to be edited.
  2724.          The   length  of  the  receiving  string  (field-width)   is
  2725.     determined   entirely  by  the    picture  string,    there  is  NO
  2726.     protection  against  this exceeding the declared  length  of  the
  2727.     destination string.
  2728.          The  picture string is composed of the following characters.
  2729.     These  characters have the effects described to the right of  the
  2730.     character:
  2731.  
  2732.     L      Left-justify the receiving string.    L
  2733.           If L is specified, it must be the first             L
  2734.           character in the picture-string.
  2735.           Left-justification is default if the picture-
  2736.           string starts with 'X' or ' '.
  2737.  
  2738.     R      Right-justify the destination-string.    R
  2739.           If present, this must be the first character
  2740.           in the picture-string.
  2741.           Right-justification is the default if the picture
  2742.           does not begin with either 'L', 'X', or ' '.
  2743.  
  2744.     X      This will cause one character to be moved from    X
  2745.           The source-string to the destination-string.    The
  2746.           cahracter is moved exactly 'as-is'.
  2747.  
  2748.     9      This will cause one numeric digit to be moved from    9
  2749.           the source-string to the destination-string.    The
  2750.           results of moving non-numeric characters with '9'
  2751.           are undefined, although it will generally behave
  2752.           as ax "X".
  2753.  
  2754.     (space)   This will cause a blank character to be inserted
  2755.           into the destination-string.    No characters are
  2756.           skipped-over in the source-string as a result of
  2757.           this.
  2758.  
  2759.     Z      This is a zero-suppressed numeric-character    Z
  2760.           move.  If any non-zero, non-blank characters have
  2761.           been moved during the execution of this statement,
  2762.           this will be treated as a '9' picture-character.
  2763.           If there have been no non-zero, non-blank characters
  2764.           moved, and the current character to be moved is
  2765.  
  2766.  
  2767.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:42
  2768.  
  2769.  
  2770.  
  2771.  
  2772.  
  2773.     EDIT statement    EDIT statement
  2774.  
  2775.  
  2776.           zero or blank, move a blank to the destination-
  2777.           string, otherwise move the current character to the
  2778.           destination-string.
  2779.  
  2780.     $      If the NEXT character to be moved (not the    $
  2781.           current character) is the first non-blank,non-zero
  2782.           character to be moved to the destination-string,
  2783.           move a '$' to the destination-string instead of
  2784.           the current character.  If any non-zero,non-blank
  2785.           characters have already been moved, or if the
  2786.           current character is non-zero,non-blank, move the
  2787.           current character to the destination-string.
  2788.           If no non-zero,non-blank characters have been
  2789.           moved, and both the current and next characters
  2790.           are blank or zero, move a space to the destina-
  2791.           tion-string.
  2792.  
  2793.     .      (period) Insert a period (decimal-point) into    .
  2794.           the destination-string, without skipping over
  2795.           any characters in the source-string.
  2796.  
  2797.     ,      (comma) If any non-blank,non-zero characters    ,
  2798.           have been moved, insert a comma, otherwise insert
  2799.           a space into the destination-string.
  2800.  
  2801.     +      (plus sign) If this is the last character in the    +
  2802.           picture-string,  insert a '+' or '-' into the
  2803.           destination-string. Whether a '+' or '-' is
  2804.           inserted depends on whether a '-' was encountered
  2805.           in the source-string while moving previous
  2806.           characters.
  2807.                If this is not the last character in the
  2808.           picture-string, it is treated the same as the '$',
  2809.           except that the character inserted will be '+' or
  2810.           '-' instead of '$'.
  2811.  
  2812.     -      (minus sign) This is handled the same as the plus    -
  2813.           sign, except that only '-' will be inserted if a
  2814.           '-' was encountered in the source string.  Other-
  2815.           wise, a space will be inserted.
  2816.  
  2817.     Ix      (x represents any character)    Insert the character    I
  2818.           x into the destination-string without skipping          x
  2819.           over any characters in the source-string.
  2820.  
  2821.          Anything  else encountered in the picture-string is  treated
  2822.     as an 'X'.
  2823.          The '$',  '+',  and '-' are mutually exclusive unless one is
  2824.     leading(floating), and another is trailing (example: "$$$,$$9.99-
  2825.     " is valid).
  2826.          If  a leading (floating) sign is used,  it must appear in    a
  2827.     position  in the picture-string corresponding to the position  in
  2828.     the source-string where a '-' may be encountered.   For  example:
  2829.     editing  '-1' with '---,-99' will result in '      01',    since the
  2830.     minus sign in the source-string appeared where there was a '9' in
  2831.  
  2832.  
  2833.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:43
  2834.  
  2835.  
  2836.  
  2837.  
  2838.  
  2839.     EDIT statement    EDIT statement
  2840.  
  2841.  
  2842.     the picture-string.
  2843.     EXAMPLES    ________
  2844.  
  2845.          :
  2846.          :
  2847.     string todays.date 7 value '123180';
  2848.     string picture.z.9 20 value 'ZZZ,ZZ9.99';
  2849.     string total.amt   15 value '654321';
  2850.     string wk.str 81;
  2851.          :
  2852.          :
  2853.     edit total.amt with picture.z.9 giving wk.str;
  2854.          {wk.str now contains '  6,543.21'}
  2855.     edit todays.date with "99I/99I/99" giving wk.str;
  2856.          {wk.str now contains '12/31/80'}
  2857.          :
  2858.          :
  2859.  
  2860.  
  2861.  
  2862.  
  2863.  
  2864.  
  2865.  
  2866.  
  2867.  
  2868.  
  2869.  
  2870.  
  2871.  
  2872.  
  2873.  
  2874.  
  2875.  
  2876.  
  2877.  
  2878.  
  2879.  
  2880.  
  2881.  
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887.  
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:44
  2900.  
  2901.  
  2902.  
  2903.  
  2904.  
  2905.     EXECUTE statement    EXECUTE statement
  2906.  
  2907.  
  2908.     EXECUTE {str-1} [USING {str-2}] [ERROR stmt]    _______      _____         _____    EXECUTE      USING         ERROR    _______      _____         _____
  2909.         {lit-1}        {lit-2}
  2910.  
  2911.          This statement causes another specified program to be loaded
  2912.     into  memory and executed.   There is no built-in  provision  for
  2913.     maintaining  variable values,  etc.  between  programs,  although
  2914.     these  may be implemented easily using EXTERNAL  variables.   The                           EXTERNAL
  2915.     EXECUTE statement does not affent the CP/M default-DMA buffer  at    EXECUTE
  2916.     address ^h80,  unless the USING clause is used.   This buffer may                  USING
  2917.     be used to pass values between programs if desired.
  2918.          The program is assumed to be in standard CP/M object format.
  2919.          (Str-1/lit-1)  is    the  name  of the  program  specified  in
  2920.     standard file-name format.
  2921.          (Str-2/lit-2)  is the command-line to pass to  the  program.
  2922.     If  the USING caluse is not used,  the command-line passed to the        USING
  2923.     program is undefined.  Note that the USING clause passes ONLY the                         USING
  2924.     command-line.    It  does not set the CP/M default-fcb at  address
  2925.     ^h5c  as  CP/M    does,  so any programs which  use  this  (PARASOL
  2926.     programs using FILE1 and/or FILE2) will need modification.
  2927.          The ERROR clause provides program recovery if the    specified         ERROR
  2928.     program  cannot be located.   If the ERROR clause is omitted  and                         ERROR
  2929.     the  program  cannot be found,    a run-time error  ("FILE  EXECUTE
  2930.     ERROR") will be displayed on the console,  and program    execution
  2931.     will  terminate.   If  the ERROR statement is included,  and  the                   ERROR
  2932.     program  cannot be found,  the ERROR statement is  executed,  and                       ERROR
  2933.     program execution resumes following the EXECUTE statement.                        EXECUTE
  2934.  
  2935.     EXAMPLES    ________
  2936.  
  2937.          :
  2938.          :
  2939.     string next.prog.id 13;
  2940.          :
  2941.          :
  2942.     execute next.prog.id
  2943.           error display next.prog.id," is missing";
  2944.          :
  2945.          :
  2946.     execute "PIP.COM" using "B:=A:*.SAV"
  2947.           error display "reload PIP and run backup again";
  2948.          :
  2949.          :
  2950.  
  2951.  
  2952.  
  2953.  
  2954.  
  2955.  
  2956.  
  2957.  
  2958.  
  2959.  
  2960.  
  2961.  
  2962.  
  2963.  
  2964.  
  2965.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:45
  2966.  
  2967.  
  2968.  
  2969.  
  2970.  
  2971.     EXIT statements    EXIT statements
  2972.  
  2973.  
  2974.     EXIT    ____    EXIT    ____
  2975.     EXITBEGIN    _________    EXITBEGIN    _________
  2976.     EXITDO    ______    EXITDO    ______
  2977.     EXITSWITCH    __________    EXITSWITCH    __________
  2978.  
  2979.          Each  of these statements causes control to pass out of  the
  2980.     associated  program-structure.     The EXIT statement is    different                         EXIT
  2981.     from  the  other  statements in that its  point  of  transfer  is
  2982.     determined  at    run-time,  while the other EXIT-  statements  are                           EXIT-
  2983.     fully determined at compile time.
  2984.          The  EXIT statement generates a machine RETurn  instruction,          EXIT
  2985.     and  will exit to the statement following the last CALL statement                               CALL
  2986.     executed.   If the machine stack has been manipulated,    or wiped-
  2987.     out accidentally, the results of executing the EXIT statement are                               EXIT
  2988.     undefined.  The compiler inserts an EXIT statement following each                        EXIT
  2989.     PROCEDURE,  and the normal exit from a procedure is to 'fall out'    PROCEDURE
  2990.     of  the  procedure.   The EXIT statement  provides  an    alternate                  EXIT
  2991.     method of leaving a procedure.
  2992.          The  other  EXIT-    statements are valid  ONLY  within  their             EXIT-
  2993.     associated   structure,   and  will  cause  a  syntax  error   if
  2994.     encountered in a program outside of that structure.   Each causes
  2995.     an  immediate  branch to the statement following  the  structure-
  2996.     ending statement (END, ENDCASE, OD, FI, and ENDSWITCH).              END  ENDCASE    OD  FI        ENDSWITCH
  2997.  
  2998.     for examples,  see the CALL,  BEGIN,  CASE,  DO,  IF,  and SWITCH                   CALL   BEGIN   CASE   DO   IF       SWITCH
  2999.     statements.
  3000.  
  3001.  
  3002.  
  3003.  
  3004.  
  3005.  
  3006.  
  3007.  
  3008.  
  3009.  
  3010.  
  3011.  
  3012.  
  3013.  
  3014.  
  3015.  
  3016.  
  3017.  
  3018.  
  3019.  
  3020.  
  3021.  
  3022.  
  3023.  
  3024.  
  3025.  
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:46
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037.     EXTERNAL variable declaration    EXTERNAL variable declaration
  3038.  
  3039.  
  3040.     EXTERNAL type name ADDRESS cnst-1 [LENGTH cnst-2]    ________       _______       ______    EXTERNAL       ADDRESS       LENGTH    ________       _______       ______
  3041.  
  3042.          'type' may be any of the following:
  3043.           BCD          BCD
  3044.           BCD POINTER          BCD POINTER
  3045.           BYTE          BYTE
  3046.           BYTE POINTER          BYTE POINTER
  3047.           FIELD      *          FIELD
  3048.           LABEL          LABEL
  3049.           RECORD     *          RECORD
  3050.           STRING     *          STRING
  3051.           STRING POINTER          STRING POINTER
  3052.           WORD          WORD
  3053.           WORD POINTER          WORD POINTER
  3054.                       *The LENGTH option is valid                       LENGTH
  3055.                        only for the types marked
  3056.                        with an asterisk.
  3057.          This  statement declares an identifier which is outside  the
  3058.     bounds of the program.    This may be used to access any operating-
  3059.     system function (by using the MCALL statement),  or to allocate a                      MCALL
  3060.     section  of memory to use as a 'common' area to pass data between
  3061.     programs.
  3062.          The  identifier defined in this statement may be  referenced
  3063.     in all respects as a normal identifier of the type declared.
  3064.  
  3065.     EXAMPLES    ________
  3066.  
  3067.          :
  3068.          :
  3069.     external byte i.o.byte          address 3; {--CP/M I/O-byte--}
  3070.     external label boot          address 0; {--warm-start entry--}
  3071.     external label entry          address 5; {--CP/M BDOS entry--}
  3072.     external word  himem.limit    address 6;
  3073.     external record default.dma   address ^h80 length ^h80;
  3074.     external record default.fcb   address ^h5c length 35;
  3075.          :
  3076.          :
  3077.     mcall entry using 13;     {--CP/M reset-disk system call--}
  3078.     mcall entry using 11 giving ,,,con.stat;
  3079.                {--get console status--}
  3080.          :
  3081.          :
  3082.  
  3083.          Note the definition of "himem.limit" above.  This references
  3084.     the  base address of the CP/M BDOS,  which is also the limit  for
  3085.     programmable memory when running under CP/M.  This is useful when
  3086.     using  data  stored in HIMEM to determine whether  any    available                   HIMEM
  3087.     memory exists.
  3088.  
  3089.  
  3090.  
  3091.  
  3092.  
  3093.  
  3094.  
  3095.  
  3096.  
  3097.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:47
  3098.  
  3099.  
  3100.  
  3101.  
  3102.  
  3103.     FIELD data declaration    FIELD data declaration
  3104.  
  3105.  
  3106.     FIELD id-1 size [,id-2 size]...    _____    FIELD    _____
  3107.  
  3108.          This  statement declares a data storage area of type  FIELD.                                   FIELD
  3109.     A  field  is  similar  to a  STRING  in  many  respects,  but  is                     STRING
  3110.     incompatible  with it for most statements.   A FIELD has no null-                               FIELD
  3111.     byte  terminator,  therefore  its  length  is  static  and  fully
  3112.     determined  at compile-time,  as opposed to a STRING which has    a                              STRING
  3113.     null byte terminator which determines its dynamic length.
  3114.          FIELDs are designed for use in print-line    formatting,  disk         FIELD
  3115.     record    I/O,  and  user coded 'substring'  functions,  situations
  3116.     where the null-byte string-terminator would not be desired.
  3117.  
  3118.     See the MOVE statement for usage of FIELDs.    ___ ___ ____ _________ ___ _____ __ ______        MOVE                FIELD        ____                _____
  3119.  
  3120.  
  3121.  
  3122.  
  3123.  
  3124.  
  3125.  
  3126.  
  3127.  
  3128.  
  3129.  
  3130.  
  3131.  
  3132.  
  3133.  
  3134.  
  3135.  
  3136.  
  3137.  
  3138.  
  3139.  
  3140.  
  3141.  
  3142.  
  3143.  
  3144.  
  3145.  
  3146.  
  3147.  
  3148.  
  3149.  
  3150.  
  3151.  
  3152.  
  3153.  
  3154.  
  3155.  
  3156.  
  3157.  
  3158.  
  3159.  
  3160.  
  3161.  
  3162.  
  3163.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:48
  3164.  
  3165.  
  3166.  
  3167.  
  3168.  
  3169.     FILE declaration    FILE declaration
  3170.  
  3171.  
  3172.     FILE id-1    ____    FILE    ____
  3173.          [, BLOCKED {cnst-1}]        _______        BLOCKED        _______
  3174.          [, BUFFER {str-1  }]        ______        BUFFER        ______
  3175.                {rec-1  }
  3176.                {field-1}
  3177.          [, CON]        ___        CON        ___
  3178.          [, DISK]        ____        DISK        ____
  3179.          [, FILE1]        _____        FILE1        _____
  3180.          [, FILE2]        _____        FILE2        _____
  3181.          [, KEY id-2]        ___        KEY        ___
  3182.          [, LST]        ___        LST        ___
  3183.          [, NO BUFFER]        __ ______        NO BUFFER        __ ______
  3184.          [, PRN]        ___        PRN        ___
  3185.          [, PUN]        ___        PUN        ___
  3186.          [, RANDOM]        ______        RANDOM        ______
  3187.          [, RDR]        ___        RDR        ___
  3188.          [, RECORD {str-2  }]        ______        RECORD        ______
  3189.                {rec-2  }
  3190.                {field-2}
  3191.                {byte-2 }
  3192.          [, STATUS id-3]        ______        STATUS        ______
  3193.          [, TEXT]        ____        TEXT        ____
  3194.          [, TTY]        ___        TTY        ___
  3195.          [, VALUE {str-3}]        _____        VALUE        _____
  3196.               {lit-3}
  3197.  
  3198.          This  statement declares a file for the program to  use.    A
  3199.     wide  variety of file-types are supported by PARASOL.    The  file
  3200.     may be character-oriented,  or record-oriented.   In the  current
  3201.     release,  only DISK files may be record-oriented,  however,  DISK               DISK                         DISK
  3202.     files may be character-oriented if desired.
  3203.  
  3204.          The  BLOCKED  clause  is valid  only  for    disk  files.   It          BLOCKED
  3205.     determines  how  the  records  are allocated  on  disk.   A  file
  3206.     containing  a  BLOCKED clause may have a record  of  any  length.               BLOCKED
  3207.     There  are  two  different  options available  with  the  BLOCKED                                  BLOCKED
  3208.     clause:
  3209.           If cnst-1 is non-zero,  (for example,  3),  the records
  3210.          are  grouped  together three at a time,  and each    group  of
  3211.          three  records will begin on a sector boundary,  even if the
  3212.          total  length  of three records is longer than  one  sector.
  3213.          This  method  is  generally  not  preferred,  but    has  been
  3214.          provided    to   allow  compatibility  with   certain   other
  3215.          languages.
  3216.           If cnst-1 is zero,  the records are strung-together one
  3217.          after the other.    This is compatible with the way in  which
  3218.          MICROSOFT BASIC stores records in random files.  This is the
  3219.          preferred    method    both because of MBASIC compatibility  and
  3220.          due to the maximum storage density which it provides.
  3221.  
  3222.          The  BUFFER  clause specifies a buffer area for use in  DISK          BUFFER                         DISK
  3223.     TEXT  files.   The BUFFER clause is ignored for all  other  file-    TEXT           BUFFER
  3224.     types.     If  the size of (str-1/rec-1) is not an even multiple of
  3225.     128 bytes, the size used is the next smaller even multiple of 128
  3226.     bytes.    Having a large buffer reduces disk-head-seeking time when
  3227.  
  3228.  
  3229.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:49
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.     FILE declaration    FILE declaration
  3236.  
  3237.  
  3238.     using multiple DISK TEXT files at the same time.               DISK TEXT
  3239.  
  3240.          The  CON clause specifies that the file is assigned  to  the          CON
  3241.     system console.  A record of type BYTE only is allowed.  The file                      BYTE
  3242.     may be read or written,  and any OPEN or CLOSE statements for the                     OPEN     CLOSE
  3243.     file  will  be ignored.   If a file is always going to go to  the                           ______
  3244.     console,  it  is  generally  simpler to use  ACCEPT  and  DISPLAY                             ACCEPT      DISPLAY
  3245.     statements.   Declaring a file to be assigned to the console  has
  3246.     the  flexibility of allowing the file to be assigned to the disk,
  3247.     or printer,  etc.  by changing only the CON clause to the  device                        CON
  3248.     desired.
  3249.  
  3250.          The  DISK clause specifies the file to be assigned to  disk.          DISK
  3251.     The file may be either record-oriented, or character-oriented.    A
  3252.     character-oriented  file  is declared by specifying TEXT  in  the                                TEXT
  3253.     file statement,  and by having a RECORD of type BYTE.    A record-                     RECORD     BYTE
  3254.     oriented  file is declared by not specifying TEXT.                      ___                             TEXT
  3255.  
  3256.          The  FILE1  and FILE2 clauses specify that a DISK file  will          FILE1      FILE2              DISK
  3257.     use  the CP/M default-fcb at location ^h5c to determine the  name
  3258.     of the file.  FILE1 and FILE2 are valid only with DISK files, and              FILE1    FILE2              DISK
  3259.     ignored  for  other file-types.   Note    that  the  FIND,  REMOVE,                               FIND   REMOVE
  3260.     RENAME,  and  EXECUTE statements may alter the CP/M  default-fcb,    RENAME          EXECUTE
  3261.     therefore,  any  file having the FILE1 or FILE2 clauses should be                     FILE1      FILE2
  3262.     OPENed prior to executing any of these statements.  The name from    OPEN
  3263.     the  CP/M default-fcb is used ONLY on the FIRST OPEN of  a  file.                            OPEN
  3264.     Any  subsequent  OPENs    are treated as though the file    had  been             OPEN
  3265.     declared with the name given by the CP/M default-fcb at the  time
  3266.     the first OPEN was done.   If a 'VALUE string-id' clause is used,          OPEN             VALUE
  3267.     it  will  be superceded by the FILE1 or FILE2 on the  FIRST  OPEN                                  _____                       FILE1    FILE2             OPEN
  3268.     only,  after that, the value of 'string-id' will specify the name
  3269.     of  the  file.     For example,  if the file  declaration  contains
  3270.     "VALUE    'TEST.FIL'",  and the program is executed with    a  FILE-1
  3271.     value of "ABC", the actual name used will be "ABC.FIL".
  3272.  
  3273.          The  KEY clause is valid only on DISK RANDOM files,  and  is          KEY                  DISK RANDOM
  3274.     ignored for all other file-types.  The idenifier specified in the
  3275.     KEY clause should not be declared prior to the file,  this clause           ______ ___    KEY
  3276.     declares  id-2    to  be a WORD variable located within  the  file-                 WORD
  3277.     control-block  (fcb) at the position used by CP/M to specify  the
  3278.     random-record-number.    The  record  number may range from  0  to
  3279.     65535.
  3280.  
  3281.          The LST and PRN clauses are eqiuvalent, and declare the file         LST     PRN
  3282.     to use the system printer (CP/M LST:  device).    The file can only
  3283.     be written-to, not read.
  3284.  
  3285.          The  NO  BUFFER clause is used only for blocked-mode  files.          NO  BUFFER
  3286.     If NO BUFFER is specified,  then the compiler will not allocate a       NO BUFFER
  3287.     sector buffer for the file,  and all READ statements will  behave                         READ
  3288.     as though they had the FRESH clause.   The generated program will                   FRESH
  3289.     use  the  CP/M default-DMA buffer at address 80h for a    temporary
  3290.     buffer    when  doing file I/O for any file having  the  NO  BUFFER                                   NO  BUFFER
  3291.     clause.
  3292.  
  3293.  
  3294.  
  3295.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:50
  3296.  
  3297.  
  3298.  
  3299.  
  3300.  
  3301.     FILE declaration    FILE declaration
  3302.  
  3303.  
  3304.          The  PUN  clause declares the file to use the  system  punch          PUN
  3305.     (CP/M PUN: device).  The file can only be written-to, not read.
  3306.  
  3307.          The  RANDOM  clause defines the file to be  a  RANDOM  file.          RANDOM                    RANDOM
  3308.     This  clause  should be used only on DISK record-oriented  files,                         DISK
  3309.     and should be used in conjunction with the KEY clause.                           KEY
  3310.  
  3311.          The  RDR  clause  declares the file to be    assigned  to  the          RDR
  3312.     system reader (CPM RDR: device).  The file may only be read-from,
  3313.     not written-to.
  3314.  
  3315.          The RECORD clause specifies the data-interface area o f  the         RECORD
  3316.     file.  For TEXT (character-oriented) files, the  RECORD should be           TEXT                  RECORD
  3317.     of type BYTE.    For non-TEXT files, the RECORD should be a FIELD,        BYTE        TEXT        RECORD           FIELD
  3318.     RECORD, or STRING variable with a length of 128 bytes, unless the    RECORD       STRING
  3319.     BLOCKED clause is used.    BLOCKED
  3320.  
  3321.          The  STATUS clause (like the KEY clause),    gives a name to a          STATUS          KEY
  3322.     data  area within the fcb,  and should not be declared    prior  to
  3323.     declaring the file.  The STATUS-variable is of type BYTE, and has                 STATUS             BYTE
  3324.     meaning  only for DISK files.    It is given the value returned by              DISK
  3325.     the CP/M BDOS following any OPEN, CLOSE, READ, or WRITE involving                    OPEN  CLOSE  READ      WRITE
  3326.     the  file.   For  TEXT    DISK files,  the  STATUS  is  valid  only              TEXT    DISK          STATUS
  3327.     following OPENs and CLOSEs.          OPEN        CLOSE
  3328.  
  3329.          The  TEXT clause specifies that the file is a  byte-oriented          TEXT
  3330.     (character-oriented)  file.   The TEXT clause only has effect  on                      TEXT
  3331.     DISK  files,  since  files  assigned  to  any  other  device  are    DISK
  3332.     automatically assumed to be TEXT files.   Any TEXT file must have                    TEXT          TEXT
  3333.     a RECORD of length 1 (a BYTE variable).      RECORD        BYTE
  3334.  
  3335.          The TTY clause is equivalent to the CON clause.         TTY                 CON
  3336.  
  3337.          The  VALUE  clause may be used to give the file an  external          VALUE
  3338.     name.    The  file  is  always referenced by the  program  by  the
  3339.     internal name (id-1).    The external name is the name which  will
  3340.     be  recorded  in the disk directory for DISK files,  and  has  no                        DISK
  3341.     effect for files assigned to other devices.   If the VALUE clause                                 VALUE
  3342.     is  omitted,  the external file-name is derived from the internal
  3343.     file-name:  declaring  a  file named 'test.file'  with    no  VALUE                                    VALUE
  3344.     clause is equivalent to having a 'VALUE "TEST.FIL"' clause.   The                      VALUE
  3345.     VALUE  clause is overridden by the FILE1 and FILE2 clauses on the    VALUE                   FILE1     FILE2
  3346.     first  OPEN  of the file.   After that,  only the  'VALUE  str-3'           OPEN                        VALUE
  3347.     clause    will  change the name of the  file.   The  'VALUE  lit-3'                                VALUE
  3348.     clause    takes  effect only if FILE1 and FILE2 were not    specified                      FILE1    FILE2
  3349.     for the file.    The VALUE clause may be used to set defaults  for                VALUE
  3350.     the FILE1 and FILE2 clauses.   For example, if a file is declared        FILE1     FILE2
  3351.     with 'FILE1, value "B:TEST.FIL"' and the file-name entered on the
  3352.     command-line  is 'WORK',  the actual (effective) external name of
  3353.     the file will be "B:WORK.FIL".
  3354.  
  3355.  
  3356.          OPENs and CLOSEs only have effect on files assigned to DISK,         OPEN      CLOSE                        DISK
  3357.     and are ignored for files assigned to other devices.
  3358.  
  3359.  
  3360.  
  3361.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:51
  3362.  
  3363.  
  3364.  
  3365.  
  3366.  
  3367.     FILE declaration    FILE declaration
  3368.  
  3369.  
  3370.     EXAMPLES    ________
  3371.  
  3372.     (standard sector-oriented disk file)
  3373.          :
  3374.          :
  3375.     field disk.buff 128;     {This could be replaced by a       }
  3376.                  {RECORD declaration with multiple }
  3377.                  { sub-fields.               }
  3378.     file account.data,
  3379.          disk,
  3380.          random, key acct.file.key,
  3381.          record disk.buff,
  3382.          status acct.cpm.stat,
  3383.          value "ACCT.DAT";
  3384.          :
  3385.          :
  3386.  
  3387.  
  3388.     (standard disk text file)
  3389.          :
  3390.          :
  3391.     string text.file.name     13   value "WORK.TXT";
  3392.     string disk.buff       1024;
  3393.     byte   disk.char;
  3394.  
  3395.     file text.file,
  3396.          disk,
  3397.          text,
  3398.          record disk.char,
  3399.          buffer disk.buff,
  3400.          value text.file.name;
  3401.          :
  3402.          :
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409.  
  3410.  
  3411.  
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.  
  3418.  
  3419.  
  3420.  
  3421.  
  3422.  
  3423.  
  3424.  
  3425.  
  3426.  
  3427.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:52
  3428.  
  3429.  
  3430.  
  3431.  
  3432.  
  3433.     FIND statement    FIND statement
  3434.  
  3435.  
  3436.     FIND {NEXT  } GIVING bin-2 [ADDRESS word-3]    ____  ____    ______        _______    FIND  NEXT    GIVING        ADDRESS    ____  ____    ______        _______
  3437.          {str-1 }
  3438.          (lit-1 }
  3439.          {file-1}
  3440.  
  3441.          This statement implements the CP/M find-file,  and find-next
  3442.     functions.   The bin-2 variable gets the status value returned by
  3443.     CP/M.    If the ADDRESS clause is used,    the word-3 variable  gets               ADDRESS
  3444.     the  address  in  the default disk buffer of  the  disk-directory
  3445.     entry.
  3446.          The NEXT clause should only be used in a statement following         NEXT
  3447.     a  FIND statement,  with no intervening  disk-related  statements       FIND
  3448.     executed.   See the CP/M documentation on the find-file and fine-
  3449.     next-file functions for further information.
  3450.          If  str-1 or lit-1 is used,  the value is formatted into the
  3451.     CP/M  default-fcb  at location ^h5c prior to  making  the  system
  3452.     call.  If file-1 is used, the fcb of the referenced file is used.
  3453.          If bin-2 gets a value of 0,  1, 2, or 3, the file was found.
  3454.     If bin-2 gets a value of ^hff,    the file was not found.  No other
  3455.     status values are defined for these functions.
  3456.  
  3457.     EXAMPLES    ________
  3458.  
  3459.          :
  3460.          :
  3461.     byte find.result;
  3462.     pointer to string find.ptr;
  3463.     string file.name 13 value "WORK.TXT";
  3464.          :
  3465.          :
  3466.     find file.name giving find.result address find.ptr;
  3467.     if find.result <> ^hff then
  3468.          display "the file was found";
  3469.          fi;
  3470.          :
  3471.          :
  3472.     {---a routine to display the directory---}
  3473.     find "*.*" giving find.result address find.ptr;
  3474.     while find.result <> ^hff do
  3475.          add 1 to find.ptr;       {skip drive-byte}
  3476.          move @find.ptr to file.name length 11;
  3477.          nove 0 to file.name[+11,byte];
  3478.          display file.name;
  3479.          find next giving find.result address find.ptr;
  3480.          od;
  3481.          :
  3482.          :
  3483.  
  3484.  
  3485.  
  3486.  
  3487.  
  3488.  
  3489.  
  3490.  
  3491.  
  3492.  
  3493.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:53
  3494.  
  3495.  
  3496.  
  3497.  
  3498.  
  3499.     GOTO statement    GOTO statement
  3500.  
  3501.  
  3502.     {GOTO    {id-1     }     ____     GOTO     ____
  3503.     {GO TO} {END     }     __     ___     GO TO     END     __     ___
  3504.         {@word-id}
  3505.  
  3506.          This  statement  causes  a transfer of  program  control  to
  3507.     another place.
  3508.          If  the END option is used,  control passes to the final END                                _____             END                          END
  3509.     statement of the program (program execution terminates).
  3510.          If the '@word-id' option is used,    program control transfers
  3511.     to the address contained in 'word-id'.
  3512.          If the 'id-1' option is used,  'id-1' may reference either a
  3513.     program-label  (the normal usage),  or a variable name    in  which
  3514.     case the byte-values at that address and subsequent addresses are
  3515.     executed by the processor;  caution should be exercised with this
  3516.     option.
  3517.          'id-1'  may  reference  a    label which is    declared  in  the
  3518.     program following the GOTO statement in which it is used.                  GOTO
  3519.          'id-1'   may  NOT    reference  a  SEGMENTED   procedure-name.                          SEGMENTED
  3520.     Although  it MAY reference a non-segmented  procedure-name,  this
  3521.     usage is not recommended.
  3522.  
  3523.     EXAMPLES    ________
  3524.  
  3525.          :
  3526.          :
  3527.     loop.the.hard.way:
  3528.          If switch.1 < 5 then
  3529.           goto end.this.loop;
  3530.           fi;
  3531.          :
  3532.          :
  3533.          add 1 to switch.5;
  3534.          goto loop.the.hard.way;
  3535.     end.this.loop:
  3536.          if switch.5 > 5 then
  3537.           display "error in manual loop";
  3538.           goto end;
  3539.           fi;
  3540.          :
  3541.          :
  3542.  
  3543.  
  3544.  
  3545.  
  3546.  
  3547.  
  3548.  
  3549.  
  3550.  
  3551.  
  3552.  
  3553.  
  3554.  
  3555.  
  3556.  
  3557.  
  3558.  
  3559.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:54
  3560.  
  3561.  
  3562.  
  3563.  
  3564.  
  3565.     IF statement    IF statement
  3566.  
  3567.  
  3568.     IF cond-1 [THEN stmt-list-1] [ELSE stmt-list-2] FI    __                  ____        __    IF       THEN           ELSE        FI    __                  ____        __
  3569.  
  3570.          This statement provides conditional execution of  statements
  3571.     depending upon the 'truth' of an evaluated logical condition.
  3572.          The THEN is optional,  as is the entire THEN clause.  If the         THEN                     THEN
  3573.     THEN clause is omitted,  usually the ELSE clause will be included    THEN                     ELSE
  3574.     resulting in an IF statement which executes a statement-list when            IF
  3575.     a condition is false.
  3576.          Either statement-list may contain the EXITIF statement.   If                           EXITIF
  3577.     both  the THEN and ELSE clauses are present,  the THEN clause  is          THEN       ELSE               THEN
  3578.     followed by an implicit EXITIF statement.                EXITIF
  3579.  
  3580.     EXAMPLES    ________
  3581.          :
  3582.          :
  3583.     if condition.flag = test.flag then
  3584.          display "1st line of true part";
  3585.          display "2nd line of true part";
  3586.     else
  3587.          display "1st line of false part";
  3588.          display "2nd line of false part";
  3589.          fi;
  3590.          :
  3591.          :
  3592.     if counter = 5
  3593.     else
  3594.          display "this is shown if counter <> 5";
  3595.          fi;
  3596.          :
  3597.          :
  3598.  
  3599.  
  3600.  
  3601.  
  3602.  
  3603.  
  3604.  
  3605.  
  3606.  
  3607.  
  3608.  
  3609.  
  3610.  
  3611.  
  3612.  
  3613.  
  3614.  
  3615.  
  3616.  
  3617.  
  3618.  
  3619.  
  3620.  
  3621.  
  3622.  
  3623.  
  3624.  
  3625.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:55
  3626.  
  3627.  
  3628.  
  3629.  
  3630.  
  3631.     INPUT statement    INPUT statement
  3632.  
  3633.  
  3634.     INPUT byte-1 FROM {num-1 }    _____    INPUT         FROM    _____
  3635.               {byte-2}
  3636.  
  3637.          This  statement provides access to the microprocessor  input
  3638.     ports.    See the OUTPUT statement for access to the output ports.            OUTPUT
  3639.          The  (num-1/byte-2) specifies the port number to input from.
  3640.     The byte-1 specifies the variable which is to receive the value.
  3641.          If  byte-2  is  specified,   the  resultant  code    is  self-
  3642.     modifying, and the compiler will print a warning that the code is
  3643.     not ROM-able.
  3644.  
  3645.     EXAMPLES    ________
  3646.          :
  3647.          :
  3648.     set in.port = 0;
  3649.     set out.port = 1;
  3650.     byte var.in.port;
  3651.     byte var.out.port;
  3652.          :
  3653.     byte input.data;
  3654.     byte output.data;
  3655.          :
  3656.          :
  3657.     input input.data from in.port;
  3658.     input input.data from var.in.port;
  3659.     output output.data to out.port;
  3660.     output output.data to var.out.port;
  3661.          :
  3662.     do
  3663.          input input.data from in.port;
  3664.          od until in.port and ^h40;    {example of status-wait}
  3665.          :
  3666.          :
  3667.  
  3668.  
  3669.  
  3670.  
  3671.  
  3672.  
  3673.  
  3674.  
  3675.  
  3676.  
  3677.  
  3678.  
  3679.  
  3680.  
  3681.  
  3682.  
  3683.  
  3684.  
  3685.  
  3686.  
  3687.  
  3688.  
  3689.  
  3690.  
  3691.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:56
  3692.  
  3693.  
  3694.  
  3695.  
  3696.  
  3697.     JUSTIFY statement    JUSTIFY statement
  3698.  
  3699.  
  3700.     JUSTIFY str-1 {LEFT } [LENGTH {cnst-1}]    _______            ______    JUSTIFY        LEFT    LENGTH    _______            ______
  3701.               {RIGHT}          {bin-1}               _____               RIGHT               _____
  3702.  
  3703.          This  statement  justifies str-1 to the left or right  of    a
  3704.     given field-width.
  3705.          If str-1 is justified LEFT, any leading space characters are                   LEFT
  3706.     deleted,  then    trailing space characters are added to    fill  out
  3707.     LENGTH bytes.    LENGTH
  3708.          If  str-1 is justified RIGHT,  any trailing space characters                    RIGHT
  3709.     are deleted,  then leading space characters are added to fill out
  3710.     LENGTH bytes.    LENGTH
  3711.          If LENGTH is not specified,  the length used is the declared        LENGTH
  3712.     length    of  str-1  minus  1  (to  allow  room  for  the   string-
  3713.     terminator).   If LENGTH is specified,    the resulting string will              LENGTH
  3714.     occupy LENGTH + 1 bytes (including the string terminator).           LENGTH
  3715.          Note  that  moving  a  TRSING which  has  no  leading  space                    TRSING
  3716.     characters  to    a  FIELD of greater length  does  a  justify-left               FIELD
  3717.     operation except that no string-terminator byte is stored.
  3718.          If  str-1    already  has a length greater than  or    equal  to
  3719.     LENGTH, it is not changed.  This statement will not truncate str-                    ____ _________ ____ ___ ________ ____    LENGTH
  3720.     1, except for removal of leading or trailing space characters.    __ ______ ___ _______ __ _______ __ ________ _____ ___________
  3721.  
  3722.     EXAMPLES    ________
  3723.          :
  3724.          :
  3725.     string output.string 31;
  3726.     string work.string 25;
  3727.     word work.value.1,
  3728.          work.value.2;
  3729.          :
  3730.          :
  3731.     convert work.value.1 to dec work.string;
  3732.     justify work.string right length 15;
  3733.     move work.string to output.string length 15;
  3734.     convert work.value.2 to dec work.string;
  3735.     justify work.string right length 15;
  3736.     move work.string to output.string length 15;
  3737.     display output.string;
  3738.          :
  3739.          :
  3740.  
  3741.  
  3742.  
  3743.  
  3744.  
  3745.  
  3746.  
  3747.  
  3748.  
  3749.  
  3750.  
  3751.  
  3752.  
  3753.  
  3754.  
  3755.  
  3756.  
  3757.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:57
  3758.  
  3759.  
  3760.  
  3761.  
  3762.  
  3763.     MCALL statement    MCALL statement
  3764.  
  3765.  
  3766.     MCALL {cnst-1}    _____    MCALL    _____
  3767.           {label}
  3768.                [USING  [x1 [,x2 [,x3 [,x4]]]]]            _____            USING            _____
  3769.                [GIVING [y1 [,y2 [,y3 [,y4]]]]]            ______            GIVING            ______
  3770.  
  3771.          x1, x2, and x3 may be a constant, or a binary variable (8 or
  3772.     16-bit).  x4 may be a constant or an 8-bit variable.
  3773.          y1,  y2,  and  y3 should be WORD variables.   y4 should be a                     WORD
  3774.     BYTE variable.    BYTE
  3775.  
  3776.  
  3777.          This statement provides access to machine-language routines.
  3778.     The address of the routine is specified by  (cnst-1/label).   The
  3779.     microprocessor    registers may be pre-loaded with values prior  to
  3780.     the machine CALL instruction by specifying the USING clause.  The                               USING
  3781.     values    of the microprocessor registers following return from the
  3782.     call may be stored in variables by specifying the GIVING clause.                              GIVING
  3783.          If the USING clause is specified,    the registers are  loaded            USING
  3784.     as follows:
  3785.          x1 goes into register-pair BC
  3786.          x2 goes into register-pair DE
  3787.          x3 goes into register-pair HL
  3788.          x4 goes into the A register
  3789.  
  3790.          If  the GIVING clause is specified,  the register values are             GIVING
  3791.     stored as follows:
  3792.          y1 gets the value of the register-pair HL
  3793.          y2 gets the value of the register-pair DE
  3794.          y3 gets the value of the register-paid BC
  3795.          y4 gets the value of the A register
  3796.  
  3797.          Any  of the items (x1,x2...y3,y4) may be  omitted,  but  the
  3798.     commas    preceding  them  are  required    to  indicate  the  vacant
  3799.     position(s).
  3800.          There  is    no  provision in PARASOL for  checking    that  the
  3801.     address  called  is  valid.   The programmer is  responsible  for
  3802.     insuring  that    the expected routine is present  at  the  address
  3803.     specified.
  3804.          The  microprossor carry (C) and zero (Z) flags may be tested
  3805.     following the MCALL statement,    if desired.   See the section  on              MCALL
  3806.     conditional expressions.
  3807.  
  3808.     See the EXTERNAL statement for examples of MCALL    ___ ___ ________ _________ ___ ________ __ _____        EXTERNAL               MCALL        ________               _____
  3809.  
  3810.  
  3811.  
  3812.  
  3813.  
  3814.  
  3815.  
  3816.  
  3817.  
  3818.  
  3819.  
  3820.  
  3821.  
  3822.  
  3823.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:58
  3824.  
  3825.  
  3826.  
  3827.  
  3828.  
  3829.     MOVE statement    MOVE statement
  3830.  
  3831.  
  3832.     MOVE {var-1 } TO var-2 [LENGTH cnst-1]    ____          __    ______    MOVE          TO    LENGTH    ____          __    ______
  3833.          {cnst-1}
  3834.          {lit-1 }
  3835.  
  3836.          This  statement copies data from one variable into  another.
  3837.     The variables must be of compatible types.  The table below lists
  3838.     the possible combinations.
  3839.  
  3840.     CONSTANT MOVES
  3841.          cnst-1 (numeric constant) may be moved to:
  3842.           BYTE , BYTE POINTER, WORD, WORD-POINTER
  3843.           BCD, and BCD-POINTER
  3844.           BIT is allowed if cnst-1 is either 0 or 1.
  3845.  
  3846.          lit-1 (string constant) may be moved to:
  3847.           STRING and STRING-POINTER
  3848.  
  3849.     VARIABLE MOVES
  3850.          Type of var-1  Allowable types for var-2
  3851.          -------------  --------------------------
  3852.          BIT        none
  3853.          BYTE or BP     BYTE, BP, WORD, WP
  3854.          WORD or WP     BYTE, BP, WORD, WP
  3855.          BCD or BCDP    BCD or BCD-POINTER
  3856.          STRING        STRING, SP, or FIELD
  3857.          FIELD        STRING, SP, or FIELD
  3858.          RECORD        RECORD
  3859.  
  3860.  
  3861.          The   LENGTH  clause  is  valid  only  when  moving   STRING           LENGTH
  3862.     variables.
  3863.  
  3864.          If an 8-bit value is moved to a 16-bit variable,  the  value
  3865.     will have a high-order byte of zero.
  3866.  
  3867.          If  a 16-bit value is moved to an 8-bit value,  the hi-order
  3868.     byte  is discarded,  and a truncation warning is printed  on  the
  3869.     compiler listing.
  3870.  
  3871.          When  moving  RECORDs,  the  length actually  moved  is  the
  3872.     shorter  of the lengths of the two records.   If the  destination
  3873.     RECORD is the shorter, a truncation warning will be listed.
  3874.  
  3875.     STRING and FIELD MOVES
  3876.  
  3877.          MOVE str-1 TO str-2;
  3878.           This    will move the current contents of str-1 to str-2.
  3879.          There is NO provision to check that the resulting value will
  3880.          fit  within  the declared length of str-2.   The  string  is
  3881.          moved byte-by-byte until a null terminator is encountered.
  3882.  
  3883.          MOVE str-1 TO str-2 LENGTH cnst-1;
  3884.           This    will move (cnst-1) number of bytes from str-1  to
  3885.          str-2.   That number of bytes is always moved regardless  of
  3886.          either  the declared lengths or the current dynamic  lengths
  3887.  
  3888.  
  3889.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:59
  3890.  
  3891.  
  3892.  
  3893.  
  3894.  
  3895.     MOVE statement    MOVE statement
  3896.  
  3897.  
  3898.          of either string.
  3899.  
  3900.          MOVE str-1 TO field-2;
  3901.           This    will move the lesser of:  (1) the current dynamic
  3902.          length of str-1,  or (2) the declared length of field-2.  If
  3903.          the  dynamic  length of str-1 is greater than  the  declared
  3904.          length  of  field-2,  str-1 will be truncated  to    fit  into
  3905.          field-2.    If  str-1  is shorter than field-2,  extra  space
  3906.          characters will be appended to fill out the declared  length
  3907.          of field-2.
  3908.  
  3909.          MOVE field-1 TO field-2;
  3910.           This    will  move the lesser of the lengths of  the  two
  3911.          fields.   If the destination field is longer than the source
  3912.          field, it will be padded with spaces to fill out its length.
  3913.          If  the destination field is shorter than the source  field,
  3914.          the  value  will  be truncated to fit into  the  destination
  3915.          field.
  3916.  
  3917.          MOVE field-1 TO str-2;
  3918.           This will move the declared length of field-1, followed
  3919.          by a null terminator byte.   There is NO provision to  check
  3920.          that the value will fit within the declared length of str-2.
  3921.  
  3922.          MOVE rec-1 TO rec-2;
  3923.           This    will  move the lesser of the lengths of  the  two
  3924.          records.    If  the  destination  record is longer    than  the
  3925.          source record,  the values in the record past the length  of
  3926.          the source record are undisturbed.
  3927.  
  3928.  
  3929.  
  3930.  
  3931.  
  3932.  
  3933.  
  3934.  
  3935.  
  3936.  
  3937.  
  3938.  
  3939.  
  3940.  
  3941.  
  3942.  
  3943.  
  3944.  
  3945.  
  3946.  
  3947.  
  3948.  
  3949.  
  3950.  
  3951.  
  3952.  
  3953.  
  3954.  
  3955.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:60
  3956.  
  3957.  
  3958.  
  3959.  
  3960.  
  3961.     MULTIPLY statement    MULTIPLY statement
  3962.  
  3963.  
  3964.     MULTIPLY {num-1 } BY {num-2 } [GIVING num-3]    ________               ______    MULTIPLY      BY           GIVING    ________               ______
  3965.          {cnst-1}    {cnst-2}
  3966.  
  3967.          This  statement will multiply the two given values together.
  3968.     If the GIVING clause is specified, the result is stored in num-3.
  3969.     If  the GIVING clause is not specified,  the result is stored  in
  3970.     num-1, and cnst-1 may not be used.
  3971.          If both cnst-1 and cnst-2 are specified,  the multiplication
  3972.     is done at compile-time, and the statement is optimised to a MOVE
  3973.     statement.
  3974.          All variables must be of compatible types.   If any variable
  3975.     is BCD, all must be BCD.
  3976.          Binary  multiplication is performed modulus 65536.   If  any
  3977.     value is a BYTE value,    it is treated as a WORD with a high-order
  3978.     byte  of  zero.   The multiplication is always done as    a  16-bit
  3979.     multiply.   If    the  destination is a BYTE  field,  a  truncation
  3980.     warning will be printed.
  3981.  
  3982.  
  3983.  
  3984.  
  3985.  
  3986.  
  3987.  
  3988.  
  3989.  
  3990.  
  3991.  
  3992.  
  3993.  
  3994.  
  3995.  
  3996.  
  3997.  
  3998.  
  3999.  
  4000.  
  4001.  
  4002.  
  4003.  
  4004.  
  4005.  
  4006.  
  4007.  
  4008.  
  4009.  
  4010.  
  4011.  
  4012.  
  4013.  
  4014.  
  4015.  
  4016.  
  4017.  
  4018.  
  4019.  
  4020.  
  4021.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:61
  4022.  
  4023.  
  4024.  
  4025.  
  4026.  
  4027.     NULL statement    NULL statement
  4028.  
  4029.  
  4030.     NULL    ____    NULL    ____
  4031.  
  4032.          This  statement  generates no code of itself.   It  is  used
  4033.     merely    as  a  place-holder in situations where  a  statement  is
  4034.     required, or where some statement is desired for readibility.  It
  4035.     is  most  useful in the SWITCH statement to select  values  which                SWITCH
  4036.     need no action when there is some error action to be done in  the
  4037.     ELSE clause of the SWITCH statement.
  4038.  
  4039.     EXAMPLES    ________
  4040.  
  4041.           :
  4042.          procedure debugging.routine:  null;
  4043.           :
  4044.           :
  4045.          switch on wk.byte:
  4046.           0 - 15:   null;     {- fall thru if in this range -}
  4047.           else begin
  4048.                display "That cannot be greater than 15";
  4049.                goto get.operator.input;
  4050.                end;
  4051.           endswitch;
  4052.           :
  4053.           :
  4054.          if wk.byte = 5 then      { In this case, the THEN clause  }
  4055.           null;           { could be omitted, but the      }
  4056.          else              { use of the NULL statement      }
  4057.           add 3 to wk.byte;   { helps the readability.           }
  4058.           fi;
  4059.  
  4060.  
  4061.  
  4062.  
  4063.  
  4064.  
  4065.  
  4066.  
  4067.  
  4068.  
  4069.  
  4070.  
  4071.  
  4072.  
  4073.  
  4074.  
  4075.  
  4076.  
  4077.  
  4078.  
  4079.  
  4080.  
  4081.  
  4082.  
  4083.  
  4084.  
  4085.  
  4086.  
  4087.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:62
  4088.  
  4089.  
  4090.  
  4091.  
  4092.  
  4093.     OPEN statement    OPEN statement
  4094.  
  4095.  
  4096.     OPEN file-1    ____    OPEN    ____
  4097.          [ INPUT ] [ OUTPUT ] [ IO ][ OI ]           _____     ______     __      __           INPUT     OUTPUT     IO      OI           _____     ______     __      __
  4098.          [ [ NO ] REMOVE ]         __   ______         NO   REMOVE         __   ______
  4099.          [ SHARED ]           ______           SHARED           ______
  4100.          [ ERROR { STANDARD  } ]           _____   ________           ERROR   STANDARD           _____   ________
  4101.              { statement }
  4102.  
  4103.  
  4104.          This  statement opens a file for accessing.   If the file is
  4105.     not a disk file,  the OPEN statement performs no action,  and  is
  4106.     entirely optional.
  4107.  
  4108.          If INPUT is specified, the file may be read-from.
  4109.          If OUTPUT is specified, the file may be written-to.
  4110.          If  both  INPUT and OUTPUT are specified,    the file  may  be
  4111.     either    read or written.   IO and OI also allow both reading from
  4112.     and writing to the file.
  4113.          If  none  of these options are specified,    the file  may  be
  4114.     written-to or read-from.
  4115.  
  4116.          The  REMOVE  clause  specifies  that a  new  file    is  being
  4117.     created,  and  that any existing file of the same name should  be
  4118.     deleted  (removed) from the disk directory.   If OUTPUT or OI  is
  4119.     specified, REMOVE is assumed.
  4120.          The  NO REMOVE clause is provided to override this  deletion
  4121.     of existing files.   If NO REMOVE is specified, the existing file
  4122.     will be accessed, and no new file will be created.
  4123.  
  4124.          The  SHARED clause specifies that the file may  be  accessed
  4125.     under  the  MP/M  shared-file  protocol.    This  allows  several
  4126.     programs  to access the same file at the same time.   If the LOCK
  4127.     or  UNLOCK options are used with READ or WRITE    statements,  they
  4128.     will be ignored unless both of the following conditions are  met:
  4129.     (1) The program must be running under MP/M, and
  4130.     (2) The file must have been OPENed with the SHARED clause.
  4131.  
  4132.          The ERROR clause provides the ability to take action if  any
  4133.     errors    occur  during  the OPEN process.   Except  under  unusual
  4134.     conditions (such as a full directory on the disk), the only error
  4135.     likely to happen is a file not found.    If you want to be certain
  4136.     of the cause of the error, define a STATUS variable for the file,
  4137.     and  test  it  inside the ERROR statement.   Refer  to    the  CP/M
  4138.     documentation  for information about the error codes returned  by
  4139.     CP/M.
  4140.          ERROR STANDARD tells the compiler to take the standard error
  4141.     recovery action on an error during the OPEN process.  This action
  4142.     is  to print a run-time message "FILE OPEN ERROR"  and    terminate
  4143.     the program.
  4144.  
  4145.  
  4146.  
  4147.  
  4148.  
  4149.  
  4150.  
  4151.  
  4152.  
  4153.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:63
  4154.  
  4155.  
  4156.  
  4157.  
  4158.  
  4159.     OUTPUT statement    OUTPUT statement
  4160.  
  4161.  
  4162.     OUTPUT {byte-1} TO {byte-2}    ______    OUTPUT        TO    ______
  4163.            {cnst-1}    {cnst-2}
  4164.  
  4165.          This  statement  provides access to the  microprocessor  I/O
  4166.     ports.     The  value of byte-1/cnst-1 is output to the port  whose
  4167.     number is byte-2/cnst-2.   If byte-2 is used,  the generated code
  4168.     is  self-modifying,  and a warning message that the code is  non-
  4169.     ROMMABLE is printed on the compiler listing.
  4170.  
  4171.          See the INPUT statement for examples.             INPUT
  4172.  
  4173.  
  4174.  
  4175.  
  4176.  
  4177.  
  4178.  
  4179.  
  4180.  
  4181.  
  4182.  
  4183.  
  4184.  
  4185.  
  4186.  
  4187.  
  4188.  
  4189.  
  4190.  
  4191.  
  4192.  
  4193.  
  4194.  
  4195.  
  4196.  
  4197.  
  4198.  
  4199.  
  4200.  
  4201.  
  4202.  
  4203.  
  4204.  
  4205.  
  4206.  
  4207.  
  4208.  
  4209.  
  4210.  
  4211.  
  4212.  
  4213.  
  4214.  
  4215.  
  4216.  
  4217.  
  4218.  
  4219.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:64
  4220.  
  4221.  
  4222.  
  4223.  
  4224.  
  4225.     POINTER statement    POINTER statement
  4226.  
  4227.  
  4228.     POINTER TO {BYTE  } id-1 [ VALUE {cnst-1} ]    _______     ____       _____    POINTER TO  BYTE       VALUE    _______     ____       _____
  4229.            {WORD  }         {HIMEM }            ____          _____            WORD          HIMEM            ____          _____
  4230.            {STRING}            ______            STRING            ______
  4231.            {BCD   }            ___            BCD            ___
  4232.  
  4233.          Note: this statement may also take the following forms:
  4234.  
  4235.     {BYTE  } POINTER id-1 [ VALUE cnst-1 ]     ____     _______    _____     BYTE     POINTER    VALUE     ____     _______    _____
  4236.     {WORD  }     ____     WORD     ____
  4237.     {STRING}     ______     STRING     ______
  4238.     {BCD   }     ___     BCD     ___
  4239.  
  4240.          This  statement defines a storage area for a special-purpose
  4241.     WORD  variable    which  is to be used as  a  pointer.   When  this    WORD
  4242.     variable is referenced normally (with no "@" in front of it),  it
  4243.     is treated in all respects as a WORD variable.     But when id-1 is                    WORD
  4244.     preceded by "@" ( @id-1 ),  it takes on the variable-type of what
  4245.     it points-to.    A BYTE POINTER will be treated as a BYTE,  and    a
  4246.     STRING POINTER will be treated as a string.
  4247.          The  variable  may have a value pre-assigned to it with  the
  4248.     VALUE clause.  The key-word HIMEM indicates that the value stored                    HIMEM
  4249.     here should be the address of the first byte following the  last-
  4250.     used  memory location of the program.    This is useful for  user-
  4251.     allocated data storage of arrays, tables, etc.
  4252.  
  4253.     EXAMPLES    ________
  4254.          :
  4255.          :
  4256.     byte pointer wk.bp;
  4257.     word pointer wk.wp;
  4258.     byte pointer master.himem value himem;
  4259.     external word himem.limit address 6;
  4260.          :
  4261.          :
  4262.          move master.himem to wk.bp;   { a normal WORD to WORD move }
  4263.          {-- initialize all memory above the program --}
  4264.          while wk.bp < himem.limit do  { a WORD to WORD compare }
  4265.           move 0 to @wk.bp;       { move 0 to a BYTE }
  4266.           add 1 to wk.bp;       { point to the next location }
  4267.           od;
  4268.          :
  4269.          :
  4270.  
  4271.  
  4272.  
  4273.  
  4274.  
  4275.  
  4276.  
  4277.  
  4278.  
  4279.  
  4280.  
  4281.  
  4282.  
  4283.  
  4284.  
  4285.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:65
  4286.  
  4287.  
  4288.  
  4289.  
  4290.  
  4291.     POINTER statement    POINTER statement
  4292.  
  4293.  
  4294.          Note   that  when    incrementing  a  pointer  (with  the  ADD
  4295.     statement), that the value should be incremented by 1 for a byte-
  4296.     pointer,  and  by  2 for a  word-pointer.   When  incrementing    a
  4297.     string-pointer,  it  may be incremented by the defined length  of
  4298.     the string,  but this will waste space.  The most compact storage
  4299.     is  realised by incrementing by the dynamic length of the  string
  4300.     plus  one (for the null terminator).   The example below gives    a
  4301.     very efficient method of correctly incrementing a string-pointer.
  4302.          :
  4303.          :
  4304.     string           wk.str     32;
  4305.     string pointer wk.sp value himem;
  4306.          :
  4307.          :
  4308.          do
  4309.           accept "Enter the next string: ",wk.str;
  4310.           if wk.str = "" then
  4311.                exitdo;
  4312.                fi;
  4313.           move wk.str to @wk.sp;
  4314.           size @wk.sp giving address wk.sp;  { gives addr of null }
  4315.           add 1 to wk.sp;             { skip the null }
  4316.           od;
  4317.  
  4318.  
  4319.  
  4320.  
  4321.  
  4322.  
  4323.  
  4324.  
  4325.  
  4326.  
  4327.  
  4328.  
  4329.  
  4330.  
  4331.  
  4332.  
  4333.  
  4334.  
  4335.  
  4336.  
  4337.  
  4338.  
  4339.  
  4340.  
  4341.  
  4342.  
  4343.  
  4344.  
  4345.  
  4346.  
  4347.  
  4348.  
  4349.  
  4350.  
  4351.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:66
  4352.  
  4353.  
  4354.  
  4355.  
  4356.  
  4357.     POP and PUSH statements    POP and PUSH statements
  4358.  
  4359.  
  4360.     POP word-1    ___    POP    ___
  4361.  
  4362.          This  statement  performs a machine  POP  instruction.   The
  4363.     results of the POP are stored in word-1.  This statement uses the
  4364.     same  machine stack as the CALL and EXIT  statements  use.   This
  4365.     statement  is  provided for use by programmers who  are  familiar
  4366.     with  the  mechanism  involved in subroutine  linkage  and  stack
  4367.     manipulation.    It is not intended for general purpose usage, and
  4368.     its use should be avoided whenever possible.
  4369.  
  4370.  
  4371.  
  4372.  
  4373.  
  4374.  
  4375.  
  4376.  
  4377.  
  4378.  
  4379.  
  4380.  
  4381.  
  4382.  
  4383.  
  4384.  
  4385.  
  4386.  
  4387.  
  4388.  
  4389.  
  4390.  
  4391.  
  4392.  
  4393.  
  4394.  
  4395.  
  4396.  
  4397.  
  4398.  
  4399.  
  4400.  
  4401.  
  4402.  
  4403.  
  4404.  
  4405.  
  4406.  
  4407.  
  4408.  
  4409.  
  4410.  
  4411.  
  4412.  
  4413.  
  4414.  
  4415.  
  4416.  
  4417.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:67
  4418.  
  4419.  
  4420.  
  4421.  
  4422.  
  4423.     PRINT directive    PRINT directive
  4424.  
  4425.  
  4426.     PRINT ON    _____ __    PRINT ON    _____ __
  4427.     PRINT OFF    _____ ___    PRINT OFF    _____ ___
  4428.     PRINT PAGE    _____ ____    PRINT PAGE    _____ ____
  4429.  
  4430.          This  is  a  compiler directive.    It has no effect  on  the
  4431.     generated object code.
  4432.  
  4433.          PRINT PAGE causes the compiler listing to skip to the top of
  4434.     the next page.
  4435.  
  4436.          PRINT  OFF turns off the compiler listing.   This is  useful
  4437.     when compiling a program containing libraries which are known  to
  4438.     work  correctly.   The    library  could    begin with  a  PRINT  OFF
  4439.     directive,  and end with a PRINT ON directive.     This would  omit
  4440.     the listing of the library in the compiler listing.
  4441.  
  4442.          Note:  If the PRINT FULL compiler switch was used, PRINT OFF
  4443.     has no effect.
  4444.  
  4445.          PRINT  ON    turns  the compiler listing back on  following    a
  4446.     PRINT OFF.
  4447.  
  4448.  
  4449.  
  4450.  
  4451.  
  4452.  
  4453.  
  4454.  
  4455.  
  4456.  
  4457.  
  4458.  
  4459.  
  4460.  
  4461.  
  4462.  
  4463.  
  4464.  
  4465.  
  4466.  
  4467.  
  4468.  
  4469.  
  4470.  
  4471.  
  4472.  
  4473.  
  4474.  
  4475.  
  4476.  
  4477.  
  4478.  
  4479.  
  4480.  
  4481.  
  4482.  
  4483.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:68
  4484.  
  4485.  
  4486.  
  4487.  
  4488.  
  4489.     PROCEDURE statement    PROCEDURE statement
  4490.  
  4491.  
  4492.     PROCEDURE id-1 : statement-1    _________      _ ___________    PROCEDURE      :    _________      _
  4493.  
  4494.          This statement defines a procedure which is not executed in-
  4495.     line, but is called from the main program.
  4496.          id-1 is the name of the procedure.  The procedure is invoked
  4497.     with a statement of the form:
  4498.           CALL id-1;
  4499.  
  4500.          The colon following id-1 is required.
  4501.  
  4502.          In  practice,  statement-1  will generally  be  a    BEGIN-END
  4503.     block,    which  may,  or  may not,  have local data and    procedure
  4504.     declarations of its own.
  4505.  
  4506.          See also the SEGMENTED statement.              SEGMENTED
  4507.  
  4508.  
  4509.  
  4510.  
  4511.  
  4512.  
  4513.  
  4514.  
  4515.  
  4516.  
  4517.  
  4518.  
  4519.  
  4520.  
  4521.  
  4522.  
  4523.  
  4524.  
  4525.  
  4526.  
  4527.  
  4528.  
  4529.  
  4530.  
  4531.  
  4532.  
  4533.  
  4534.  
  4535.  
  4536.  
  4537.  
  4538.  
  4539.  
  4540.  
  4541.  
  4542.  
  4543.  
  4544.  
  4545.  
  4546.  
  4547.  
  4548.  
  4549.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:69
  4550.  
  4551.  
  4552.  
  4553.  
  4554.  
  4555.     READ statement    READ statement
  4556.  
  4557.  
  4558.     READ file-1 [ FRESH ] [ LOCK ]    ____          _____    ____    READ          FRESH    LOCK    ____          _____    ____
  4559.  
  4560.                [ ERROR { STANDARD } ]             _____     ________             ERROR     STANDARD             _____     ________
  4561.                    { stmt-1   }
  4562.  
  4563.          This  statement causes the record defined for file-1  to  be
  4564.     read from the file.
  4565.  
  4566.          The  FRESH  clause  forces  a  fresh  I/O    operation  to  be
  4567.     performed.  With BLOCKED-record files, a sector-buffer is kept in
  4568.     memory from any previous I/O operation on that file.  If FRESH is
  4569.     not specified,    a record will be retrieved from the sector-buffer
  4570.     if  it    (or part of it) is present in memory.    FRESH causes  the
  4571.     sector-buffer  to be discarded,  and a fresh copy  obtained  from
  4572.     disk.    This  only has an effect if you are running a  multi-user
  4573.     application ( and the file was OPENed SHARED ),  since the sector
  4574.     on  disk may have been updated by another user since having  been
  4575.     read by you.   The other user may not have even accessed the same
  4576.     record-number as you,  but merely one adjacent to the one you are
  4577.     accessing.   With  BLOCKED  files,  a sector on disk may  contain
  4578.     portions of more than one record.
  4579.          If  file-1  is declared with NO BUFFER,  then FRESH  is  (in                      NO BUFFER       FRESH
  4580.     effect) assumed.
  4581.  
  4582.          If LOCK is specified, FRESH is assumed.        LOCK           FRESH
  4583.  
  4584.          The LOCK clause causes any sector(s) containing any  portion
  4585.     of  the record being read to be locked.   This only has an effect
  4586.     if the following conditions are met:
  4587.  
  4588.     (1)  The program is running under MP/M (or some other  multi-user
  4589.          operating    system    which supports the same  calls,  such  as
  4590.          TurboDos, or n/Star)
  4591.  
  4592.     (2)  The program was compiled with the MPM compiler switch.                           MPM
  4593.  
  4594.     (3)  The  file    referenced  by the READ statement was  OPENed  in                       READ
  4595.          SHARED mode.
  4596.  
  4597.          The ERROR clause provides a course of action to be taken  if         ERROR
  4598.     any error occurred during the READ operation.    if ERROR STANDARD                               ERROR STANDARD
  4599.     is  specified,    the default action is taken:  a run-time  message
  4600.     "FILE READ ERROR" is displayed, and the program is terminated.
  4601.  
  4602.  
  4603.  
  4604.  
  4605.  
  4606.  
  4607.  
  4608.  
  4609.  
  4610.  
  4611.  
  4612.  
  4613.  
  4614.  
  4615.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:70
  4616.  
  4617.  
  4618.  
  4619.  
  4620.  
  4621.     REBOOT statement    REBOOT statement
  4622.  
  4623.  
  4624.     REBOOT    ______    REBOOT    ______
  4625.  
  4626.          This  statement  terminates program execution  and  re-loads
  4627.     CP/M into memory.  The normal method of program termination is to
  4628.     "fall-thru"  the end of the program.   This statement is a carry-
  4629.     over from an earlier version of PARASOL,  and should generally be
  4630.     replaced with "GOTO END".
  4631.  
  4632.  
  4633.  
  4634.  
  4635.  
  4636.  
  4637.  
  4638.  
  4639.  
  4640.  
  4641.  
  4642.  
  4643.  
  4644.  
  4645.  
  4646.  
  4647.  
  4648.  
  4649.  
  4650.  
  4651.  
  4652.  
  4653.  
  4654.  
  4655.  
  4656.  
  4657.  
  4658.  
  4659.  
  4660.  
  4661.  
  4662.  
  4663.  
  4664.  
  4665.  
  4666.  
  4667.  
  4668.  
  4669.  
  4670.  
  4671.  
  4672.  
  4673.  
  4674.  
  4675.  
  4676.  
  4677.  
  4678.  
  4679.  
  4680.  
  4681.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:71
  4682.  
  4683.  
  4684.  
  4685.  
  4686.  
  4687.     RECORD declaration    RECORD declaration
  4688.  
  4689.  
  4690.     RECORD id-1;    ______    RECORD    ______
  4691.          < data declarations >
  4692.          ENDREC         ______         ENDREC         ______
  4693.  
  4694.          This  statement provides a method of grouping related  data-
  4695.     items together to allow them to be treated as a unit.    A  RECORD                                   RECORD
  4696.     declaration  may contain other RECORD declarations subordinate to                       RECORD
  4697.     it.   Each RECORD declaration is terminated by a matching  ENDREC           RECORD                       ENDREC
  4698.     declaration.
  4699.          The  length  of a RECORD is the sum of all elementary  items                   RECORD
  4700.     enclosed   between   the  RECORD  declaration  and   the   ENDREC                  RECORD               ENDREC
  4701.     declaration.
  4702.  
  4703.     EXAMPLES    ________
  4704.  
  4705.     record      member.rec;
  4706.          record    member.name;
  4707.           field     member.first.name    10;
  4708.           field     member.middle.name    10;
  4709.           field     member.last.name    10;
  4710.           endrec;
  4711.          field     member.address       20;
  4712.          field     member.city       10;
  4713.          field     member.state       2;
  4714.          field     member.zip       10;
  4715.          endrec;
  4716.  
  4717.     Note that a RECORD may itself contain another RECORD.            RECORD                  RECORD
  4718.  
  4719.  
  4720.  
  4721.  
  4722.  
  4723.  
  4724.  
  4725.  
  4726.  
  4727.  
  4728.  
  4729.  
  4730.  
  4731.  
  4732.  
  4733.  
  4734.  
  4735.  
  4736.  
  4737.  
  4738.  
  4739.  
  4740.  
  4741.  
  4742.  
  4743.  
  4744.  
  4745.  
  4746.  
  4747.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:72
  4748.  
  4749.  
  4750.  
  4751.  
  4752.  
  4753.     REDEFINE directive    REDEFINE directive
  4754.  
  4755.  
  4756.     REDEFINE id-1    ________    REDEFINE    ________
  4757.          < statement-list >
  4758.          ENDREDEF         ________         ENDREDEF         ________
  4759.  
  4760.  
  4761.          This  statement  provides    a method of defining an  area  of
  4762.     storage with alternate names.
  4763.          id-1 is a previously-defined identifier.  It may be any type
  4764.     of identifier, but generally will be a variable-name.
  4765.          statement-list may be any statements,  but generally will be
  4766.     data declarations.
  4767.  
  4768.          The data areas within the REDEFINE-ing area may, if desired,                       REDEFINE
  4769.     contain  VALUE    clauses,  and  these clauses  will  override  any         VALUE
  4770.     previous VALUEs originally defined.         VALUE
  4771.  
  4772.          If  the  REDEFINE occurs within a SEGMENTED  procedure,  and              REDEFINE               SEGMENTED
  4773.     redefines data outside of that procedure (in global memory), then
  4774.     the VALUE clause is not allowed within the scope of the REDEFINE,        VALUE                        REDEFINE
  4775.     and will cause a compile-time error.
  4776.  
  4777.  
  4778.     EXAMPLES    ________
  4779.          :
  4780.          :
  4781.     field     disk.rec   128;
  4782.          redefine disk.rec;
  4783.           record    disk.directory.rec;
  4784.                byte     dir.user.code;
  4785.                field     dir.name    8;
  4786.                field     dir.ext    3;
  4787.                byte     dir.extent;
  4788.                string     19;
  4789.                endrec;
  4790.           endredef;
  4791.          :
  4792.          :
  4793.  
  4794.  
  4795.  
  4796.  
  4797.  
  4798.  
  4799.  
  4800.  
  4801.  
  4802.  
  4803.  
  4804.  
  4805.  
  4806.  
  4807.  
  4808.  
  4809.  
  4810.  
  4811.  
  4812.  
  4813.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:73
  4814.  
  4815.  
  4816.  
  4817.  
  4818.  
  4819.     REMOVE statement    REMOVE statement
  4820.  
  4821.  
  4822.     REMOVE {str-1 } [ GIVING byte-1 ]    ______          ______    REMOVE          GIVING    ______          ______
  4823.            {file-1}
  4824.  
  4825.          This statement removes a file from the disk directory.
  4826.          If str-1 is used, it should be the ASCII name of a file.  It
  4827.     may be preceded by a drive letter and a colon if desired.
  4828.          One restriction about using the file-1 option:   If the file
  4829.     has a VALUE statement referencing a string variable,  the  string          VALUE
  4830.     variable  is not formatted into the FCB until the file is OPENed.                                  OPEN
  4831.     If  the file has never been OPENed,  the filename inside the  FCB                    OPEN
  4832.     will  be  undefined,  and this statement's action  will  also  be
  4833.     undefined.   In general,  this option should be avoided,  and the
  4834.     str-1  option should be used.    If the file has a "VALUE  string"                               VALUE
  4835.     statement,  you should use "REMOVE string",  referencing the same                    REMOVE
  4836.     string variable.
  4837.          The GIVING option provides a method of testing the result of         GIVING
  4838.     the  REMOVE  statement.   byte-1 will get a value of 255  if  the         REMOVE
  4839.     REMOVE    was unsuccessful,  and a value of 0,  1,  2,  or 3 if the    REMOVE
  4840.     REMOVE was successful.    REMOVE
  4841.  
  4842.  
  4843.     EXAMPLES    ________
  4844.          :
  4845.          :
  4846.          remove "TEST.FIL" giving wk.byte;
  4847.          if wk.byte = ^hff then
  4848.           display "File was not removed";
  4849.          else
  4850.           display "File has been removed";
  4851.           fi;
  4852.  
  4853.  
  4854.  
  4855.  
  4856.  
  4857.  
  4858.  
  4859.  
  4860.  
  4861.  
  4862.  
  4863.  
  4864.  
  4865.  
  4866.  
  4867.  
  4868.  
  4869.  
  4870.  
  4871.  
  4872.  
  4873.  
  4874.  
  4875.  
  4876.  
  4877.  
  4878.  
  4879.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:74
  4880.  
  4881.  
  4882.  
  4883.  
  4884.  
  4885.     RENAME statement    RENAME statement
  4886.  
  4887.  
  4888.     RENAME {str-1 } TO {str-2 } [ GIVING byte-1 ]    ______                  ______    RENAME        TO          GIVING    ______                  ______
  4889.            {file-1}    {file-2}
  4890.  
  4891.          This statement allows you to rename a file on disk to a  new
  4892.     name.
  4893.          str-1/file-1 references the existing name of the file.
  4894.          str-2/file-2  references  the  name  you want  the  file  to
  4895.     become.
  4896.          str-1  and  str-2    should    be the ASCII name  of  the  file.
  4897.     Either may be preceded by a drive letter and a colon, but it will
  4898.     be ignored if it is present in str-2.  A RENAME will operate only                         RENAME
  4899.     on one drive.
  4900.          There  are some restrictions to using the file-1  or  file-2
  4901.     options.   See    the  REMOVE statement for a description of  these                 REMOVE
  4902.     restrictions.    In  general,  it is best to use  the  str-1/str-2
  4903.     options.
  4904.          The  GIVING clause provides a method of testing the  results          GIVING
  4905.     of  the RENAME statement.   byte-1 will contain 255 if the RENAME        RENAME                           RENAME
  4906.     was  not  successful,  and  0,    1,  2,    or 3 if  the  RENAME  was                                  RENAME
  4907.     sucessful.
  4908.  
  4909.  
  4910.  
  4911.  
  4912.  
  4913.  
  4914.  
  4915.  
  4916.  
  4917.  
  4918.  
  4919.  
  4920.  
  4921.  
  4922.  
  4923.  
  4924.  
  4925.  
  4926.  
  4927.  
  4928.  
  4929.  
  4930.  
  4931.  
  4932.  
  4933.  
  4934.  
  4935.  
  4936.  
  4937.  
  4938.  
  4939.  
  4940.  
  4941.  
  4942.  
  4943.  
  4944.  
  4945.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:75
  4946.  
  4947.  
  4948.  
  4949.  
  4950.  
  4951.     SCAN statement    SCAN statement
  4952.  
  4953.  
  4954.     SCAN str-1 FOR [ ANY      ] {str-2}    ____       ___     ___    SCAN       FOR     ANY    ____       ___     ___
  4955.                [ NO      ] {lit-2}             __             NO             __
  4956.                [ TRAILING ]             ________             TRAILING             ________
  4957.  
  4958.          [ GIVING bin-1 [ ADDRESS bin-2 ] ]           ______          _______           GIVING          ADDRESS           ______          _______
  4959.  
  4960.          [ TRUE stmt-1 ]           ____           TRUE           ____
  4961.  
  4962.          [ FALSE stmt-2 ]           _____           FALSE           _____
  4963.  
  4964.  
  4965.          This  statement has four different actions depending on  the
  4966.     options chosen:
  4967.           SCAN    ANY will search through str-1 for ANY  chararcter          SCAN    ANY
  4968.          which matches ANY character in str-2.
  4969.           SCAN    NO  will search through str-1 for  ANY    character          SCAN    NO
  4970.          which does NOT match ANY character of str-2.
  4971.           SCAN    TRAILING  will    search    through  str-1    for   ANY          SCAN    TRAILING
  4972.          trailing characters which match ANY character in str-2.
  4973.           SCAN    alone  (with none of the  ANY,    NO,  or  TRAILING          SCAN                  ANY    NO     TRAILING
  4974.          options  selected) will scan through str-1 for a sequence of
  4975.          characters which exactly matches the entire contents of  the
  4976.          str-2 string.  The string must match in the same order.
  4977.  
  4978.          The  GIVING  clause provides two different outputs from  the          GIVING
  4979.     SCAN statement:    SCAN
  4980.           bin-1  provides  a  character-count of  the  number  of
  4981.          characters  passed over before the SCAN was  satisfied.   If                        SCAN
  4982.          the SCAN was NOT satisfied,  bin-1 gets a value equal to the         SCAN
  4983.          number of characters in str-1.
  4984.           bin-2  provides  the address of the location where  the
  4985.          SCAN was satisfied.   If the SCAN was NOT    satisfied,  bin-2         SCAN              SCAN
  4986.          gets the address of the null terminator byte in str-1.
  4987.  
  4988.          If  the TRUE clause is present,  stmt-1 is executed  if  the             TRUE
  4989.     SCAN WAS satisfied.    SCAN
  4990.  
  4991.          If  the FALSE clause is present,  stmt-2 is executed if  the             FALSE
  4992.     SCAN was NOT satisfied.    SCAN
  4993.  
  4994.  
  4995.  
  4996.  
  4997.  
  4998.  
  4999.  
  5000.  
  5001.  
  5002.  
  5003.  
  5004.  
  5005.  
  5006.  
  5007.  
  5008.  
  5009.  
  5010.  
  5011.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:76
  5012.  
  5013.  
  5014.  
  5015.  
  5016.  
  5017.     SCAN statement    SCAN statement
  5018.  
  5019.  
  5020.     EXAMPLES    ________
  5021.  
  5022.          :
  5023.          :
  5024.     byte      wk.byte;
  5025.     byte pointer   wk.bp;
  5026.     string      wk.str    50     value       "this is an example       ";
  5027.     string      digits    11     value       "0123456789";
  5028.          :
  5029.          :
  5030.          scan wk.str for "is" giving wk.byte;
  5031.          {-- wk.byte will get a value of 2.  "th" was skipped-over -}
  5032.          :
  5033.          :
  5034.          scan wk.str for any "xyz" giving wk.byte;
  5035.          {-- wk.byte will get 12.  "this is an e" was skipped --}
  5036.          :
  5037.          :
  5038.          scan wk.str for trailing " " giving address wk.bp;
  5039.          move 0 to @wk.bp;
  5040.          {-- this shows an example of removing trailing spaces
  5041.          {-- from a string.  wk.bp gets the address of the first
  5042.          {-- space following "example".  Moving a zero to this
  5043.          {-- byte terminates the string at this location.
  5044.          :
  5045.          :
  5046.     get.a.number:
  5047.          accept "Enter a number: ",wk.str;
  5048.          scan wk.str for no digits
  5049.          error begin
  5050.           display "That had some non-numeric characters in it"
  5051.           goto get.a.number;
  5052.           end;
  5053.  
  5054.  
  5055.  
  5056.  
  5057.  
  5058.  
  5059.  
  5060.  
  5061.  
  5062.  
  5063.  
  5064.  
  5065.  
  5066.  
  5067.  
  5068.  
  5069.  
  5070.  
  5071.  
  5072.  
  5073.  
  5074.  
  5075.  
  5076.  
  5077.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:77
  5078.  
  5079.  
  5080.  
  5081.  
  5082.  
  5083.     SEGMENTED directive    SEGMENTED directive
  5084.  
  5085.  
  5086.     SEGMENTED procedure-definition    _________    SEGMENTED    _________
  5087.  
  5088.          "SEGMENTED" MUST BE IMMEDIATELY FOLLOWED BY "PROCEDURE".
  5089.  
  5090.          This statement provides overlay capability.  You can write a
  5091.     program which is actually larger than 64K by using overlays.   If
  5092.     the source program contains ANY SEGMENTED procedures,  an overlay                    SEGMENTED
  5093.     file  (.OVL)  will  be generated with the same name as    the  .COM
  5094.     file.  The .COM and .OVL files are a matched set.  Do not attempt
  5095.     to  run one without the other,    or with a different version  from
  5096.     the  other.   It  will give  unpredictable  results.   (Actually,
  5097.     a system crash is a pretty good prediction.)
  5098.  
  5099.          In  order to obtain any benefit from overlays,  you need  at
  5100.     least two in a row.   The compiler has the capability of defining
  5101.     as many overlay levels as you need.  In order for two overlays to
  5102.     occupy the same memory area, they MUST be defined contiguously in
  5103.     the source program.  If you want to begin a new overlay area, you
  5104.     MUST  have  some (non-comment) statement  between  the    preceding
  5105.     SEGMENTED declaration and the following SEGMENTED declaration.    SEGMENTED                SEGMENTED
  5106.          You  may have as many different overlays occupying the  same
  5107.     memory area as desired (within the CP/M file-size constraints).
  5108.  
  5109.          The  run-time  overlay  manager will  keep  track    of  which
  5110.     overlay  is  in  memory in each overlay  area.     If  a    segmented
  5111.     procedure is called which is already resident,    it is immediately
  5112.     invoked.  It will be read from disk only when it is not resident.
  5113.     NOTE  that variable definitions within the body of the    procedure
  5114.     having a VALUE clause will be re-initialized whenever the overlay
  5115.     is  loaded  from  disk,  but WILL NOT be  re-initialized  if  the
  5116.     overlay is already resident.
  5117.  
  5118.          A    segmented-procedure has the same scope rules as any other
  5119.     procedure, with the following exceptions:
  5120.  
  5121.     1.      A SEGMENTED procedure cannot be forward-referenced.            SEGMENTED
  5122.           The procedure MUST be appear in the source code prior
  5123.           to any call-reference to it.
  5124.  
  5125.     2.      You cannot CALL a SEGMENTED procedure from another
  5126.           SEGMENTED procedure which occupies the same memory area
  5127.  
  5128.     3.      Data definitions within the segmented procedure
  5129.           which use the VALUE clause will only be re-initialized
  5130.           when the overlay is freshly read from disk.
  5131.  
  5132.     4.      Data definitions within the segmented procedure
  5133.           may REDEFINE data in global memory, but MAY NOT have              REDEFINE
  5134.           any VALUE clauses within the scope of the REDEFINE              VALUE                    REDEFINE
  5135.           statement.  VALUE clauses are OK if the data being                  VALUE
  5136.           redefined is in the same overlay.
  5137.  
  5138.          The  compiler automatically keeps track of the sizes of  the
  5139.     various  overlays in each given area,  and will reserve  an  area
  5140.     sufficient to accommodate the largest overlay.
  5141.  
  5142.  
  5143.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:78
  5144.  
  5145.  
  5146.  
  5147.  
  5148.  
  5149.     SEGMENTED directive    SEGMENTED directive
  5150.  
  5151.  
  5152.     EXAMPLES    ________
  5153.  
  5154.     byte global.byte;
  5155.  
  5156.     segmented procedure A.1:
  5157.     begin
  5158.          display "inside A.1";
  5159.     end;
  5160.     segmented procedure A.2:
  5161.     begin                  {  A.1 and A.2 both will occupy the
  5162.          display "inside A.2";    {  same memory area
  5163.          call A.1;              {  This will cause an error message
  5164.                       {  A.2 wouldn't be here to return-to.
  5165.     end;
  5166.  
  5167.     procedure global.1:
  5168.     begin                   {  this terminates the first
  5169.          display "inside global.1";    {  overlay area since it's
  5170.     end;                   {  not SEGMENTED
  5171.  
  5172.     segmented procedure B.1:
  5173.     begin
  5174.     byte B.1.byte  value     0;
  5175.          display "inside B.1";       {  A new overlay
  5176.          add 1 to B.1.byte;
  5177.     end;
  5178.     segmented procedure B.2:
  5179.     begin                   {  B.1 and B.2 will occupy
  5180.          display "inside B.2";       {  the same memory area
  5181.          add 1 to global.byte;
  5182.          call A.2;               {  This is OK, since A.2 is
  5183.                        {  not in the same memory area
  5184.     end;
  5185.  
  5186.     {---main program---}
  5187.          call B.1;        { B.1.byte is incremented to 1
  5188.          call B.1;        { B.1.byte is incremented to 2
  5189.                 {     since B.1 is still resident, it is
  5190.                 {     not reloaded from disk.
  5191.          call B.2;        { B.1 overlay is discarded
  5192.          call B.1;        { B.1.byte is reloaded to zero and
  5193.                 { incremented to 1.
  5194.  
  5195.  
  5196.  
  5197.  
  5198.  
  5199.  
  5200.  
  5201.  
  5202.  
  5203.  
  5204.  
  5205.  
  5206.  
  5207.  
  5208.  
  5209.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:79
  5210.  
  5211.  
  5212.  
  5213.  
  5214.  
  5215.     SET directive    SET directive
  5216.  
  5217.  
  5218.     SET id-1 {TO} {cnst-1     }    ___    SET      TO    ___
  5219.          {= } {key-word-1}          =
  5220.  
  5221.          This statement provides two capabilities.
  5222.  
  5223.     1.      The  primary usage is to give a name to constants  used
  5224.          in  the  program.     When cnst-1 is used,  id-1 takes on  the
  5225.          value of cnst-1.    Wherever id-1 is used in the program,  it
  5226.          is replaced with a constant of the value cnst-1.
  5227.  
  5228.     2.      Another use is to define synonyms for  key-words.   One
  5229.          usage would be in tables being built in the data-declaration
  5230.          section of the program,  to shorten the keywords to make the
  5231.          tabular structure more apparant. (See the example below).
  5232.           Another   capability     is  to   implement   conditional
  5233.          compiling    of  source  code  depending on    the  SETtings  of                                 SET
  5234.          different constants.  For this type of usage, the key-word-1
  5235.          should be either COMMENT or NULL.    NULL is a special case in                  COMMENT     NULL    NULL
  5236.          this  context,  and will be ignored by the  compiler,  while
  5237.          COMMENT will cause a line of code to be omitted.         COMMENT
  5238.  
  5239.     EXAMPLES    ________
  5240.  
  5241.     set debug = null;
  5242.           {-- this enables debugging code.  To disable debugging
  5243.           {-- code, type "set debug = comment;"
  5244.  
  5245.          :
  5246.          :
  5247.     debug      if wk.byte > 5 then
  5248.     debug           display "Value out of valid range";
  5249.     debug           fi;
  5250.          {-- the above three lines of code will be compiled into
  5251.          {-- the source if debug is SET to NULL.  They                    SET    NULL
  5252.          {-- will be ignored by the compiler if debug is set to
  5253.          {-- COMMENT.         COMMENT
  5254.  
  5255.  
  5256.  
  5257.            :
  5258.            :
  5259.     set  b = byte;
  5260.     set  w = word;
  5261.     set  v = value;
  5262.            :
  5263.            :
  5264.     b v 1;      w v "AA";
  5265.     b v 2;      w v "BB";
  5266.            {--This is equivalent to:
  5267.            {--     byte value 1;         word value "AA";
  5268.            {--     byte value 2;         word value "BB";
  5269.  
  5270.  
  5271.  
  5272.  
  5273.  
  5274.  
  5275.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:80
  5276.  
  5277.  
  5278.  
  5279.  
  5280.  
  5281.     SIZE statement    SIZE statement
  5282.  
  5283.  
  5284.     SIZE {string-1} GIVING [ bin-1 ] [ ADDRESS bin-2 ]    ____        ______           _______    SIZE        GIVING           ADDRESS    ____        ______           _______
  5285.          {field-1 }
  5286.          {record-1}
  5287.  
  5288.          This  statement determines the size of a  variable,  returns
  5289.     the number of bytes in the variable,  and optionally returns  the
  5290.     address following the last-used byte of that variable.
  5291.  
  5292.          If field-1 or record-1 is used,  the SIZE returns a constant                          SIZE
  5293.     value  of the declared size of the variable.   The compiler  will
  5294.     optimise  this to a MOVE statement.   It is recommended that  you                MOVE
  5295.     use the "##" construct for fixed-length variables.
  5296.  
  5297.          When  string-1 is used,  the dynamic length of the string is
  5298.     determined.   bin-1  will  get    a value equal to  the  number  of
  5299.     characters  in the string prior to the    terminator  byte.   bin-2
  5300.     will get the address of the null terminator byte.
  5301.  
  5302.  
  5303.  
  5304.  
  5305.  
  5306.  
  5307.  
  5308.  
  5309.  
  5310.  
  5311.  
  5312.  
  5313.  
  5314.  
  5315.  
  5316.  
  5317.  
  5318.  
  5319.  
  5320.  
  5321.  
  5322.  
  5323.  
  5324.  
  5325.  
  5326.  
  5327.  
  5328.  
  5329.  
  5330.  
  5331.  
  5332.  
  5333.  
  5334.  
  5335.  
  5336.  
  5337.  
  5338.  
  5339.  
  5340.  
  5341.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:81
  5342.  
  5343.  
  5344.  
  5345.  
  5346.  
  5347.     STRING variable declaration    STRING variable declaration
  5348.  
  5349.  
  5350.     STRING [ id-1 ] [LENGTH] length-1 [ VALUE lit-1 ]    ______    STRING         LENGTH         VALUE    ______
  5351.           ,[ id-2 ] [LENGTH] length-2 [ VALUE lit-2 ] ...             LENGTH         VALUE
  5352.  
  5353.          This statement defines a STRING variable.                      STRING
  5354.  
  5355.          id-1 is the name by which the variable is to be referenced.
  5356.  
  5357.          The  key-word LENGTH is optional,    but the value length-1 is               LENGTH
  5358.     NOT optional.    This is a constant which defines the maximum size
  5359.     of the string.     This determines the number of bytes allocated to
  5360.     contain  the  string.    If  you want to store a string    up  to    5
  5361.     characters in length,  for example, you should use a length of at
  5362.     least 6 to allow room for the terminator byte.
  5363.  
  5364.          The VALUE clause specifies a value to be assigned to id-1 at         VALUE
  5365.     compile-time.
  5366.  
  5367.          Note  that  there are very few automatic checks  in  PARASOL
  5368.     against extending a STRING past the number of bytes allocated for                STRING
  5369.     it.   It  is entirely your responsibility to insure  that  enough
  5370.     space  has  been allocated for a string,  and to insure  that  no
  5371.     operations result in exceeding that allocation.
  5372.  
  5373.  
  5374.  
  5375.  
  5376.  
  5377.  
  5378.  
  5379.  
  5380.  
  5381.  
  5382.  
  5383.  
  5384.  
  5385.  
  5386.  
  5387.  
  5388.  
  5389.  
  5390.  
  5391.  
  5392.  
  5393.  
  5394.  
  5395.  
  5396.  
  5397.  
  5398.  
  5399.  
  5400.  
  5401.  
  5402.  
  5403.  
  5404.  
  5405.  
  5406.  
  5407.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:82
  5408.  
  5409.  
  5410.  
  5411.  
  5412.  
  5413.     SUBTRACT statement    SUBTRACT statement
  5414.  
  5415.  
  5416.     SUBTRACT {num-1 } FROM {num-2 } [ GIVING num-3 ]    ________              ______    SUBTRACT      FROM          GIVING    ________              ______
  5417.          {cnst-1}      {cnst-2}
  5418.  
  5419.          This  statement does an arithmetic subtraction of two values
  5420.     and  stores  the result.   num-1/cnst-1 is subtracted  from  num-
  5421.     2/cnst-2.   If the GIVING clause is present, the result is stored               GIVING
  5422.     in num-3.   If no GIVING clause is present,  the result is stored              GIVING
  5423.     in num-2, and cnst-2 cannot be used.
  5424.          If  both cnst-1 and cnst-2 are used,  the GIVING  clause  is                               GIVING
  5425.     required, and the SUBTRACT statement is optimised by the compiler              SUBTRACT
  5426.     to a MOVE statement.         MOVE
  5427.          If cnst-1 is used,  and equals zero,  the SUBTRACT statement                               SUBTRACT
  5428.     is optimised to a MOVE statement.              MOVE
  5429.  
  5430.          All  variables used in this statement must be of  compatible
  5431.     types.    Either all must be binary, or all must be BCD.
  5432.          If  ANY variable is a 16-bit variable,  the  subtraction  is
  5433.     done  as a 16-bit subtraction.     If the result field is 8-bit,    a
  5434.     truncation-error will be printed on the compiler listing.
  5435.  
  5436.  
  5437.  
  5438.  
  5439.  
  5440.  
  5441.  
  5442.  
  5443.  
  5444.  
  5445.  
  5446.  
  5447.  
  5448.  
  5449.  
  5450.  
  5451.  
  5452.  
  5453.  
  5454.  
  5455.  
  5456.  
  5457.  
  5458.  
  5459.  
  5460.  
  5461.  
  5462.  
  5463.  
  5464.  
  5465.  
  5466.  
  5467.  
  5468.  
  5469.  
  5470.  
  5471.  
  5472.  
  5473.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:83
  5474.  
  5475.  
  5476.  
  5477.  
  5478.  
  5479.     SWITCH statement    SWITCH
  5480.  
  5481.  
  5482.     SWITCH ON var-1 :    ______        _    SWITCH ON    :    ______        _
  5483.          [ switch-op [ , switch-op ] ... : stmt-1 ] ...                         _               ,             :                         _
  5484.          [ ELSE stmt-3 ]           ____           ELSE           ____
  5485.          ENDSWITCH         _________         ENDSWITCH         _________
  5486.  
  5487.     switch-op can be:
  5488.     1.      A constant value,  in which case the SWITCH tests var-1                               SWITCH
  5489.          to be equal to that value.
  5490.     2.      A range of values expressed as :
  5491.                cnst-1 {TO} cnst-2                   __                   TO                   __
  5492.                   {- }                   -
  5493.          In this case the SWITCH tests var-1 to fall within the range                  SWITCH
  5494.          of values from cnst-1 to cnst-2 (inclusive).
  5495.  
  5496.  
  5497.          This  statement provides the most    powerful  decision-making
  5498.     capability in PARASOL.     The variable begin tested, var-1, may be
  5499.     a BYTE, WORD, STRING, or BCD, or any POINTER type.      BYTE    WORD  STRING     BCD         POINTER
  5500.  
  5501.          The  text description of the operation of this statement  is
  5502.     fairly involved.  It may be helpful to look at the examples given
  5503.     below  before reading the text.   The operation of the    statement
  5504.     should appear nearly intuitive.
  5505.  
  5506.          The  SWITCH statement begins with the switch-op  comparisons          SWITCH
  5507.     in  the  order    in which they are  written.   Each  switch-op  is
  5508.     evaluated  in  turn.   The first switch-op which is  true  causes
  5509.     its  associated  statement to  be  executed.   Execution  resumes
  5510.     following the ENDSWITCH statement.   The first switch-op which is              ENDSWITCH
  5511.     true  is the only one which will be true,  since no other switch-
  5512.     ops will be evaluated after that.
  5513.  
  5514.          If no switch-op was found to be true,  the ELSE statement is                            ELSE
  5515.     executed,  if present.    Execution resumes following the ENDSWITCH                                ENDSWITCH
  5516.     statement.
  5517.  
  5518.     EXAMPLES    ________
  5519.  
  5520.          switch on wk.byte:
  5521.  
  5522.           0:   null;     {take no action if zero}
  5523.  
  5524.           1 - 5, 8: begin
  5525.                 display "wk.byte = 1, 2, 3, 4, 5, or 8";
  5526.                 end;
  5527.  
  5528.           6,12,18,24,30,36: begin
  5529.                 display "wk.byte is a multiple of 6";
  5530.                 end;
  5531.           else begin
  5532.                display "wk.byte is some other non-zero value";
  5533.                end;
  5534.  
  5535.           endswitch;
  5536.  
  5537.  
  5538.  
  5539.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:84
  5540.  
  5541.  
  5542.  
  5543.  
  5544.  
  5545.     TRACEBACK statement    TRACEBACK statement
  5546.  
  5547.  
  5548.     traceback [ cnst-1 ]    _________    traceback    _________
  5549.  
  5550.          This  statement provides a run-time display of a portion  of
  5551.     the subroutine-linkage stack.  cnst-1 tells the compiler how many
  5552.     words of data from the stack to display.   If cnst-1 is  omitted,
  5553.     10 is used.
  5554.          This  statement  is called internally for    disk-file-related
  5555.     STANDARD error-handling routines.    STANDARD
  5556.  
  5557.  
  5558.  
  5559.  
  5560.  
  5561.  
  5562.  
  5563.  
  5564.  
  5565.  
  5566.  
  5567.  
  5568.  
  5569.  
  5570.  
  5571.  
  5572.  
  5573.  
  5574.  
  5575.  
  5576.  
  5577.  
  5578.  
  5579.  
  5580.  
  5581.  
  5582.  
  5583.  
  5584.  
  5585.  
  5586.  
  5587.  
  5588.  
  5589.  
  5590.  
  5591.  
  5592.  
  5593.  
  5594.  
  5595.  
  5596.  
  5597.  
  5598.  
  5599.  
  5600.  
  5601.  
  5602.  
  5603.  
  5604.  
  5605.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:85
  5606.  
  5607.  
  5608.  
  5609.  
  5610.  
  5611.     WORD data declaration    WORD data declaration
  5612.  
  5613.  
  5614.     WORD id-1 [ VALUE cnst-1 ]    ____        _____    WORD        VALUE    ____        _____
  5615.       [, id-2 [VALUE cnst-2 ] ...           _____       ,       VALUE           _____
  5616.  
  5617.          This  statement defines storage for a 16-bit binary  numeric
  5618.     variable.   The  VALUE clause provides a value assigned  to  that             VALUE
  5619.     variable  at  compile-time.   id-1  is    the name  by  which  this
  5620.     variable will be referenced.
  5621.  
  5622.  
  5623.  
  5624.  
  5625.  
  5626.  
  5627.  
  5628.  
  5629.  
  5630.  
  5631.  
  5632.  
  5633.  
  5634.  
  5635.  
  5636.  
  5637.  
  5638.  
  5639.  
  5640.  
  5641.  
  5642.  
  5643.  
  5644.  
  5645.  
  5646.  
  5647.  
  5648.  
  5649.  
  5650.  
  5651.  
  5652.  
  5653.  
  5654.  
  5655.  
  5656.  
  5657.  
  5658.  
  5659.  
  5660.  
  5661.  
  5662.  
  5663.  
  5664.  
  5665.  
  5666.  
  5667.  
  5668.  
  5669.  
  5670.  
  5671.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:86
  5672.  
  5673.  
  5674.  
  5675.  
  5676.  
  5677.     WRITE statement    WRITE statement
  5678.  
  5679.  
  5680.     WRITE file-1 [ { LOCK UNLOCK } ]    _____         ____ ______    WRITE         LOCK UNLOCK    _____         ____ ______
  5681.                { UNLOCK      }             ______             UNLOCK             ______
  5682.  
  5683.          [ ERROR { STANDARD }           _____   ________           ERROR   STANDARD           _____   ________
  5684.              { stmt-1    }
  5685.  
  5686.          This statement copies data from a record-area and writes  it
  5687.     to the file identified by file-1.
  5688.  
  5689.          The  UNLOCK option is used when the record being written has          UNLOCK
  5690.     been previously LOCKed by an earlier READ statement.            LOCK             READ
  5691.  
  5692.          The LOCK UNLOCK option is used when the record being written         LOCK UNLOCK
  5693.     has  not  been previously LOCKed.   This could be the  case  when                  LOCK
  5694.     adding a new record to the end of a file,  for example.  This may
  5695.     be  needed when updating records in a BLOCKED file which is  open                          BLOCKED
  5696.     in SHARED mode.   Since BLOCKED records do not always begin on    a       SHARED        BLOCKED
  5697.     sector boundary, another program may have an adjacent record read
  5698.     which  happens to overlap onto part of a sector which is used  by
  5699.     the record in your program.   The LOCK UNLOCK option protects you                      LOCK UNLOCK
  5700.     from accidentally wiping out that portion of a record.
  5701.  
  5702.          The  ERROR  statement provides a mechanism for dealing  with          ERROR
  5703.     I/O   errors  occurring  during  the  processing  of  the   WRITE                                    WRITE
  5704.     statement.  If any error condition arises, the ERROR statement is                               ERROR
  5705.     executed.   If ERROR STANDARD is specified, the default action is               ERROR STANDARD
  5706.     to  display  a    run-time error message "FILE  WRITE  ERROR",  and
  5707.     terminate the program.
  5708.  
  5709.  
  5710.  
  5711.  
  5712.  
  5713.  
  5714.  
  5715.  
  5716.  
  5717.  
  5718.  
  5719.  
  5720.  
  5721.  
  5722.  
  5723.  
  5724.  
  5725.  
  5726.  
  5727.  
  5728.  
  5729.  
  5730.  
  5731.  
  5732.  
  5733.  
  5734.  
  5735.  
  5736.  
  5737.     PARASOL language manual Copyright (C) 1982, Para-Soft Pg:87
  5738.  
  5739.  
  5740.  
  5741.  
  5742.  
  5743. @
  5744.