Content deleted Content added
GEORGE coding table added |
conditional transfers and subroutine calling was added |
||
Line 8:
and similarly for the other arithmetic operations of subtraction, multiplication, and division.
The algebraic expression
where 'dup' meant 'duplicate the value'.
Following the reverse Polish form, an assignment statement to evaluate the formula <math>y =
The computer evaluated the expression as follows: the values of a, then b, 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 (
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 45:
The third line fetches a(j), duplicates it, multiplies those two values giving the square, and then stores it in a(j). Note the semicolon (;), which clears (or cancels) the top entry in the accumulator stack. Were this not done, the accumulator would gradually fill up with the squares of the values.
The final line is a vector punch (i.e., print) to write out the ten squares.
{| class="wikitable" style="text-align: center; width: 200px; height: 200px;"
|+ GEORGE coding table<ref><i>Programming Course,</i> School of Electrical Engineering, The University of New South Wales, n.d., p. 24</ref>
|-
! scope="col" |
Line 83 ⟶ 82:
|-
! scope="row" | 7
| × || ↑ || 7 || 23 || h || x || (h) || (
|-
! scope="row" | 8
Line 109 ⟶ 108:
| > || || 15 || 31 || p || ω || (p) || (ω) || ||
|}
The above GEORGE coding table assisted in transcribing a program onto punch cards.
Conditional operations were written as jumps, as follows:
if a > 0 go to 5 (which transfers to label 5 if a is greater than zero)
would be written
<pre>0 a > 5 ↑ </pre>
Label 5 was indicated by including *5 elsewhere in the program.
Unconditional transfers were written 5↑
Subroutine calls were made with the down arrow, .g., to call subroutine labelled 17, write 17↓, where the label 17 was encoded using column 3 of the above table.
==Historical note==
Line 115 ⟶ 126:
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, decimal point, and slash.
==References==
<references/>
|