CESIL
{{Short description|Educational computer programming language}}
{{Distinguish|Cecil (programming language)}}
CESIL, or Computer Education in Schools Instruction Language,Computer Studies, page 71 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 that commenced in 1968 under the stewardship of the John Hoskyns Group.{{Cite news |date=January 1980 |editor-last=Sewell |editor-first=Ian |title=CES enters second decade |url=https://drive.google.com/file/d/1Dlfi4pzwxK3AIMETYjPO6MeUnAcWac44/view |work=ICL-CES Newsletter |pages=1}} CESIL was developed by Hoskyns as part of the CES project, and introduced in April 1969.{{Cite web |title=ICL_CES_Newletter_11_73_Electronics Weekly April 1969_CyrilCESIL.png |url=https://drive.google.com/file/d/18zxaDbSS-CHhBsz8lpjCPE1aPHS274YS/view?usp=sharing |access-date=2024-12-15 |website=Google Docs}} The project was taken over by International Computers Limited (ICL) in September 1969 to become ICL-CES. 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.Computer Studies, page 72 Typically, this would be sent to run on a mainframe computer, with the output from a line printer being returned later.{{Cite web|url=https://iclces.uk/articles/first_cesil_program.html|title=My First Program|access-date=16 June 2021|archive-date=24 June 2021|archive-url=https://web.archive.org/web/20210624195745/https://iclces.uk/articles/first_cesil_program.html|url-status=live}}
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.Computer Studies, page 82
The fundamental principle of CESIL is the use of a single accumulator, which handles mathematical operations. Numeric values are stored in variables, which in CESIL are referred to as store locations.Computer Studies, page 76 CESIL only works with integers, and results from DIVIDE operations are rounded if necessary.Computer Studies, pages 93–94 There is no facility for data structures such as arrays, nor for string handling, though string constants can be output by means of the PRINT instruction.
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.Computer Studies, page 148 The instruction or operation is stated in the second column, and the operand in the third column.Computer Studies, page 77 On some coding sheets, comments and the text of the PRINT instruction would be written in a fourth column.Computer Studies, page 74
Instructions
Instructions, 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.Computer Studies, pages 96, 148 Numeric integer constants must be signed + or −, with zero being denoted as +0.Computer Studies, pages 97–99{{refn|group=lower-alpha|Visual CESIL does not require non-negative constants to be signed.}}
=Input and output=
IN
– reads the next value from the data, and stores it in the accumulator. The error message*** PROGRAM REQUIRES MORE DATA ***
is printed if the program tries to read beyond the end of the data provided.Computer Studies, page 201OUT
– prints the current value of the accumulator. No carriage return is printed.Computer Studies, page 73PRINT "text in quotes"
– prints the given text. No carriage return is printed.LINE
– prints a carriage return, thus starting a new line.Computer Studies, pages 199–200
=Memory storage=
LOAD location
orLOAD constant
– copies the value of the given location or constant to the accumulator.Computer Studies, pages 80, 97–98STORE location
– copies the contents of the accumulator to the given location.
=Mathematical instructions=
ADD location
orADD constant
– adds the value of the given location or constant to the accumulator.Computer Studies, pages 84, 97–98SUBTRACT location
orSUBTRACT constant
– subtracts the value of the given location or constant from the accumulator.Computer Studies, pages 86, 97–98MULTIPLY location
orMULTIPLY constant
– multiplies the accumulator by the value of the given location or constant.Computer Studies, pages 90, 97–98DIVIDE location
orDIVIDE constant
– divides the accumulator by the value of the given location or constant.Computer Studies, pages 92, 97–98 The result is rounded down if the result is positive, and up if the result is negative. A*** DIVISION BY ZERO ***
error message is printed if the divisor is zero.Computer Studies, page 145
In each case, the result of the operation is stored in the accumulator, replacing the previous value.
=Program control=
JUMP label
– unconditionally transfers control to location labelled.Computer Studies, page 198JINEG label
(Jump If NEGative) – transfers control to location labelled if the accumulator contains a negative value.Computer Studies, page 154JIZERO label
(Jump If ZERO) – transfers control to location labelled if the accumulator contains zero.HALT
– terminates the program.
=Other symbols=
Three special symbols are used in CESIL at the beginnings of lines.
%
is used to mark the end of the program and the start of data.*
is used to mark the end of the data.Computer Studies, page 83(
is used at the start of a line to indicate a comment.Computer Studies, page 164{{refn|group=lower-alpha|Not supported in Visual CESIL. * is used instead.}}
CESIL programming tools
An emulator for CESIL, designed to run on Windows and called Visual CESIL, is available as freeware.{{Cite web|url=http://www.obelisk.me.uk/cesil/|title=Visual CESIL|author=Andrew John Jacobs|date=20 June 2010|access-date=26 November 2021|archive-url=https://web.archive.org/web/20210912192137/http://www.obelisk.me.uk/cesil/|archive-date=12 September 2021|url-status=dead}}
An interpreter for CESIL, designed to run on the Android platform and called Wyrm CESIL, is available as free to install.{{Cite web|url=https://play.google.com/store/apps/details?id=com.WyrmSoftware.WyrmCESIL|title=Wyrm CESIL|author=Wyrm Software|date=13 October 2019|access-date=25 November 2021|archive-date=25 November 2021|archive-url=https://web.archive.org/web/20211125015614/https://play.google.com/store/apps/details?id=com.WyrmSoftware.WyrmCESIL|url-status=live}}
Example
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
The output of the above program would be:
The total is: 6
See also
- Computer literacy
- Computers in the classroom
- History of computer science
- HAGGIS - language invented to standardise marking of programming work in Scottish schools
Bibliography
{{cite book |last1=Monson |first1=Colin C |last2=Sewell |first2=Ian R |first3=Vickers |last3=Frances P |date=1978 |title=Computer Studies |volume=Book 1 |format= |language= |location= |publisher=ICL Computer Education in Schools |isbn=0-903885-17-4}}
Notes
{{reflist |group=lower-alpha}}