CESIL

Print Print
Reading time 5:1

CESIL, or Computer Education in Schools Instruction Language,[1] is a programming language designed to introduce pupils in British secondary schools to elementary computer programming. It is a simple language containing a total of fourteen instructions.

Background

Computer Education in Schools (CES) was a project developed in the late 1960s and early 1970s by International Computers Limited (ICL).[2] CESIL was developed by ICL as part of the CES project, and introduced in 1971.[3] In those days, very few if any schools had computers, so pupils would write programs on coding sheets, which would then be transferred to punched cards or paper tape.[4] Typically, this would be sent to run on a mainframe computer, with the output from a line printer being returned later.[5]

Structure

Because CESIL was not designed as an interactive language, there is no facility to input data in real time. Instead, numeric data is included as a separate section at the end of the program.[6]

The fundamental principal of CESIL is the use of a single accumulator, which handles mathematical operations.[4] Numeric values are stored in variables, which in CESIL are referred to as store locations.[7] CESIL only works with integers, and results from DIVIDE operations are rounded if necessary.[8] There is no facility for structured data such as arrays, nor for string handling, though string constants can be output by means of the PRINT instruction.[4]

Jumps and loops can be conditional or non-conditional, and transfer operation of the program to a line with a specific label, which is identified in the first column of a coding sheet.[9] The instruction or operation is stated in the second column, and the operand in the third column.[10] On some coding sheets, comments and the text of the PRINT instruction would be written in a fourth column.[11]

Instructions

Instuctions, or operations, are written in upper case and may have a single operand, which can be a store location, constant integer value or line label. Store locations and line labels are alphanumeric, up to six characters, and begin with a letter.[12] Numeric integer constants are signed + or -, with zero being denoted as +0.[13][a]

Input and Output

  • IN - reads the next value from the data, and stores it in the accumulator.[4] The error message *** PROGRAM REQUIRES MORE DATA *** is printed if the program tries to read beyond the end of the data provided.[14]
  • OUT - prints the current value of the accumulator. No carriage return is printed.[15]
  • PRINT "text in quotes" - prints the given text. No carriage return is printed.[15]
  • LINE - prints a carriage return, thus starting a new line.[16]

Memory storage

  • Load value - place the immediate value or the contents of the variable named in the accumulator.
  • Store variable - place the contents of the accumulator in the variable.

Mathematical instructions

  • Add value - add the variable or immediate integer value to the accumulator.
  • Subtract value - subtract the variable or immediate integer from the accumulator.
  • Multiply value - place the product of the accumulator and the variable or immediate integer in the accumulator.
  • Divide value - place the contents of the accumulator divided by the value in the accumulator.

Program control

  • Jump label - transfer control to location labelled.
  • Jineg label - transfer control to location labelled if the accumulator contains a negative value.
  • Jizero label - transfer control to location labelled if the accumulator contains zero.
  • Halt - return control to console.

Examples

The following totals the integers in the runtime data section until it encounters a negative value and prints the total.

        LOAD    0
LOOP    STORE   TOTAL
        IN
        JINEG   DONE
        ADD     TOTAL
        JUMP    LOOP

DONE    PRINT   "The total is: "
        LOAD    TOTAL
        OUT
        LINE
        HALT

        %
        1
        2
        3
        -1

[Output of the above program running...] 
        The total is:  6

Bibliography

Monsoon, Colin C; Sewell, Ian R; Frances P, Vickers (1978). Computer Studies. Book 1. ICL Computer Education in Schools. ISBN 0 903885 17 4.

Notes

  1. ^ The Visual CESIL emulator does not require non-negative constants to be signed.

References

  1. ^ Computer Studies, page 71
  2. ^ "ICL-CES: Computer Education in Schools". Retrieved 16 June 2021.
  3. ^ Computer Studies, page v
  4. ^ a b c d Computer Studies, page 72
  5. ^ "My First Program". Retrieved 16 June 2021.
  6. ^ Computer Studies, page 82
  7. ^ Computer Studies, page 76
  8. ^ Computer Studies, pages 93-94
  9. ^ Computer Studies, page 148
  10. ^ Computer Studies, page 77
  11. ^ Computer Studies, page 74
  12. ^ Computer Studies, pages 96 and 148
  13. ^ Computer Studies, pages 97-99
  14. ^ Computer Studies, page 201
  15. ^ a b Computer Studies, page 73
  16. ^ Computer Studies, pages 199-200

By: Wikipedia.org
Edited: 2021-06-18 18:12:18
Source: Wikipedia.org