BLISS
Encyclopedia
BLISS is a system programming language
System programming language
System programming languages are programming languages that are statically typed, allow arbitrarily complex data structures, are compiled, and are meant to operate largely independently of other programs. Prototypical system programming languages are C and Modula-2...

 developed at Carnegie Mellon University
Carnegie Mellon University
Carnegie Mellon University is a private research university in Pittsburgh, Pennsylvania, United States....

 by W. A. Wulf, D. B. Russell, and A. N. Habermann around 1970. It was perhaps the best known systems programming language right up until C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

 made its debut a few years later. Since then, C took off and BLISS faded into obscurity. When C was in its infancy, a few projects within Bell Labs
Bell Labs
Bell Laboratories is the research and development subsidiary of the French-owned Alcatel-Lucent and previously of the American Telephone & Telegraph Company , half-owned through its Western Electric manufacturing subsidiary.Bell Laboratories operates its...

 were debating the merits of BLISS vs. C.

BLISS is a typeless block-structured language based on expressions rather than statements, and includes constructs for exception handling
Exception handling
Exception handling is a programming language construct or computer hardware mechanism designed to handle the occurrence of exceptions, special conditions that change the normal flow of program execution....

, coroutine
Coroutine
Coroutines are computer program components that generalize subroutines to allow multiple entry points for suspending and resuming execution at certain locations...

s, and macros. It does not include a goto
Goto
goto is a statement found in many computer programming languages. It is a combination of the English words go and to. It performs a one-way transfer of control to another line of code; in contrast a function call normally returns control...

 statement.

The name is variously said to be short for "Basic Language for Implementation of System Software" or "System Software Implementation Language, Backwards". It was sometimes called "Bill's Language for Implementing System Software", after Bill Wulf.

The original Carnegie Mellon compiler
Compiler
A compiler is a computer program that transforms source code written in a programming language into another computer language...

 was notable for its extensive use of optimization
Compiler optimization
Compiler optimization is the process of tuning the output of a compiler to minimize or maximize some attributes of an executable computer program. The most common requirement is to minimize the time taken to execute a program; a less common one is to minimize the amount of memory occupied...

s, and formed the basis of the classic book The Design of an Optimizing Compiler
The Design of an Optimizing Compiler
The Design of an Optimizing Compiler , by William Wulf, Richard K. Johnson, Charles B. Weinstock, Steven O. Hobbs, and Charles M. Geschke, was published in 1975 by Elsevier. It describes the BLISS compiler for the PDP-11, written at Carnegie Mellon University in the early 1970s...

.

DEC
Digital Equipment Corporation
Digital Equipment Corporation was a major American company in the computer industry and a leading vendor of computer systems, software and peripherals from the 1960s to the 1990s...

 developed and maintained BLISS compilers for the PDP-10
PDP-10
The PDP-10 was a mainframe computer family manufactured by Digital Equipment Corporation from the late 1960s on; the name stands for "Programmed Data Processor model 10". The first model was delivered in 1966...

, PDP-11
PDP-11
The PDP-11 was a series of 16-bit minicomputers sold by Digital Equipment Corporation from 1970 into the 1990s, one of a succession of products in the PDP series. The PDP-11 replaced the PDP-8 in many real-time applications, although both product lines lived in parallel for more than 10 years...

, DEC Alpha
DEC Alpha
Alpha, originally known as Alpha AXP, is a 64-bit reduced instruction set computer instruction set architecture developed by Digital Equipment Corporation , designed to replace the 32-bit VAX complex instruction set computer ISA and its implementations. Alpha was implemented in microprocessors...

, DEC PRISM
DEC PRISM
PRISM was a 32-bit RISC instruction set architecture developed by Digital Equipment Corporation . It was the final outcome of a number of DEC research projects from the 1982–1985 time-frame, and was at the point of delivering silicon in 1988 when the management canceled the project...

, Intel IA-32
IA-32
IA-32 , also known as x86-32, i386 or x86, is the CISC instruction-set architecture of Intel's most commercially successful microprocessors, and was first implemented in the Intel 80386 as a 32-bit extension of x86 architecture...

, Intel IA-64, and VAX
VAX
VAX was an instruction set architecture developed by Digital Equipment Corporation in the mid-1970s. A 32-bit complex instruction set computer ISA, it was designed to extend or replace DEC's various Programmed Data Processor ISAs...

, and used it heavily in-house into the 1980s; most of the utility programs for the VMS operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

 were written in BLISS-32.

Language description

