BLISS Language Reference Manual
 *HyperReader
  Next     Previous     Contents     Tables     Index     Close     Help  
  1.5  Program Transportability

  Transportability of software is the use of the same source
  program in more than one system environment.  The ba-
  sis for transportable programming in BLISS is the extensive
  language base referred to as Common BLISS. In addition,

  BLISS provides many specific facilities that aid in achieving
  transportability along with efficiency, either through pa-
  rameterization of Common BLISS constructs, or conditional
  or compartmented use of dialect-specific code.  The major
  facilities that support transportable programming are the
  following:

  *   Predefined data structures (for example, VECTOR,
      BITVECTOR, and BLOCK) that allow commonly used
      data structures to be allocated and accessed efficiently in
      each target environment.

  *   Predefined literals that reflect the parameters of the tar-
      get architectures in terms of bits.  These literals can be
      used, for example, to parameterize data declarations and
      storage references for greatest efficiency on each intended
      target system.
      A listing of the predefined literals and their values for
      each target system follows.

                                                Value in:
                                     BLISS-    BLISS-

      Name       Meaning             16        32        BLISS-36
      %BPVAL   Bits per BLISS        16        32        36
                 value
      %BPUNIT  Bits per address-     8         8         36
                 able unit
      %BPADDR  Bits per address      16        32        18 or 31
                 value

      %UPVAL   Units per BLISS       2         4         1
                 value

      1
       Depending on the target-system CPU.

  *   User-definable data structures and named fields.  The
      structure definition is a representation of the accessing
      algorithm, and it can make use of the predefined liter-
      als to provide field packing that is optimal for each target
      architecture.

  *   Character-string functions that permit efficient manip-
      ulation of string data regardless of the representation on
      the target architecture.  Examples:  CH$PTR creates a
      character-string pointer, CH$MOVE moves a character
      string, and CH$COMPARE compares the value of two
      strings.  There are 25 such functions.

  *   Compile-time conditionals that allow compiled code to be
      explicitly different for different target architectures.

  *   A powerful macro facility that allows for different ex-
      pansions for different target systems; for example,

      %BLISS32(BYTE) expands to its parameters (BYTE
      in this case) only if being compiled by the BLISS-32 com-
      piler.  Macros can also be used to segregate code sequences
      that differ for each architecture.

  *   REQUIRE and library files.  Sets of common defini-
      tions can be kept in files that are selectively included in
      compilations through use of the REQUIRE or library
      declarations.  This is a simple and efficient method of
      sharing common data structures and definitions between
      modules in a conditional fashion.  It also permits compile-
      time conditionals and parameterized definitions to be
      maintained separately from the code in the modules.

  Next     Previous     Contents     Tables     Index     Close     Help     ~Off