SIMPOL programming language
editThe SIMPOL language was devised by The School Mathematics Project [1] in the 1960s so as to introduce secondary pupils (typically aged 13) to what was then the novel concept of computer programming. It runs on the fictitious SIMON computer.
SIMON is illustrated in a line drawing as consisting of three units. A control desk incorporates a punched paper tape reader for the input of programs (which include data, see the Input instruction below) and a teleprinter that renders a readable printed record from punched tape output. The arithmetic unit offers the four fundamental operators of addition, subtraction, multiplication and division (Book 3), extended to include square root and absolute in [2]. Finally, the numbers being worked on are held in a storage unit that would be equivalent to the core store of its day, now simply referred to as memory.
There are eight storage locations addressed as S1 through to S8 inclusive. There is no specification for the numbers that can be held, but examples are given of positive numbers in conventional denary (decimal, base 10) with, optionally, a decimal point and some decimal places. The size of the program memory is unclear but said to be large enough for practical purposes and it is not explained where the program is held, presumably within the control desk.
The same chapter of Book 3 shows the punched tape code. Although a 5-unit code, it is different to ITA2 "Telex" code. It's a simple binary number substitution so A is coded as 1, B as 10 (2 in denary) up to Z as 11010 (26 in denary). Some of the odd parity codes double up as numerals with a letter shift character switching between alphabetic and numeric characters - which would fail in practice since it is not possible to define a start-up condition unless there is also an explicit number shift. No codes are given for decimal point or operators, space appears to be represented by a frame with no punching which is the same as the blank leader for physically feeding the tape into the reader. The covers of the textbooks illustrate a strip of punched tape coded in this way and reading "THE SCHOOL MATHEMATICS PROJECT DIRECTED BY BRYAN THWAITES" (a reference to Prof Bryan Thwaites) but the punch tape codes at the beginning of the chapter in Book 3 are meaningless.
There are three basic instructions in Book 3. Language extensions are introduced in Book 4. In the description below,
{number} is in denary and may be an integer and/or have a decimal fraction part
{store} is the storage location single digit 1-8 inclusive
{operator} is one of + - × ÷
{condition} is one of < ≤ > ≥ =
{line label} is an integer
Input {number} to S{store}
editExample:
Input 1.23 to S5
Replace S{store} by S{store}{operator}S{store}
editThe destination store can also be one of those operated upon because the operand stores are first transferred to the arithmetic unit, next the calculation is performed and only then is the result (re)placed in the destination store. Operands can only be a store, not literal constants. There is only one operation at a time, so students are forced to think in terms of breaking problems down into a series of small steps.
Example:
Replace S1 by S1+S2
takes the numbers in S1 and S2, sums them and then replaces S1 by this result.
The extensions in Book 4 are:
Replace S{store} by √S{store}
which finds the square root by a single instruction and
Replace S{store} by |S{store}|
to obtain the absolute value, ie no change for positive numbers but negative numbers become positive (equivalent to taking the square root of the square).
Output the number in S{store}
editExample:
Output the number in S1
In Book 3, SIMON only has the capability of a programmable calculator, rather than a full computer implementation, because there is no test/branch instruction. The concept of decisions leading to branching is introduced later in the same chapter in terms of the diamond box in flow diagrams, not as a computer language instruction.
Book 4 adds a new instruction:
if S{store} {condition} go to ({line label})
editLines may be labelled by numbers in brackets.
Example:
(8) Output the number in S3 (9) if S1 > S2 go to (8)