The BLISS language has the following characteristics:
  • All constants are full word for the machine being used, e.g. on a 16-bit machine such as the PDP-11
    PDP-11
    The PDP-11 was a series of 16-bit minicomputers sold by Digital Equipment Corporation from 1970 into the 1990s, one of a succession of products in the PDP series. The PDP-11 replaced the PDP-8 in many real-time applications, although both product lines lived in parallel for more than 10 years...

    , a constant is 16 bits; on a VAX
    VAX
    VAX was an instruction set architecture developed by Digital Equipment Corporation in the mid-1970s. A 32-bit complex instruction set computer ISA, it was designed to extend or replace DEC's various Programmed Data Processor ISAs...

     computer, constants are 32 bits, and on a PDP-10
    PDP-10
    The PDP-10 was a mainframe computer family manufactured by Digital Equipment Corporation from the late 1960s on; the name stands for "Programmed Data Processor model 10". The first model was delivered in 1966...

    , a constant is 36 bits.

  • A reference to a variable is always to the address of that variable. For example, the instruction Z+8 refers to adding 8 to the address of Z, not to its value. If one needs to add 8 to the value of Z, one must prefix the variable with a period; so one would type .Z+8 to perform this function, which adds 8 to the contents of Z.

  • Assignment is done with the standard = symbol, e.g. Z=8 – which says to create a full-word constant containing 8, and store it in the location whose address corresponds to that of Z. So, you can do something like Z+12=14 (or, alternatively 12+Z=14) which places the constant 14 into the address which is 12 words more than the address of Z. (This is considered bad practice.)

  • Block statements are similar to those of ALGOL
    ALGOL
    ALGOL is a family of imperative computer programming languages originally developed in the mid 1950s which greatly influenced many other languages and became the de facto way algorithms were described in textbooks and academic works for almost the next 30 years...

    : a block is started with a BEGIN statement and terminated with END. As with ALGOL, statements are terminated with the semicolon (";"). When a value is computed, it is saved until the next statement terminator – which means that a value can be computed, assigned to a variable, and carried forward to the next statement, if desired. Alternatively, an open parenthesis may be used to begin a block, with the close parenthesis used to close the block. When parentheses are included in an expression, the standard precedence
    Precedence
    Precedence may refer to:* Message precedence of military communications traffic* Order of precedence, the ceremonial hierarchy within a nation or state* Order of operations, in mathematics and computer programming...

     rules are used, in which parenthesized expressions are computed first,

  • Conditional execution uses the IF expression, which tests a true-false condition, performs alternative actions, and returns a result.

  • Comparison uses keywords such as EQL for equality (as opposed to overloading
    Operator overloading
    In object oriented computer programming, operator overloading—less commonly known as operator ad-hoc polymorphism—is a specific case of polymorphism, where different operators have different implementations depending on their arguments...

     the = symbol for the same purpose), GTR for Greater Than, and NEQ for not equal. For example, the following code will assign the absolute value of Z to the address indicated by Q:

Q = (IF .Z GTR 0 THEN .Z ELSE -.Z);

  • Identifiers (variables and constants) must be declared before use, typically using the OWN keyword. Declaring a variable normally causes the compiler to allocate space for it; when necessary, a variable may be assigned a fixed machine address via the BIND declaration. This feature is primarily used for accessing either machine registers or certain special addresses.

  • Subroutines in the language are called routines, and are declared with the keyword ROUTINE.

  • Macros, which allow for text substitution, are declared with the keyword MACRO.

  • The language supports arrays, which are referred to as structures, and declared with the keyword VECTOR.

  • The language supports some high-level programming constructs such as
    • Alternative execution paths via the CASE expression
    • Looping through use of the INCR expression, which is similar to ALGOL's FOR statement
    • Built-in string functions
    • Certain automatic data conversions (number to string, etc.)

Source example

The following example is taken verbatim from the Bliss Language Manual cited above:


MODULE E1 (MAIN = CTRL) =
BEGIN
FORWARD ROUTINE
CTRL,
STEP;
ROUTINE CTRL =
!+
! This routine inputs a value, operates on it, and
! then outputs the result.
!-
BEGIN
EXTERNAL ROUTINE
GETNUM, ! Input a number from terminal
PUTNUM; ! Output a number to terminal
LOCAL
X, ! Storage for input value
Y; ! Storage for output value
GETNUM(X);
Y = STEP(.X);
PUTNUM(.Y)
END;
ROUTINE STEP(A) =
!+
! This routine adds 1 to the given value.
!-
(.A+1);
END
ELUDOM

Versions

  • BLISS-10
  • BLISS-11 - a cross compiler
    Cross compiler
    A cross compiler is a compiler capable of creating executable code for a platform other than the one on which the compiler is run. Cross compiler tools are used to generate executables for embedded system or multiple platforms. It is used to compile for a platform upon which it is not feasible to...

    for the PDP-11
  • BLISS-16
  • BLISS-16C - DEC version of BLISS-11
  • BLISS-32
  • BLISS-36
  • BLISS-64
  • Common BLISS - portable subset

External links


Downloads

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK