ÿÿ
Introduction

                Transportable LASI Cell Data Format (TLC)


  TLC is a form of LASI cell data that is easily understood by people. It
  contains the information needed to construct a cell, and therefore move a
  cell from one drawing directory to another. It is also useful as a
  convenient format for making conversions into other drawing system
  formats and formats for I/O devices. TLC files are ASCII sequential files
  that should be easily readable by programming languages including BASIC
  and C. In TLC format there is only one file per cell, nomatter what the
  cell rank.

  Cell files in TLC are called EXTERNAL files, while cell files used by
  LASI directly (.BPV and .CEL) are called INTERNAL files. TLC files have
  the extension .TLC in DOS. Internal files are designed for the computers
  convenience, while external files are designed for human convenience.

  Using TLC is the ONLY WAY that cells can be installed in a LASI drawing
  from an external source. This is because the internal files use a pointer
  system of referring to a cell to save memory space. This pointer is the
  position in the CELLS.DBD file of a cell's information, which cannot be
  changed without changing all cell references. The program TLC.EXE takes
  referencing into account and adjusts accordingly.

  Since each cell has its own TLC file, a TLC file may not really contain
  all the information to construct a cell if it has lesser cells within it.
  In that case, the TLC files for the lesser cells will have to be present
  for conversion to internal form. When converting to external form, the
  TLC.EXE program is smart enough to make the TLC files of any lesser cells
  automatically.

  When conversion from external to internal is being done, the lesser cells
  will also be made in internal form if they are not already present in the
  drawing cell collection. You may optionally also replace any cells that
  are already there with new ones.
ÿ

Conversion Options

  The TLC.EXE program has 4 Conversion Options, two for conversion TO TLC
  and two FROM TLC:

  1.  Convert ALL Cells to TLC:
    ALL Cells are converted from the source to the destination. This is the
  standard drawing dump to TLC form.

  2.  Convert NAMED Cells to TLC:
    NAMED cells are converted to TLC from the source to the destination.
  Cells that are needed to construct a cell of greater rank are also
  converted as an option.

  3.  Convert ALL Cells from TLC:
    This requires that the CELLS.REF file exist at the source. The names of
  all the cells at the source are simply read from the CELLS.REF file in
  that location and are converted as if they had been named individually in
  Option 4. If the CELLS.REF file is missing at the source then Option 4
  only may be used.

  4.  Convert NAMED Cells from TLC:
    NAMED cells are converted to internal files. The CELLS.DBD file at the
  destination is augmented with the NAMED cell. If lesser cells are needed
  they are also converted from the source TLC into internal files at the
  destination. If the cells are not present at the destination they will be
  converted automatically. If the lesser cells are present at the
  destination you will have the option to replace them with new ones.
  Therefore, to fully reconstruct a cell from TLC, all lesser cells must be
  present either in the source or destination cell collections in TLC or
  internal form.

  When converting back from TLC form, the TLC program knows if a cell is in
  the destination by reading the CELLS.DBD file. TLC will replace the named
  cell but will OPTIONALLY replace lesser cells, the cells within the named
  cell. If any cells do not exist in the drawing cell collection they will
  be made.

  If the CELLS.DBD file is not present at the destination, then one is
  made.

  To convert a complete layout drawing from TLC, you start with a blank
  directory, and name the main drawing cell to be converted (or use Option
  3). The TLC program then reconstructs the whole drawing by making all
  lesser cells first, and then the named main cell.

  In all options the CONSTS.DBD file of the source or destination directory
  is left unaffected. If a drawing is reconstructed from TLC, you must load
  your favorite CONSTS.DBD file, or let LASI provide a default one when it
  starts up.
ÿ

Running TLC.EXE

  When running TLC.EXE you pass parameters as arguments on the DOS command
  line. Arguments are separated by one or more spaces.

  The FIRST parameter is the CONVERSION DIRECTION consisting of the brace
  characters "{" or "}". The direction is indicated by how the brace points
  at "tlc".  For example, "tlc { etc." converts to TLC form.

  The SECOND is the SOURCE path, the disk name or "." for the current
  directory.

  The THIRD is the DESTINATION path, the disk name or "." for the current
  directory.

  The NEXT parameters are needed only if options 2 or 4 are be used, and
  are a list of up to 10 NAMES of cells to be converted according to that
  option.

  Hint:  Run the TLC.EXE program without any arguments to get HELP.

  Important:  The FORM.DBD file must always be present in the directory
  where the internal (.BPV and .CEL) files exist or are to be generated.
  TLC.EXE needs this information to allocate space.


  Things to remember when converting:

    ù The first THREE parameters MUST be present to be counted correctly.

    ù For options 1 and 3 the file CELLS.DBD or CELLS.REF must be in the
      source directory.

    ù If there are no NAME parameters, options 1 and 3 are assumed and
      performed according the the direction of the brace character.
