Content deleted Content added
Andy Dingley (talk | contribs) →Historical note: wl |
Andy Dingley (talk | contribs) wl, f. Needs more wikify though |
||
Line 1:
In 1957, [[Charles Leonard Hamblin]] invented the [[programming language]] '''GEORGE'''.<ref >C. L. Hamblin [1957]: ''An addressless coding scheme based on mathematical notation.'' Proceedings of the First Australian Conference on Computing and Data Processing, Salisbury, South Australia: Weapons Research Establishment, June 1957.</ref><ref >C. L. Hamblin [1957]: ''Computer Languages.'' The Australian Journal of Science, 20: 135-139. Reprinted in The Australian Computer Journal, 17(4): 195-198 (November 1985).</ref>▼
▲C. L. Hamblin [1957]: ''An addressless coding scheme based on mathematical notation.'' Proceedings of the First Australian Conference on Computing and Data Processing, Salisbury, South Australia: Weapons Research Establishment, June 1957.</ref>
It was designed around a push-down pop-up stack for arithmetic operations, and employed [[reverse Polish notation]].▼
▲It was designed around a push-down pop-up stack for arithmetic operations, and employed reverse Polish notation.
The language included loops, subroutines, conditionals, vectors, and matrices.
Algebraic expressions were written in reverse Polish notation; thus, <math>a + b</math> was written <code>a b +</code>, and similarly for the other arithmetic operations of subtraction, multiplication, and division.
The algebraic expression <math>ax^2 + bx + c</math> was written <code>a x dup × × b x × + c +</code>, where '<code>dup</code>' meant 'duplicate the value'.
Following the reverse Polish form, an assignment statement to evaluate the formula <math>y = ax^2 + bx + c</math> was written as <code>a x dup × × b x × + c + (y)
The computer evaluated the expression as follows: the values of <code>a</code>, then <code>b</code>, were pushed onto the top of the accumulator stack; 'dup' caused a copy of the top-most value (x) to be pushed onto the top of the accumulator stack; Multiply (×) caused the top two values, namely, <code>x</code> and <code>x</code>, to be removed (popped) and multiplied, returning the product to the top of the accumulator stack. The second multiply (×) then caused the top two values on the stack (namely, a and x**2) to be popped and multiplied, and the product (a×x**2) to be pushed onto the top of the accumulator stack. And so on the remaining components of the expression. The final operation, namely (y), returned the value of the expression to storage without changing the status of the accumulator stack.
Assuming that the value on the top of the accumulator stack was not required immediately, it would be removed (cleared) by using the operator (;).
Line 25 ⟶ 23:
(P)
</pre>
: The first line initialises the sum by pushing the value zero onto the top of the accumulator stack.
: The second line introduces a loop, is spoken as "for 1 to 10 repeat for j", and is terminated by the square bracket.
: In the third line, R causes one number to be read in and pushed onto the top of the accumulator stack, and the plus sign (+) causes that value to be added to the (partial) sum, leaving only the partial sum on the top of the accumulator stack.
Manipulation of vectors and matrices requires subscript notation. In GEORGE, the subscript(s) preceded the vector or matrix name. Thus A(j) was written <code>j | A</code>.
The following program reads in vector ''a'' of 10 values, then forms the squares of those values, and finally prints those values.
<pre>
Line 124 ⟶ 120:
In the first version running by May 1957 on an [[English Electric DEUCE]], all values were stored in binary fixed-point form in a 32-bit word, with 16 binary places.
In the second version introduced by 1958, values were held in floating-point form, with one value per word: 22 bits for the mantissa and 10 bits for the exponent.
Some form of coding table was needed because the printing equipment of the time provided only 26 letters of the alphabet, a decimal point, plus sign, minus sign, and slash.
==References==
{{Reflist}}
|