GEORGE (programming language)

Last updated

GEORGE (General Order Generator) is a programming language invented by Charles Leonard Hamblin in 1957. [1] [2] [3] [4] It was designed around a push-down pop-up stack for arithmetic operations, and employed reverse Polish notation. [5] The language included loops, subroutines, conditionals, vectors, and matrices.

Contents

Description

Algebraic expressions were written in reverse Polish notation; thus, was written a b +, and similarly for the other arithmetic operations of subtraction, multiplication, and division.

The algebraic expression was written a x dup × × b x × + c +, where 'dup' meant 'duplicate the value'.

Following the reverse Polish form, an assignment statement to evaluate the formula was written as a x dup × × b x × + c + (y).

The computer evaluated the expression as follows: the values of a, then x, 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, x and x, 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 (;).

The following program reads in eight values and forms their sum:

0, 1, 8 rep (j)    R + ] (P) 
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 8 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.
After the loop terminates, the (P) causes the final sum to be punched on a card.

Manipulation of vectors and matrices requires subscript notation. In GEORGE, the subscript(s) preceded the vector or matrix name. Thus A(j) was written j | A. The following program reads in vector a of 10 values, then forms the squares of those values, and finally prints those values.

1, 10 R1 (a) 1, 10 rep (j)    j | a dup * j | (a) ; ] 1, 10 P1 (a) 
In the program, the first line is a vector read that reads in the ten values into a(1) through a(10).
The second line introduces a loop to run through the ten values of j.
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.
GEORGE coding table [6]
1234567815
0/016aq(a)(q)logR
1,//117br(b)(r)exp(P)
2 ;~218cs(c)(s)pow
3*&319dt(d)(t)rem
4420eu(e)(u)sqrt
5+]521fv(f)(v)sin
6-622gw(g)(w)cos
7×723hx(h)(x)
8÷rep824iy(i)(y)R1
9negI925jz(j)(z)P1
10mod1026kα(k)(α)R11
11max1127lβ(l)(β)P11
12dup1228mγ(m)(γ)
13rev1329nλ(n)(λ)
14=1430Θμ(Θ)(μ)
15>1531pω(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

0 a > 5 ↑ 

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

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.

Related Research Articles

<span class="mw-page-title-main">EDSAC</span> 1940s-1950s British computer

The Electronic Delay Storage Automatic Calculator (EDSAC) was an early British computer. Inspired by John von Neumann's seminal First Draft of a Report on the EDVAC, the machine was constructed by Maurice Wilkes and his team at the University of Cambridge Mathematical Laboratory in England. EDSAC was the second electronic digital stored-program computer to go into regular service.

Forth is a procedural, stack-oriented programming language and interactive environment designed by Charles H. "Chuck" Moore and first used by other programmers in 1970. Although not an acronym, the language's name in its early years was often spelled in all capital letters as FORTH. The FORTH-79 and FORTH-83 implementations, which were not written by Moore, became de facto standards, and an official standardization of the language was published in 1994 as ANS Forth. A wide range of Forth derivatives existed before and after ANS Forth. The free software Gforth implementation is actively maintained, as are several commercially supported systems.

<span class="mw-page-title-main">PDP-8</span> Minicomputer product line

The PDP-8 is a 12-bit minicomputer that was produced by Digital Equipment Corporation (DEC). It was the first commercially successful minicomputer, with over 50,000 units being sold over the model's lifetime. Its basic design follows the pioneering LINC but has a smaller instruction set, which is an expanded version of the PDP-5 instruction set. Similar machines from DEC are the PDP-12 which is a modernized version of the PDP-8 and LINC concepts, and the PDP-14 industrial controller system.

Reverse Polish notation (RPN), also known as reverse Łukasiewicz notation, Polish postfix notation or simply postfix notation, is a mathematical notation in which operators follow their operands, in contrast to Polish notation (PN), in which operators precede their operands. It does not need any parentheses as long as each operator has a fixed number of operands. The description "Polish" refers to the nationality of logician Jan Łukasiewicz, who invented Polish notation in 1924.

A one-instruction set computer (OISC), sometimes called an ultimate reduced instruction set computer (URISC), is an abstract machine that uses only one instruction – obviating the need for a machine language opcode. With a judicious choice for the single instruction and given infinite resources, an OISC is capable of being a universal computer in the same manner as traditional computers that have multiple instructions. OISCs have been recommended as aids in teaching computer architecture and have been used as computational models in structural computing research. The first carbon nanotube computer is a 1-bit one-instruction set computer.

<span class="mw-page-title-main">Stack (abstract data type)</span> Abstract data type

In computer science, a stack is an abstract data type that serves as a collection of elements, with two main operations:

<span class="mw-page-title-main">Index register</span> CPU register used for modifying operand addresses

An index register in a computer's CPU is a processor register used for pointing to operand addresses during the run of a program. It is useful for stepping through strings and arrays. It can also be used for holding loop iterations and counters. In some architectures it is used for read/writing blocks of memory. Depending on the architecture it maybe a dedicated index register or a general-purpose register. Some instruction sets allow more than one index register to be used; in that case additional instruction fields may specify which index registers to use.

In computer science, computer engineering and programming language implementations, a stack machine is a computer processor or a virtual machine in which the primary interaction is moving short-lived temporary values to and from a push down stack. In the case of a hardware processor, a hardware stack is used. The use of a stack significantly reduces the required number of processor registers. Stack machines extend push-down automata with additional load/store operations or multiple stacks and hence are Turing-complete.

dc is a cross-platform reverse-Polish calculator which supports arbitrary-precision arithmetic. Written by Lorinda Cherry and Robert Morris at Bell Labs, it is one of the oldest Unix utilities, preceding even the invention of the C programming language. Like other utilities of that vintage, it has a powerful set of features but terse syntax. Traditionally, the bc calculator program was implemented on top of dc.

<span class="mw-page-title-main">IBM 1130</span> 16-bit IBM minicomputer introduced in 1965

The IBM 1130 Computing System, introduced in 1965, was IBM's least expensive computer at that time. A binary 16-bit machine, it was marketed to price-sensitive, computing-intensive technical markets, like education and engineering, succeeding the decimal IBM 1620 in that market segment. Typical installations included a 1 megabyte disk drive that stored the operating system, compilers and object programs, with program source generated and maintained on punched cards. Fortran was the most common programming language used, but several others, including APL, were available.

In computer programming, array slicing is an operation that extracts a subset of elements from an array and packages them as another array, possibly in a different dimension from the original.

Addressing modes are an aspect of the instruction set architecture in most central processing unit (CPU) designs. The various addressing modes that are defined in a given instruction set architecture define how the machine language instructions in that architecture identify the operand(s) of each instruction. An addressing mode specifies how to calculate the effective memory address of an operand by using information held in registers and/or constants contained within a machine instruction or elsewhere.

Stack-oriented programming is a programming paradigm which relies on a stack machine model for passing parameters. Stack-oriented languages operate on one or more stacks, each of which may serve a different purpose. Programming constructs in other programming languages need to be modified for use in a stack-oriented system. Most stack-oriented languages operate in postfix or Reverse Polish notation. Any arguments or parameters for a command are stated before that command. For example, postfix notation would be written 2, 3, multiply instead of multiply, 2, 3, or 2 multiply 3. The programming languages Forth, Factor, RPL, PostScript, BibTeX style design language and many assembly languages fit this paradigm.

The DEUCE was one of the earliest British commercially available computers, built by English Electric from 1955. It was the production version of the Pilot ACE, itself a cut-down version of Alan Turing's ACE.

KDF9 was an early British 48-bit computer designed and built by English Electric. The first machine came into service in 1964 and the last of 29 machines was decommissioned in 1980 at the National Physical Laboratory. The KDF9 was designed for, and used almost entirely in, the mathematical and scientific processing fields – in 1967, nine were in use in UK universities and technical colleges. The KDF8, developed in parallel, was aimed at commercial processing workloads.

<span class="mw-page-title-main">WDC 65C02</span> CMOS microprocessor in the 6502 family

The Western Design Center (WDC) 65C02 microprocessor is an enhanced CMOS version of the popular nMOS-based 8-bit MOS Technology 6502. The 65C02 fixed several problems in the original 6502 and added some new instructions, but its main feature was greatly lowered power usage, on the order of 10 to 20 times less than the original 6502 running at the same speed. The reduced power consumption made the 65C02 useful in portable computer roles and microcontroller systems in industrial settings. It has been used in some home computers, as well as in embedded applications, including medical-grade implanted devices.

The Mouse programming language is a small computer programming language developed by Dr. Peter Grogono in the late 1970s and early 1980s. It was developed as an extension of an earlier language called MUSYS, which was used to control digital and analog devices in an electronic music studio.

The 65xx family of microprocessors, consisting of the MOS Technology 6502 and its derivatives, the WDC 65C02, WDC 65C802 and WDC 65C816, and CSG 65CE02, all handle interrupts in a similar fashion. There are three hardware interrupt signals common to all 65xx processors and one software interrupt, the BRK instruction. The WDC 65C816 adds a fourth hardware interrupt—ABORT, useful for implementing virtual memory architectures—and the COP software interrupt instruction, intended for use in a system with a coprocessor of some type.

<span class="mw-page-title-main">HP 35s</span> Programmable scientific calculator produced by Hewlett-Packard

The HP 35s (F2215A) is a Hewlett-Packard non-graphing programmable scientific calculator. Although it is a successor to the HP 33s, it was introduced to commemorate the 35th anniversary of the HP-35, Hewlett-Packard's first pocket calculator. HP also released a limited production anniversary edition with shiny black overlay and engraving "Celebrating 35 years".

<span class="mw-page-title-main">Charles Leonard Hamblin</span>

Charles Leonard Hamblin was an Australian philosopher, logician, and computer pioneer, as well as a professor of philosophy at the New South Wales University of Technology in Sydney.

References

  1. Hamblin, Charles Leonard (May 1957). An Addressless Coding Scheme based on Mathematical Notation (Typescript). New South Wales University of Technology.
  2. Hamblin, Charles Leonard (June 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.
  3. Hamblin, Charles Leonard (1957). "Computer Languages". The Australian Journal of Science (20?): 135–139; Hamblin, Charles Leonard (November 1985). "Computer Languages". The Australian Computer Journal (Reprint). 17 (4): 195–198.
  4. Hamblin, Charles Leonard (1958). GEORGE IA and II: A semi-translation programming scheme for DEUCE: Programming and Operation Manual (PDF). School of Humanities, University of New South Wales, Kensington, New South Wales. Archived (PDF) from the original on 2020-04-04. Retrieved 2020-07-27.
  5. Beard, Bob (Autumn 1997) [1996-10-01]. "The KDF9 Computer — 30 Years On" (PDF). Resurrection - The Bulletin of the Computer Conservation Society. No. 18. Computer Conservation Society (CCS). pp. 7–15. ISSN   0958-7403. Archived (PDF) from the original on 2020-07-27. Retrieved 2020-07-27. […] The KDF9 is remarkable because it is the believed to be the first zero-address instruction format computer to have been announced (in 1960). It was first delivered at about the same time (early 1963) as the other famous zero-address computer, the Burroughs B5000 in America. Like many modern pocket calculators, a zero-address machine allows the use of Reverse Polish arithmetic; this offers certain advantages to compiler writers. It is believed that the attention of the English Electric team was first drawn to the zero-address concept through contact with George (General Order Generator), an autocode programming system written for a Deuce computer by the University of Sydney, Australia, in the latter half of the 1950s. George used Reversed Polish, and the KDF9 team were attracted to this convention for the pragmatic reason of wishing to enhance performance by minimising accesses to main store. This may be contrasted with the more `theoretical' line taken independently by Burroughs. Besides a hardware nesting store or stack - the basic mechanism of a zero-address computer - the KDF9 had other groups of central registers for improving performance which gave it an interesting internal structure. […] (NB. This is an edited version of a talk given to North West Group of the Society at the Museum of Science and Industry, Manchester, UK on 1996-10-01.)
  6. Programming Course. School of Electrical Engineering, The University of New South Wales. n.d. p. 24.