ÿ

The CELLS.REF File

  As TLC makes it, the CELLS.REF file is a copy of CELLS.DBD.

  You may change the CELLS.REF file to convert modified lists of cells into
  Internal form.

  To remove a cell, delete the cell's name and the data line that follows
  it in the CELLS.REF file.

  To add a cell, insert the cell's name on a single line and then the
  cell's rank on the next line. You don't need any additional data on the
  second line.

  The entry on the first line of the CELLS.REF file is the number of cells
  in the file. If you add or delete cells, you should adjust this number.
  When TLC converts to Internal form using CELLS.REF, it counts either to
  the number of cells it reads on the first line or to the end of the file,
  whichever comes first.

  Do all this with a text editor that produces standard DOS text files.
ÿ

TLC Format Details

  Cell files in TLC have a record structure. The are presently four kinds
  of records: Header, Cell, Box and Path.  The Header record contains
  useful information regarding the cell being translated, most important,
  the rank and scale of the cell.

  The records for the objects in the cell are preceded by an "equals code"
  consisting of two characters: the first being "=" and the second being
  "H", "C", "B" or "P" for Header, Cell, Box or Path respectivly. The TLC
  program then looks for the type of object to be made and acts
  accordingly. If at some time in the future, other objects are added to
  LASI, similar code will be used.

  If a data error is encountered during translation, it is possible that
  one or two objects may be incorrectly reconstructed from TLC. The equals
  code will try to resynchronize the data and correct translation will then
  resume. The Header record contains an object count and this is compared
  to the actual number of objects made, and miscounts are indicated by the
  TLC program.

  All records, including the Header, may be written in any order in a TLC
  file.


  Header Record:      <nl>= carriage return + linefeed    <sp>= space

      1= "=H" (literal)<nl>
      2= Name of Cell (DOS file name)<nl>
      3= Version of LASI (literal)<nl>
      4= Version of TLC (literal)<nl>
      5= Basic Units per Physical Unit<nl>
      6= Name of Physical Unit (literal)<nl>
      7= Date of Cell Conversion (literal)<nl>
      8= Time of Cell Conversion (literal)<nl>
      9= Rank of Cell<sp>
      10= Left Outline Boundary in basic units<sp>
      11= Bottom Boundary in basic units<sp>
      12= Right Boundary in basic units<sp>
      13= Top Boundary in basic units<nl>
      14= Number of Boxes<sp>
      15= Number of Paths<sp>
      16= Number of Vertices<sp>
      17= Number of Cells<nl>

      Note:  Versions must begin with a numeric character

  Cell Record Entries:

      1= "=C" (literal)<nl>
      2= Name of Lesser Cell<nl>
      3= Orientation (see below)<sp>
      4= X Position in basic units<sp>
      5= Y Position in basic units<sp>
      6= reserved (presently zero)<nl>

      Orientation Number: (0-15)
        16 bit integer, all bits 0 except:

          Bit 4,
            0= draw cell fully
            1= draw cell outline

          Bit 3,
            0= cell not flipped
            1= cell is flipped in X before rotation

          Bits 2 and 1,
            0,0 = no rotation
            0,1 = 90 deg rotation CCW
            1,0 = 180 deg rotation CCW
            1,1 = 270 deg rotation CCW

  Box Record Entries:

      1= "=B" (literal)<nl>
      2= Layer of Box<sp>
      3= X of Lower Left Corner in basic units<sp>
      4= Y of L ower Left  Corner in basic units<sp>
      5= X of Upper Right Corner in basic units<sp>
      6= Y of Upper Right Corner in basic units<nl>

  Path/Poly Record Entries:

      1= "=P" (literal)<nl>
      2= Layer Of Path/Poly<sp>
      3= Width in basic units<sp>
      4= No. of Vertices in path/poly<nl>
      5= Vertices in basic units in the form:
      X1<sp>Y1<sp>X2<sp>Y2<sp>X3<sp>Y3<sp>X4<sp>Y4<sp>X5<sp>Y5<nl>
      .......Xn-1<sp>Yn-1<sp>Xn<sp>Yn<nl>

      (Groups of 5 coordinates separated by <sp> ended by <nl>,
      always with <nl> after Last Coordinate Pair)
ÿ
