home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / d / decode10.zip / DECODE.DOC < prev    next >
Text File  |  1992-12-07  |  50KB  |  1,669 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                                    Decode It!(TM)
  10.  
  11.  
  12.  
  13.                    The Binary Data Fourth Generation Language(TM)
  14.  
  15.  
  16.  
  17.                                     Version 1.0
  18.  
  19.  
  20.                                    Users' Manual
  21.  
  22.  
  23.  
  24.  
  25.                                     Created by
  26.  
  27.  
  28.                                     Bob Preston
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.                                  Axiom Innovations
  45.  
  46.                                54 Settlers Farm Road
  47.  
  48.                              Monroe, Connecticut 06468
  49.  
  50.  
  51.      Copyright 1992 Axiom Innovations.  All Rights Reserved.
  52.      Printed in the United States of America.
  53.  
  54.  
  55.      Decode It!(TM) and Decode It! 4GL(TM) are trademarks of Axiom
  56.      Innovations.  All trademarks and registered trademarks referenced within
  57.      this document are the property of their respective owners.
  58.  
  59.  
  60.  
  61.  
  62.                                  LICENSE AGREEMENT
  63.  
  64.  
  65.  
  66.      USE OF THIS PRODUCT BINDS YOU TO THE TERMS OF THIS LICENSE AGREEMENT.
  67.      PLEASE READ THE AGREEMENT CAREFULLY AND DO NOT USE THIS PRODUCT IF YOU DO
  68.      NOT AGREE TO THE TERMS OF THE AGREEMENT.
  69.  
  70.  
  71.  
  72.      1. LICENSE.  You may use this product for an evaluation period of 30
  73.      days.  After the evaluation period you are required to purchase a
  74.      registered copy.  Axiom Innovations grants permission for this shareware
  75.      product to be copied and distributed, if no fees are charged.  Otherwise,
  76.      you must get written permission from Axiom Innovations to distribute
  77.      copies of this product.  Said permission is granted only for the
  78.      distribution of unaltered and intact copies of this product.
  79.  
  80.  
  81.      2. COPYRIGHT.  This product is licensed to you, for your own use.  This
  82.      is copyrighted software.  You are not obtaining title to the product or
  83.      any copyright rights.  You may not sublicense, rent, lease, convey,
  84.      modify, translate, decompile, or disassemble this product, in whole or in
  85.      part, except as expressly provided for in this license.
  86.  
  87.  
  88.      3. COPIES.  You may make as many copies of this product as you need for
  89.      back-up purposes.  You may use this product on more than one computer,
  90.      provided there is no chance it will be used simultaneously on more than
  91.      one computer.  If you need to use the software on more than one computer
  92.      simultaneously, please contact us for information about site licenses.
  93.  
  94.  
  95.      4. LIMITED WARRANTY.  THIS PRODUCT IS LICENSED "AS IS" WITHOUT ANY
  96.      WARRANTY OF ANY KIND, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES
  97.      OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, ALL OF WHICH ARE
  98.      EXPRESSLY AND SPECIFICALLY DISCLAIMED.  Some states do not allow the
  99.      exclusion of implied warranties, so the above limitation may not apply to
  100.      you.
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.        Decode It! Version 1.0                                         Page 1
  109.  
  110.  
  111.      5. LIMITATION OF LIABILITY.  IN NO EVENT SHALL AXIOM INNOVATIONS OR
  112.      ANYONE ELSE WHO HAS BEEN INVOLVED IN THE CREATION, PRODUCTION, OR
  113.      DELIVERY OF THIS PRODUCT BE LIABLE FOR ANY INDIRECT, CONSEQUENTIAL, OR
  114.      INCIDENTAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THIS
  115.      PRODUCT EVEN IF AXIOM INNOVATIONS HAS BEEN ADVISED OF SUCH DAMAGES OR
  116.      CLAIMS.  IN NO EVENT SHALL AXIOM INNOVATIONS LIABILITY FOR ANY DAMAGES
  117.      EVER EXCEED THE PRICE PAID FOR THE LICENSE TO USE THIS PRODUCT,
  118.      REGARDLESS OF THE FORM OF CLAIM.  Some states do not allow the exclusion
  119.      of the limit of liability for consequential or incidental damages, so the
  120.      above limitation may not apply to you.
  121.  
  122.  
  123.      6. GOVERNING LAW.  This agreement shall be governed by the laws of the
  124.      State of Connecticut and shall inure to the benefit of Axiom Innovations
  125.      and any successors, administrators, heirs and assigns.  Any action or
  126.      proceeding brought by either party against the other arising out of or
  127.      related to this agreement shall be brought only in a STATE or FEDERAL
  128.      COURT of competent jurisdiction located in Fairfield County, Connecticut.
  129.      The parties hereby consent to in personam jurisdiction of said courts.
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.        Decode It! Version 1.0                                         Page 2
  169.  
  170.  
  171.  
  172.                                  TABLE OF CONTENTS
  173.  
  174.  
  175.  
  176.  
  177.              1.0  What is Decode It!?  .............................    4
  178.              2.0  The Shareware Concept  ...........................    5
  179.              3.0  System Requirements  .............................    5
  180.              4.0  Installation  ....................................    6
  181.              5.0  Lets Try It Out!  ................................    6
  182.              6.0  Basic Features  ..................................   10
  183.              6.1  Rules  ...........................................   10
  184.              6.2  RECORDs  .........................................   11
  185.              6.3  END Command  .....................................   12
  186.              6.4  Criteria  ........................................   12
  187.              6.5  Undefined Values  ................................   13
  188.              6.6  Guidelines  ......................................   14
  189.              7.0  Advanced Features  ...............................   15
  190.              7.1  Blocks  ..........................................   15
  191.              7.2  Control Flow Commands  ...........................   15
  192.              7.3  4GL Processor Commands  ..........................   16
  193.              7.3.1  (ORDER) Command  ...............................   16
  194.              7.3.2  (OMIT) Command   ...............................   16
  195.              7.4  System Variable (.OFFSET)  .......................   17
  196.              8.0  Examples  ........................................   17
  197.              8.1  EXEINFO.RUL Revisited  ...........................   17
  198.              8.2  C Unions  ........................................   17
  199.              8.3  IF ... THEN ... ELSE  ............................   19
  200.              8.4  IF ... AND/OR  ...................................   19
  201.              9.0  Parameters  ......................................   20
  202.              10.0  4GL Quick Reference  ............................   21
  203.              10.1  Rules Format  ...................................   21
  204.              10.2  Records and Blocks Formats  .....................   21
  205.              10.3  Criteria Format  ................................   22
  206.              10.4  Control Flow Commands  ..........................   22
  207.              11.0  Registration  ...................................   23
  208.              Appendix A:  Error Messages  ..........................   24
  209.              A.1  Main Program Errors  .............................   24
  210.              A.2  4GL Processor Errors  ............................   24
  211.              A.3  File Interpreter Errors  .........................   26
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.        Decode It! Version 1.0                                         Page 3
  229.  
  230.  
  231.      1.0  What is Decode It!?
  232.  
  233.      Decode It! is a simple, yet powerful fourth generation language (4GL)
  234.      tailored for binary data interpretation.  It excels in interpreting
  235.      binary files containing fixed or variable length records and multiple
  236.      record layouts.
  237.  
  238.      By applying your data format rules to raw binary data, Decode It! exposes
  239.      the underlying structure of binary information and transforms it into
  240.      readable ASCII text.  This text can be redirected to a file, or piped to
  241.      MORE and LIST.  You specify the format, so data is displayed the way you
  242.      want to see it.
  243.  
  244.      In addition, Decode It! opens up binary data to the world of text
  245.      manipulation tools.  Once created, Decode It! files can be used with
  246.      DIFF, AWK, GREP, Norton's TS, and any other text utility.
  247.  
  248.      Some of Decode It!'s features are:
  249.  
  250.           Easy installation on single user and local area network systems
  251.           (not copy protected).
  252.  
  253.           Easy to use Fourth Generation Language (4GL):  programs are
  254.           created using your favorite text editor.
  255.  
  256.           Borland dBase II, III, IV, and Lotus 1-2-3 4GL rule files are
  257.           included!  Decode your database and spreadsheet files right out
  258.           of the box.
  259.  
  260.           Allows data to be grouped into 1 byte, 2 byte, 4 byte, or
  261.           floating point values, and assigns each to a label.
  262.           Furthermore, values can be combined into records (structures),
  263.           with a label assigned to each.
  264.  
  265.           Binary data can be decoded using either Byte Forward or Byte
  266.           Reverse ordering.
  267.  
  268.           Displays a value as decimal, hexadecimal, or as a character
  269.           string.
  270.  
  271.           Permits criteria to be assigned to each data format rule.  The
  272.           criteria must be fulfilled for the rule to be selected.
  273.  
  274.           Select which part of a binary file you wish to decode, or
  275.           decode the entire file.
  276.  
  277.           Edit the decoded binary data and store in original binary file
  278.           (registered users only).
  279.  
  280.           Compile your rules into a stand-alone program with no royalties
  281.           (registered users only).
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.        Decode It! Version 1.0                                         Page 4
  289.  
  290.  
  291.      2.0  The Shareware Concept
  292.  
  293.      Decode It! is distributed as Shareware:  it is not "freeware" and it is
  294.      not "public domain".  Shareware allows you to try fully-featured,
  295.      professional software before you buy it.  Typically, you can obtain a
  296.      shareware program from a distributor for a small handling fee (less than
  297.      $10).  Alternatively, you can download shareware from most electronic
  298.      bulletin boards using a modem.  You are permitted to use the software for
  299.      an evaluation period (typically 30 days).  After the evaluation period,
  300.      you are obligated to register your software with the author.
  301.  
  302.  
  303.      As a registered Decode It! user, you will receive:
  304.  
  305.           Two must-have utilities:
  306.  
  307.                1) a program that allows you to edit and store
  308.                decoded data back into the binary file; and
  309.  
  310.                2) a Decode It! compiler for creating your own
  311.                stand-alone decoder programs (royalty-free).
  312.  
  313.           A handsomely printed user manual.
  314.  
  315.           One month free problem and technical support.
  316.  
  317.           Upgrade notices (and special upgrade deals on future versions
  318.           of Decode It!).
  319.  
  320.  
  321.      Shareware provides you with a greater variety of software to choose from,
  322.      as well as a big selection of hard-to-find, specialized software.  Retail
  323.      channels simply cannot stock as wide a variety of software as shareware
  324.      distribution.  Furthermore, to find specialized software, shareware is
  325.      typically your only choice.  Shareware also offers the ultimate
  326.      satisfaction guarantee:  if you are not satisfied with a product during
  327.      the evaluation period, you can just stop using it.  The shareware concept
  328.      has been so successful that many retail software products are now
  329.      distributed as shareware.
  330.  
  331.  
  332.  
  333.      3.0  System Requirements
  334.  
  335.      Decode It! requires the following to operate:
  336.  
  337.           PC/XT (or faster) computer with at least 512K RAM,
  338.  
  339.           DOS version 3.0 or higher.
  340.  
  341.      A hard disk is recommended but not required.
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.        Decode It! Version 1.0                                         Page 5
  349.  
  350.  
  351.      4.0  Installation
  352.  
  353.      Decode It! can be installed on either a floppy or hard disk system.  To
  354.      begin the installation, insert the Decode It! disk into floppy disk drive
  355.      A:.  If you are using a two floppy system, insert a bootable target disk
  356.      into floppy disk drive B:.  Next, log onto drive A: by typing:
  357.  
  358.           A:<RETURN>
  359.  
  360.      where <RETURN> is the RETURN (or ENTER) key.  Run the install program by
  361.      typing:
  362.  
  363.           DINSTALL<RETURN>
  364.  
  365.      DINSTALL will first prompt you for the drive on which to install Decode
  366.      It!.  If installing on your primary hard drive, enter the letter C;
  367.      otherwise, if installing on a floppy disk, you should enter the letter B.
  368.      Next, DINSTALL will ask you if you actually want to install Decode It! on
  369.      the target drive.  If you did not answer the previous question correctly,
  370.      select N at this point to abort the installation process.  By answering
  371.      Y, DINSTALL will install Decode It! and update the PATH statement in your
  372.      AUTOEXEC.BAT file.  Note that updating the PATH statement is crucial, for
  373.      it allows Decode It! to find all its necessary files.  After the
  374.      installation is complete, you must reboot your computer for the new PATH
  375.      to take effect.
  376.  
  377.      By the way, Decode It! can also be installed manually, by copying all the
  378.      files from the installation disk into a DECODE subdirectory on your
  379.      target drive and by updating the PATH statement to access this
  380.      subdirectory.  If you do not understand what this means, then just let
  381.      DINSTALL handle it for you.
  382.  
  383.  
  384.  
  385.      5.0  Lets Try It Out!
  386.  
  387.      If you're anxious to see the program work, lets try a few simple
  388.      examples.  If you have a Lotus .WK1 file, you can see Decode It! in
  389.      action by typing the following:
  390.  
  391.           DECODE  \decode\123.RUL  <.WK1 file>
  392.  
  393.      where <.WK1 file> is your Lotus file.  Hit the RETURN key to start it,
  394.      and use Ctrl-C to get back to the DOS prompt.
  395.  
  396.      Likewise, you can decode your dBase II/III/IV .DBF files by using the
  397.      rule files DBASE2.RUL, DBASE3.RUL and DBASE4.RUL, respectively.
  398.  
  399.      Now lets create a rule file from scratch.  Suppose you were interested in
  400.      seeing the header information at the beginning of the DECODE.EXE file.
  401.      At the DOS prompt, type in the following:
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.        Decode It! Version 1.0                                         Page 6
  409.  
  410.  
  411.           TYPE CON > EXEINFO.RUL
  412.  
  413.           ASCII  Signature 2
  414.  
  415.           SHORT  ImageSizeMod512
  416.  
  417.           SHORT  FileSizeDiv512
  418.  
  419.           SHORT  RelocationItems
  420.  
  421.           SHORT  HeaderSizeDiv16
  422.  
  423.           SHORT  MinimumHeapDiv16
  424.  
  425.           XSHORT MaximumHeapDiv16
  426.  
  427.           SHORT  ImageStackSeg
  428.  
  429.           SHORT  ExeStackSize
  430.  
  431.           XSHORT CheckSum
  432.  
  433.           SHORT  ExeStartOffset
  434.  
  435.           SHORT  ImageCodeSegment
  436.  
  437.           SHORT  RelocationStart
  438.  
  439.           SHORT  OverlayNumber
  440.  
  441.           EXIT
  442.  
  443.           <CTRL-Z><RETURN>
  444.  
  445.  
  446.      where <CTRL-Z> is the Ctrl-Z key, and <RETURN> is the RETURN (or ENTER)
  447.      key.
  448.  
  449.      The above rules that you typed in were stored in the file EXEINFO.RUL.
  450.      Now we will use these rules to decode the EXE header.  Type in the
  451.      following at the DOS prompt:
  452.  
  453.           DECODE  EXEINFO.RUL  \decode\decode.exe
  454.  
  455.      Decode It! will respond with:
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.        Decode It! Version 1.0                                         Page 7
  469.  
  470.  
  471.           .FILE:    \decode\decode.exe
  472.           .ORDER:   LSB
  473.  
  474.           .OFFSET:  0x00000000
  475.  
  476.           Signature:                                "MZ"
  477.  
  478.           ImageSizeMod512:                          0489
  479.  
  480.           FileSizeDiv512:                           0032
  481.  
  482.           RelocationItems:                          0008
  483.  
  484.           HeaderSizeDiv16:                          0032
  485.  
  486.           MinimumHeapDiv16:                         0265
  487.  
  488.           MaximumHeapDiv16:                         0xFFFF
  489.  
  490.           ImageStackSeg:                            1127
  491.  
  492.           ExeStackSize:                             2048
  493.  
  494.           CheckSum:                                 0xD139
  495.  
  496.           ExeStartOffset:                           1220
  497.  
  498.           ImageCodeSegment:                         0000
  499.  
  500.           RelocationStart:                          0030
  501.  
  502.           OverlayNumber:                            0000
  503.  
  504.  
  505.  
  506.      Lets take a look at some of this information.  The signature indicates
  507.      that this file is indeed executable.  We also know that the program
  508.      requires 265 * 16 = 4240 bytes of heap space (by MinimumHeapDiv16), and
  509.      uses 2048 bytes of stack space (by ExeStackSize).
  510.  
  511.      As another example, lets decode a text file with all control codes (for
  512.      example, line feeds) exposed.  Type in the following at the DOS prompt:
  513.  
  514.           TYPE CON > TEXT.RUL
  515.  
  516.           RECORD line -1
  517.  
  518.             WHILE line.character <> 10
  519.             ASCII character -1
  520.  
  521.           END
  522.  
  523.           <CTRL-Z><RETURN>
  524.  
  525.  
  526.  
  527.  
  528.        Decode It! Version 1.0                                         Page 8
  529.  
  530.  
  531.      Now we'll decode TEXT.RUL, while also using it as the rule file, by
  532.      entering at the DOS prompt:
  533.  
  534.           DECODE  TEXT.RUL  TEXT.RUL
  535.  
  536.      Decode It! will respond with:
  537.  
  538.  
  539.           .FILE:    TEXT.RUL
  540.           .ORDER:   LSB
  541.  
  542.           .OFFSET:  0x00000000
  543.  
  544.           line(00):
  545.  
  546.              character(00):            "RECORD line -1"
  547.              character(14):            13
  548.              character(15):            10
  549.  
  550.           line(01):
  551.  
  552.              character(00):            13
  553.              character(01):            10
  554.  
  555.           line(02):
  556.  
  557.              character(00):            "  WHILE line.character <> 10"
  558.              character(28):            13
  559.              character(29):            10
  560.  
  561.           line(03):
  562.  
  563.              character(00):            "  ASCII character -1"
  564.              character(20):            13
  565.              character(21):            10
  566.  
  567.           line(04):
  568.  
  569.              character(00):            13
  570.              character(01):            10
  571.  
  572.           line(05):
  573.  
  574.              character(00):            "END"
  575.              character(03):            13
  576.              character(04):            10
  577.  
  578.           line(06):
  579.  
  580.              character(00):            13
  581.              character(01):            10
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.        Decode It! Version 1.0                                         Page 9
  589.  
  590.  
  591.      You've just created two useful utilities:
  592.  
  593.           1)  A tool that displays DOS .EXE resource allocation,
  594.  
  595.           2)  A utility that not only finds embedded control characters
  596.           in documents, but also counts the number of characters per line
  597.           and the number of lines in the document.
  598.  
  599.      From these examples, its easy to see how Decode It! can become a valuable
  600.      addition to your tool set.
  601.  
  602.  
  603.  
  604.      6.0  Basic Features
  605.  
  606.      Decode It! uses rules (from a text file) to imply how binary data is
  607.      stored.  Each rule is assigned a label, and can be assigned matching
  608.      criteria.  If the criteria is fulfilled, Decode It! prints the data in
  609.      the following format:
  610.  
  611.                     <Label>:  <Formatted Data>
  612.  
  613.      where <Label> is the rule's label, and <Formatted Data> is the data
  614.      printed according to the format specified by the rule.  Afterwards, the
  615.      data is consumed by that rule's label, and the next rule is applied.
  616.      Once the end of the rule file is reached, Decode It! cycles back to its
  617.      beginning.
  618.  
  619.      In addition to rules, Decode It! supports commands that alter the flow of
  620.      control through the rule file.
  621.  
  622.      Please note that all rules and commands must be specified in UPPERCASE.
  623.  
  624.  
  625.  
  626.           6.1  Rules
  627.  
  628.           Rules are created using the following syntax:
  629.  
  630.  
  631.                <Rule Type>  <Label>  [Instance Count]
  632.  
  633.  
  634.           where <Rule Type> is one of the following:
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.        Decode It! Version 1.0                                         Page 10
  649.  
  650.  
  651.                TYPE    DESCRIPTION
  652.                ------  -----------
  653.                ASCII   1 byte character
  654.                TINY    1 byte signed decimal
  655.                XTINY   1 byte hexadecimal
  656.                SHORT   2 byte signed decimal
  657.                XSHORT  2 byte hexadecimal
  658.                LONG    4 byte signed decimal
  659.                XLONG   4 byte hexadecimal
  660.                SFLOAT  Single precision IEEE floating point
  661.                DFLOAT  Double precision IEEE floating point
  662.  
  663.           <Label> is an alphanumeric name that identifies the contents of
  664.           the data; and,
  665.  
  666.           [Instance Count] is the optional number of times this rule is
  667.           applied before preceding to the next one.  Note that [Instance
  668.           Count] can be an decimal integer constant or a label.  If a
  669.           label is specified, the last binary data assigned to that label
  670.           is used.  If the label's value is undefined, [Instance Count]
  671.           is infinite (see Undefined Values section below).  If [Instance
  672.           Count] is omitted, it is assumed to be 1.
  673.  
  674.           [Instance Count] is always used as an unsigned integer with 32
  675.           bit precision.  This precision corresponds to the largest file
  676.           size possible using MS-DOS.  This maximum file size can be
  677.           represented in Decode It! using the value -1.  Consequently, an
  678.           [Instance Count] equal to -1 is effectively infinite.
  679.  
  680.           Some examples of rules are:
  681.  
  682.                TINY   SmallSize
  683.                XLONG  ManyLongs 55
  684.                DFLOAT VariableFloats  SmallSize
  685.  
  686.  
  687.  
  688.           6.2  RECORDs
  689.  
  690.           Specifies that the following rules should be considered members
  691.           of this structure (until an END command is specified).  Its
  692.           syntax is similar to the other rules, as follows:
  693.  
  694.                     RECORD  <Label>  [Instance Count]
  695.  
  696.           where <Label> is a name that identifies the content of the
  697.           record, and [Instance Count] is the optional number of RECORDs
  698.           that can be selected using this rule.  RECORDs can be nested.
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.        Decode It! Version 1.0                                         Page 11
  709.  
  710.  
  711.           6.3  END Command
  712.  
  713.           Ends the definition of a RECORD or Block (see Blocks section
  714.           below).  All rules between a RECORD and its associated END are
  715.           members of that RECORD.  Its syntax is:
  716.  
  717.                     END  [Record Size]
  718.  
  719.           where [Record Size] is an optional maximum size (in bytes) of a
  720.           RECORD instance.  [Record Size] can be a constant or a label
  721.           (subject to Undefined Value logic).  This size is useful for
  722.           variable length records, as shown in the following example:
  723.  
  724.                SHORT  RecSize
  725.  
  726.                RECORD VariableRec
  727.  
  728.                  ASCII FixedField
  729.  
  730.                  TINY  VariableField -1
  731.  
  732.                END RecSize
  733.  
  734.           In this example, VariableField is bounded by the value of
  735.           RecSize.
  736.  
  737.           Decode It! is tolerant of inconsistent nested Record Sizes.
  738.           Suppose a rule file contains the following:
  739.  
  740.                RECORD foo
  741.  
  742.                  RECORD bar
  743.                    TINY zap -1
  744.                  END 100
  745.  
  746.                  TINY yeh -1
  747.  
  748.                END 50
  749.  
  750.           The rule "zap" will be selected 100 times; however, since the
  751.           size of "foo" is less than "bar", the rule "yeh" will be
  752.           skipped.
  753.  
  754.           Note that the END command cannot be subject to WHILE criteria.
  755.  
  756.  
  757.           6.4  Criteria
  758.  
  759.           The WHILE command allows a rule to be skipped if certain
  760.           criteria is not met.  It must be placed immediately before its
  761.           corresponding rule, using the following syntax:
  762.  
  763.                WHILE  <Operand1>  <Operator>  <Operand2>
  764.  
  765.  
  766.  
  767.  
  768.        Decode It! Version 1.0                                         Page 12
  769.  
  770.  
  771.  
  772.           where <Operator> can be either:
  773.  
  774.                OPERATOR  DESCRIPTION
  775.                --------  -----------
  776.                  <=>     Equivalence
  777.                  <>      Not equal
  778.                  <       Less than
  779.                  >       Greater than
  780.                  <=      Less than or equal to
  781.                  >=      Greater than or equal to
  782.  
  783.  
  784.           and <Operand1> and <Operand2> are SIGNED values that must be
  785.           compared.  Note that each of the operands can be either an
  786.           decimal integer constant or a label.  If a label is specified,
  787.           the last binary data assigned to that label is used as the
  788.           operand.  If the label's value is undefined, the comparison is
  789.           considered successful (see Undefined Values section below).  If
  790.           no WHILE command exists for a rule, the rule is applied to the
  791.           data.
  792.  
  793.           Note that WHILEs can be nested by using the Block commands
  794.           discussed below.
  795.  
  796.  
  797.  
  798.           6.5  Undefined Values
  799.  
  800.           For each rule file cycle, the first time a rule's criteria is
  801.           tested, the current value assigned to its label is marked as
  802.           undefined.  If the rule is once again selected, its new binary
  803.           value is read from the file and marked as defined.  If the rule
  804.           is skipped, its value remains undefined.  At startup, all
  805.           values are undefined.
  806.  
  807.           An undefined value is interpreted as infinite when used as an
  808.           instance count or record size, and a comparison on an undefined
  809.           value is always successful.  To demonstrate how this can be
  810.           useful, the following example:
  811.  
  812.                WHILE Null_String <> 0
  813.                  ASCII Null_String -1
  814.  
  815.           matches on all null-terminated strings of arbitrary length.
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.        Decode It! Version 1.0                                         Page 13
  829.  
  830.  
  831.           6.6  Guidelines
  832.  
  833.           When creating a rule file, please observe the following:
  834.  
  835.                A maximum of 256 rules/commands can be defined.
  836.  
  837.                All rules and commands must be in UPPERCASE.
  838.  
  839.                One rule/command per line and one line per
  840.                rule/command.
  841.  
  842.                Only one WHILE command is allowed per rule (unless
  843.                Blocks are used).
  844.  
  845.                Tabs and/or spaces can be used as delimiters between
  846.                rule/command arguments.
  847.  
  848.                If a label, used as an instance count, operand, or
  849.                record size, refers to a member of a record, it must
  850.                be fully qualified as follows:
  851.  
  852.                    <Record>.[Nested Record Label(s).]<Label>
  853.  
  854.                Fully qualified labels must be unique.
  855.  
  856.                A label, used as an instance count, operand, or
  857.                record size, cannot refer to a RECORD rule.
  858.  
  859.                Labels can contain only alphanumeric characters and
  860.                underscores (_); furthermore, labels cannot begin
  861.                with a digit.
  862.  
  863.                Labels must be less than or equal to 16 characters.
  864.  
  865.                Avoid using the following keywords as labels:  ASCII,
  866.                TINY, XTINY, SHORT, XSHORT, LONG, XLONG, SFLOAT,
  867.                DFLOAT, WHILE, RETURN, NEXT, EXIT, BREAK, RESCIND,
  868.                BEGIN, REPEAT, END.  Even though these are acceptable
  869.                labels, they will not be valid in future versions of
  870.                Decode It!.
  871.  
  872.                All constant numbers must be decimal integers (base
  873.                10).
  874.  
  875.                Comments can be used in a rule file by preceding them
  876.                with a pound symbol (#).
  877.  
  878.                Blank lines are permissible in the rule file.
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.  
  888.        Decode It! Version 1.0                                         Page 14
  889.  
  890.  
  891.      7.0  Advanced Features
  892.  
  893.  
  894.  
  895.           7.1  Blocks
  896.  
  897.           A Block allows a group of rules to be selected based on only
  898.           one criteria statement. Two types of Blocks can be created:
  899.           BEGIN/END and REPEAT/END.  A BEGIN/END block is only selected
  900.           once.  A REPEAT/END block is re-invoked until its corresponding
  901.           criteria no longer evaluates true.  The END command that
  902.           completes a block can contain an optional Record Size (see END
  903.           Command section above).  Like RECORDs, Blocks can be nested.
  904.           Here are two examples of Blocks:
  905.  
  906.                SHORT foo
  907.                WHILE foo <> 1
  908.                BEGIN
  909.  
  910.                  DFLOAT bar 2
  911.                  SFLOAT zap 2
  912.  
  913.                END
  914.  
  915.  
  916.  
  917.                REPEAT
  918.  
  919.                  LONG foo 1
  920.                  TINY bar 3
  921.                  WHILE foo <=> 55
  922.                    BREAK
  923.  
  924.                END
  925.  
  926.           In the first example, the block is selected once if foo is not
  927.           equal to 1.  In the second, the block is always selected until
  928.           foo is equal to 55.
  929.  
  930.  
  931.  
  932.           7.2  Control Flow Commands
  933.  
  934.           Combined with Blocks and RECORDs, control flow commands provide
  935.           a powerful way to alter the sequence of execution.  Some of
  936.           these commands allow execution to skip past the end of the
  937.           current Block/RECORD, to go to the top of the rule file, and to
  938.           exit the program.  The full list of Control Flow Commands
  939.           follows:
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.        Decode It! Version 1.0                                         Page 15
  949.  
  950.  
  951.                COMMAND   DESCRIPTION
  952.                -------   -----------
  953.                EXIT      Exit the program
  954.                RETURN    Resume at top of rule file
  955.                RESCIND   Go to end of last 2 nested blocks
  956.                BREAK     Go to end of current block
  957.                NEXT      Next invocation of this block
  958.  
  959.           The usefulness of these commands is demonstrated in the
  960.           Examples section below.
  961.  
  962.  
  963.  
  964.           7.3  4GL Processor Commands
  965.  
  966.           Before your rules are applied to binary data, they are first
  967.           processed by the program DCODE4GL, to resolve label references
  968.           and to check for syntax errors.  The following commands are
  969.           used exclusively by DCODE4GL (thats why they are surrounded by
  970.           parenthesis).  One important note is that these commands have
  971.           GLOBAL scope:  once used, they affect the entire module and are
  972.           not subject to WHILE criteria.
  973.  
  974.                7.3.1  (ORDER) Command
  975.  
  976.                The (ORDER) command specifies the byte ordering of
  977.                the binary data.  On IBM PCs, multi-byte data is
  978.                stored in Byte Reverse order.  That is, the least
  979.                significant byte(s) of the data are stored first.
  980.                Decode It! is flexible enough to decode binary data
  981.                stored in Byte Forward order (most significant
  982.                byte(s) first).  The two commands are:
  983.  
  984.                     (ORDER)  LSB
  985.  
  986.                     (ORDER)  MSB
  987.  
  988.                where LSB and MSB stand for least significant byte
  989.                and most significant byte, respectively.  Only one
  990.                (ORDER) command can be used in a rule file.  If the
  991.                (ORDER) command is omitted, LSB is assumed.
  992.  
  993.  
  994.                7.3.2  (OMIT) Command
  995.  
  996.                The (OMIT) command allows data to be consumed by a
  997.                rule without it being printed.  Its syntax is:
  998.  
  999.                     (OMIT)  <Label>
  1000.  
  1001.                where <Label> is the label of a rule specified
  1002.                elsewhere in the file.  An example is:
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.        Decode It! Version 1.0                                         Page 16
  1009.  
  1010.  
  1011.  
  1012.                     WHILE Words <> 32
  1013.                       ASCII Words -1
  1014.  
  1015.                     WHILE NeedlessWords <> 10
  1016.                       ASCII NeedlessWords -1
  1017.  
  1018.                     (OMIT) NeedlessWords
  1019.  
  1020.                Here only the characters up to and including the
  1021.                first space in each line are printed.
  1022.  
  1023.  
  1024.  
  1025.           7.4  System Variable (.OFFSET)
  1026.  
  1027.           .OFFSET is a label that represents the absolute offset in the
  1028.           binary file.  It can be used wherever labels are acceptable.
  1029.           In the following example
  1030.  
  1031.                WHILE .OFFSET <> 100
  1032.                  TINY Skip -1
  1033.                (OMIT) Skip
  1034.  
  1035.           the first 100 bytes of the binary file are omitted.
  1036.  
  1037.  
  1038.      8.0  Examples
  1039.  
  1040.           8.1  EXEINFO.RUL Revisited
  1041.  
  1042.           In the tutorial section, we created a rule file called
  1043.           EXEINFO.RUL that displayed the header information at the
  1044.           beginning of a DOS .EXE file.  Suppose we were only interested
  1045.           in the stack size of an executable.  We could then rewrite
  1046.           EXEINFO as follows:
  1047.  
  1048.                WHILE .OFFSET <> 16
  1049.                  SHORT Ignore
  1050.  
  1051.                (OMIT) Ignore
  1052.  
  1053.                SHORT ExeStackSize
  1054.  
  1055.                EXIT
  1056.  
  1057.  
  1058.           8.2  C Unions
  1059.  
  1060.           C Unions can be decoded using Blocks with corresponding WHILE
  1061.           criteria.  For example, if a binary file contains data for the
  1062.           following union:
  1063.  
  1064.  
  1065.  
  1066.  
  1067.  
  1068.        Decode It! Version 1.0                                         Page 17
  1069.  
  1070.  
  1071.  
  1072.                char  cDataType;
  1073.                union
  1074.                  {
  1075.  
  1076.                  char  cValue;   /* If cDataType = 0 */
  1077.                  short iValue;   /* If cDataType = 1 */
  1078.                  struct          /* If cDataType = 2 */
  1079.                    {
  1080.  
  1081.                    long lVal1;
  1082.                    long lVal2;
  1083.  
  1084.                    }  rValue;
  1085.  
  1086.                  }
  1087.  
  1088.  
  1089.           this can be represented in the rule file as follows:
  1090.  
  1091.                TINY cDataType
  1092.  
  1093.                BEGIN
  1094.  
  1095.                  WHILE cDataType <=> 0
  1096.                  BEGIN
  1097.  
  1098.                    TINY cValue
  1099.                    RESCIND
  1100.  
  1101.                  END
  1102.  
  1103.                  WHILE cDataType <=> 1
  1104.                  BEGIN
  1105.  
  1106.                    SHORT iValue
  1107.                    RESCIND
  1108.  
  1109.                  END
  1110.  
  1111.                  WHILE cDataType <=> 2
  1112.                  RECORD rValue
  1113.  
  1114.                    LONG lVal1
  1115.                    LONG lVal2
  1116.                    RESCIND
  1117.  
  1118.                  END
  1119.  
  1120.                END
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.        Decode It! Version 1.0                                         Page 18
  1129.  
  1130.  
  1131.           8.3  IF ... THEN ... ELSE
  1132.  
  1133.           Decode It! can support multi-way branching (as in IF/THEN/ELSE)
  1134.           as follows.  Suppose we want to select the rule
  1135.  
  1136.                     LONG l
  1137.  
  1138.           if x is equal to z; otherwise, we want to select the rule
  1139.  
  1140.                     SHORT s
  1141.  
  1142.           This can be represented as:
  1143.  
  1144.                BEGIN
  1145.  
  1146.                  WHILE x <=> z
  1147.                  BEGIN
  1148.  
  1149.                    LONG l
  1150.                    RESCIND
  1151.  
  1152.                  END
  1153.  
  1154.                  SHORT s
  1155.  
  1156.                END
  1157.  
  1158.  
  1159.           Furthermore, CASE statements can be created using the method
  1160.           shown in the C Unions section above.
  1161.  
  1162.  
  1163.           8.4  IF ... AND/OR
  1164.  
  1165.           Boolean AND/OR logic can be constructed using Decode It! as
  1166.           shown in the following examples.  Suppose we want to select the
  1167.           rule
  1168.  
  1169.                     DFLOAT pi
  1170.  
  1171.           if x is equal to 0 AND y is equal to 11.  The rule file can
  1172.           represent this as:
  1173.  
  1174.                WHILE x <=> 0
  1175.                BEGIN
  1176.  
  1177.                  WHILE y <=> 11
  1178.                    DFLOAT pi
  1179.  
  1180.                END
  1181.  
  1182.           Alternatively, suppose we only want to select "pi" if x is
  1183.           equal to 22 OR y is equal to 33.  This can be constructed as:
  1184.  
  1185.  
  1186.  
  1187.  
  1188.        Decode It! Version 1.0                                         Page 19
  1189.  
  1190.  
  1191.                BEGIN
  1192.  
  1193.                  WHILE x <> 22
  1194.                  BEGIN
  1195.  
  1196.                    WHILE y <> 33
  1197.                      RESCIND
  1198.  
  1199.                  END
  1200.                  DFLOAT pi
  1201.  
  1202.                END
  1203.  
  1204.  
  1205.  
  1206.      9.0  Parameters
  1207.  
  1208.      Decode It! is executed from the DOS prompt using the following syntax:
  1209.  
  1210.      DECODE   <rule file>  <binary file>  [L<length>]  [S<start>]  [W<width>]
  1211.  
  1212.      where
  1213.  
  1214.           <rule file> is a file containing Decode It! 4GL rules.  If a
  1215.           hyphen (-) is used, the rules are read from the console.
  1216.  
  1217.           <binary file> is the binary data to decode.
  1218.  
  1219.           [L<length>] is an optional length of binary data (in bytes) to
  1220.           decode.  Its default is the entire binary file.  Length can be
  1221.           specified as hexadecimal by preceding the number with '0x'.
  1222.  
  1223.           [S<start>] is an optional file offset from which to start
  1224.           decoding. Its default is the beginning of the binary file.
  1225.           Start can be specified as hexadecimal by preceding the number
  1226.           with '0x'.
  1227.  
  1228.           [W<width>] is the optional maximum width of displayed ASCII
  1229.           strings. If no width is specified, ASCII strings are displayed
  1230.           so that they fit on a standard monitor.  Width can be specified
  1231.           as hexadecimal by preceding the number with '0x'.
  1232.  
  1233.      The output from Decode It! can be redirected or piped to another process.
  1234.  
  1235.      Note that Decode It! uses a temporary file while executing.  The file is
  1236.      created in the directory specified by the TMP environment variable, or in
  1237.      the current directory if there is no TMP variable.  The name of the temp
  1238.      file is of the form 'decodeXX', where XX is a consecutively increasing
  1239.      number.  In addition, the program DINSTALL uses the temporary file
  1240.      'dcodeaut.new' when updating autoexec.bat.
  1241.  
  1242.      DCODE4GL, the 4GL processor program, will use extended/expanded memory
  1243.      when necessary, if either is available.
  1244.  
  1245.  
  1246.  
  1247.  
  1248.        Decode It! Version 1.0                                         Page 20
  1249.  
  1250.  
  1251.      10.0  4GL Quick Reference
  1252.  
  1253.  
  1254.  
  1255.           10.1  Rules Format
  1256.  
  1257.  
  1258.                <Rule Type>   <Label>   [Instance Count]
  1259.  
  1260.  
  1261.           where <Rule Type> can be:
  1262.  
  1263.  
  1264.                TYPE    DESCRIPTION
  1265.                ------  -----------
  1266.                ASCII   1 byte character
  1267.                TINY    1 byte signed decimal
  1268.                XTINY   1 byte hexadecimal
  1269.                SHORT   2 byte signed decimal
  1270.                XSHORT  2 byte hexadecimal
  1271.                LONG    4 byte signed decimal
  1272.                XLONG   4 byte hexadecimal
  1273.                SFLOAT  Single precision IEEE floating point
  1274.                DFLOAT  Double precision IEEE floating point
  1275.  
  1276.  
  1277.  
  1278.           10.2  Records and Blocks Formats
  1279.  
  1280.  
  1281.                RECORD   <Label>   [Instance Count]
  1282.  
  1283.                BEGIN
  1284.  
  1285.                REPEAT
  1286.  
  1287.  
  1288.  
  1289.           Each Record/Block is terminated by an END command:
  1290.  
  1291.  
  1292.                END   [Size]
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.        Decode It! Version 1.0                                         Page 21
  1309.  
  1310.  
  1311.           10.3  Criteria Format
  1312.  
  1313.  
  1314.                WHILE  <Operand1>  <Operator>  <Operand2>
  1315.  
  1316.  
  1317.           where <Operator> can be:
  1318.  
  1319.  
  1320.                OPERATOR  DESCRIPTION
  1321.                --------  -----------
  1322.                  <=>     Equivalence
  1323.                  <>      Not equal
  1324.                  <       Less than
  1325.                  >       Greater than
  1326.                  <=      Less than or equal to
  1327.                  >=      Greater than or equal to
  1328.  
  1329.  
  1330.  
  1331.           10.4  Control Flow Commands
  1332.  
  1333.  
  1334.                COMMAND   DESCRIPTION
  1335.                -------   -----------
  1336.                EXIT      Exit the program
  1337.                RETURN    Resume at top of rule file
  1338.                RESCIND   Go to end of last 2 nested blocks
  1339.                BREAK     Go to end of current block
  1340.                NEXT      Next invocation of this block
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.        Decode It! Version 1.0                                         Page 22
  1369.  
  1370.  
  1371.      11.0  Registration
  1372.  
  1373.        --------------------------------------------------------------
  1374.        Decode It! V1.0 Registration Payment Form (valid through 1995)
  1375.        --------------------------------------------------------------
  1376.  
  1377.      S1006-0                                       Date: _____________
  1378.  
  1379.      Name: ___________________________________________________________
  1380.  
  1381.      Company: ________________________________________________________
  1382.  
  1383.      Address: ________________________________________________________
  1384.  
  1385.      City: ___________________________________________________________
  1386.  
  1387.      State/Country: ________________________ Zip: ____________________
  1388.  
  1389.      Phone: (_____) _____ - ______
  1390.  
  1391.      What type of floppy disk?     [] 5-1/4"    [] 3-1/2"
  1392.  
  1393.                     ITEM            QTY   UNIT COST    TOTAL
  1394.            ----------------------   ---   ---------   -------
  1395.            Decode It! Version 1.0   ___ x  $35.00   = $______
  1396.  
  1397.            (CT state residents only) 6% sales tax     $______
  1398.  
  1399.            Shipping and Handling:                     $______
  1400.             $5.00  Inside U.S.A. (not P.O. Box)
  1401.             $5.00  APO or FPO U.S. address
  1402.             $7.00  P.O. Box
  1403.             $8.00  Western Hemisphere (except USA)
  1404.             $16.00 Eastern Hemisphere
  1405.                                                 TOTAL $______
  1406.  
  1407.      CHECKS AND MONEY ORDERS MUST BE U.S. FUNDS DRAWN ON U.S. ACCOUNTS ONLY.
  1408.      Please send the above form with check or money order (payable to Axiom
  1409.      Innovations) to:
  1410.                             Axiom Innovations
  1411.                             54 Settlers Farm Road
  1412.                             Monroe, Connecticut 06468 USA
  1413.  
  1414.      Site licensing is available.  Please contact us.
  1415.  
  1416.      As an incentive to registering, future versions of Decode It! will be
  1417.      available to registered users at discounted prices.
  1418.  
  1419.      Axiom Innovations is dedicated to providing innovative tools for
  1420.      increasing programmer productivity.  Watch for useful new shareware
  1421.      products from us on your favorite bulletin boards and from shareware
  1422.      distributors.  If you have any comments or suggestions on how we can make
  1423.      our software better, please contact us.  We would love to hear from you.
  1424.      Congratulations on your decision to purchase Decode It!, and thank you
  1425.      for supporting the shareware concept.
  1426.  
  1427.  
  1428.        Decode It! Version 1.0                                         Page 23
  1429.  
  1430.  
  1431.      Appendix A:  Error Messages
  1432.  
  1433.      A.1  Main Program Errors
  1434.  
  1435.      Error:  Could not create temporary file name
  1436.      Cause:  Disk full, write protection, etc.
  1437.      Remedy: Check if disk is full or write protected.
  1438.              Delete any Decode It! temporary files.
  1439.  
  1440.      Error:  Could not duplicate stdout
  1441.      Cause:  Too many open files.
  1442.      Remedy: Increase the FILES= statement in CONFIG.SYS
  1443.  
  1444.      Error:  Could not find DCODE4GL.EXE in PATH
  1445.      Cause:  PATH does not contain DECODE directory.
  1446.      Remedy: Update PATH= statement in AUTOEXEC.BAT and reboot.
  1447.  
  1448.      Error:  Could not find DCODEFI.EXE in PATH
  1449.      Cause:  PATH does not contain DECODE directory.
  1450.      Remedy: Update PATH= statement in AUTOEXEC.BAT and reboot.
  1451.  
  1452.      Error:  Could not redirect stdin
  1453.      Cause:  Too many open files.
  1454.      Remedy: Increase the FILES= statement in CONFIG.SYS.
  1455.  
  1456.      Error:  Could not redirect stdout
  1457.      Cause:  Too many open files or write protection.
  1458.      Remedy: Dependent upon cause.
  1459.  
  1460.  
  1461.      A.2  4GL Processor Errors
  1462.  
  1463.      Error:  Byte ORDERing already specified
  1464.      Cause:  Rule file contains several (ORDER) commands.
  1465.      Remedy: Only one (ORDER) command is permitted.
  1466.  
  1467.      Error:  Illegal byte ORDERing
  1468.      Cause:  Unrecognized argument.
  1469.      Remedy: Use either 'LSB' or 'MSB'.
  1470.  
  1471.      Error:  Illegal character(s) in label
  1472.      Cause:  Labels can only contain alphanumerics and underscores.
  1473.              Labels cannot begin with a digit.
  1474.      Remedy: Rename label.
  1475.  
  1476.      Error:  Illegal command
  1477.      Cause:  Unrecognized command.
  1478.      Remedy: Use proper command (in UPPERCASE).
  1479.  
  1480.      Error:  Illegal END command
  1481.      Cause:  Unexpected END command.
  1482.      Remedy: Remove END command and re-check program logic.
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.        Decode It! Version 1.0                                         Page 24
  1489.  
  1490.  
  1491.      Error:  Illegal number of arguments
  1492.      Cause:  Too few or too many arguments.
  1493.      Remedy: Refer to Users' Manual for correct usage.
  1494.              Arguments must be separated by spaces.
  1495.  
  1496.      Error:  Illegal WHILE operator
  1497.      Cause:  Operator is not valid.
  1498.      Remedy: Refer to Users' Manual for valid operators.
  1499.  
  1500.      Error:  Instance count cannot reference a RECORD
  1501.      Cause:  A record is used as an instance count.
  1502.      Remedy: Use a non-record rule as an instance count.
  1503.  
  1504.      Error:  Invalid instance count
  1505.      Cause:  Instance count is non-numeric or zero.
  1506.      Remedy: Use a valid label or number.
  1507.  
  1508.      Error:  Invalid OMIT label
  1509.      Cause:  OMIT label not found.
  1510.      Remedy: Use a valid label.
  1511.  
  1512.      Error:  Invalid RECORD size
  1513.      Cause:  Size is non-numeric or zero.
  1514.      Remedy: Use a valid label or number.
  1515.  
  1516.      Error:  Invalid WHILE operand 1
  1517.      Cause:  Operand is non-numeric.
  1518.      Remedy: Use a valid label or number.
  1519.  
  1520.      Error:  Invalid WHILE operand 2
  1521.      Cause:  Operand is non-numeric.
  1522.      Remedy: Use a valid label or number.
  1523.  
  1524.      Error:  Label already defined
  1525.      Cause:  Fully qualified labels must be unique.
  1526.      Remedy: Change label.
  1527.  
  1528.      Error:  Label too long
  1529.      Cause:  Labels must be <= 16 characters.
  1530.      Remedy: Shorten label.
  1531.  
  1532.      Error:  No corresponding END
  1533.      Cause:  A record or block is not terminated with an END.
  1534.      Remedy: Re-check program logic.
  1535.  
  1536.      Error:  No Member(s) in RECORD
  1537.      Cause:  Records must contain at least one rule.
  1538.      Remedy: Delete the unused record.
  1539.  
  1540.      Error:  No rule specified after WHILE command
  1541.      Cause:  The rule file ends with a WHILE command.
  1542.      Remedy: Delete last unused WHILE.
  1543.  
  1544.  
  1545.  
  1546.  
  1547.  
  1548.        Decode It! Version 1.0                                         Page 25
  1549.  
  1550.  
  1551.      Error:  No rule(s) in BEGIN/REPEAT block
  1552.      Cause:  Blocks must contain at least one rule.
  1553.      Remedy: Delete the unused block.
  1554.  
  1555.      Error:  No rules specified
  1556.      Cause:  The rule file does not contain at least one rule.
  1557.      Remedy: Add rules to rule file.
  1558.  
  1559.      Error:  Size cannot reference a RECORD
  1560.      Cause:  A record is used as a size.
  1561.      Remedy: Use a non-record rule as a size.
  1562.  
  1563.      Error:  Too many rules
  1564.      Cause:  A maximum of 256 rules/commands can be defined.
  1565.      Remedy: Use fewer rules and commands.
  1566.  
  1567.      Error:  WHILE criteria already specified
  1568.      Cause:  WHILEs cannot be nested.
  1569.      Remedy: Use BEGIN/END blocks.
  1570.  
  1571.      Error:  WHILE criteria specified for (OMIT) command
  1572.      Cause:  (OMIT) is not subject to WHILE criteria.
  1573.      Remedy: Remove WHILE statement.
  1574.  
  1575.      Error:  WHILE criteria specified for (ORDER) command
  1576.      Cause:  (ORDER) is not subject to WHILE criteria.
  1577.      Remedy: Remove WHILE statement.
  1578.  
  1579.      Error:  WHILE criteria specified for END command
  1580.      Cause:  END is not subject to WHILE criteria.
  1581.      Remedy: Remove WHILE statement.
  1582.  
  1583.      Error:  WHILE operand 1 cannot reference a RECORD
  1584.      Cause:  A record is used as an operand.
  1585.      Remedy: Use a non-record rule as an operand.
  1586.  
  1587.      Error:  WHILE operand 2 cannot reference a RECORD
  1588.      Cause:  A record is used as an operand.
  1589.      Remedy: Use a non-record rule as an operand.
  1590.  
  1591.      A.3  File Interpreter Errors
  1592.  
  1593.      Error:  Cannot open <binary file>
  1594.      Cause:  File cannot be found, no file handles left, etc.
  1595.      Remedy: Dependent upon cause.
  1596.  
  1597.      Error:  Cannot read <EXE file>
  1598.      Cause:  File cannot be found, no file handles left, etc.
  1599.      Remedy: Dependent upon cause.
  1600.  
  1601.      Error:  Cannot read file info. from <binary file>
  1602.      Cause:  Not enough FCBS.
  1603.      Remedy: Increase the first number in the FCBS= statement in CONFIG.SYS.
  1604.  
  1605.  
  1606.  
  1607.  
  1608.        Decode It! Version 1.0                                         Page 26
  1609.  
  1610.  
  1611.      Error:  Error reading rule information
  1612.      Cause:  Ctrl-C was hit.
  1613.      Remedy: Retry.
  1614.  
  1615.      Error:  Error reading rule(s)
  1616.      Cause:  Ctrl-C was hit.
  1617.      Remedy: Retry.
  1618.  
  1619.      Error:  Error reading WHILE(s)
  1620.      Cause:  Ctrl-C was hit.
  1621.      Remedy: Retry.
  1622.  
  1623.      Error:  Floating point conversion failed for <number>
  1624.      Cause:  Float could not be truncated to integer.
  1625.      Remedy: Change program logic to avoid comparing float.
  1626.  
  1627.      Error:  Invalid length parameter
  1628.      Cause:  Length is either non-numeric, zero, or too big.
  1629.      Remedy: Use appropriate length.
  1630.  
  1631.      Error:  Invalid start parameter
  1632.      Cause:  Start is non-numeric.
  1633.      Remedy: Use correct start.
  1634.  
  1635.      Error:  Invalid width parameter
  1636.      Cause:  Width is either non-numeric or zero.
  1637.      Remedy: Use appropriate width.
  1638.  
  1639.      Error:  No rule(s) match
  1640.      Cause:  The program went into an infinite loop.
  1641.      Remedy: Re-check program logic.
  1642.  
  1643.      Error:  Too many rules
  1644.      Cause:  Intermediate 4GL file is corrupted.
  1645.      Remedy: Retry.
  1646.  
  1647.      Error:  Unexpected EOF on read
  1648.      Cause:  EOF reached before a multi-byte value was filled.
  1649.      Remedy: Re-check program logic.
  1650.  
  1651.      Error:  Unrecognizable parameter
  1652.      Cause:  Unknown parameter specified on command line.
  1653.      Remedy: Refer to Users' Manual for proper usage.
  1654.  
  1655.      Error:  Version mismatch
  1656.      Cause:  DCODE4GL.EXE and DCODEFI.EXE versions do not match.
  1657.      Remedy: Install newer version of Decode It!.
  1658.  
  1659.      Error:  Width cannot be greater than 1024
  1660.      Cause:  Width parameter too big.
  1661.      Remedy: Use appropriate width.
  1662.  
  1663.  
  1664.  
  1665.  
  1666.  
  1667.  
  1668.        Decode It! Version 1.0                                         Page 27
  1669.