thumb|Librascope LGP-30 (with cover in place).
thumb|An LGP-30 in use at [[Manhattan College (1965).]]
thumb|250px|LGP-30 at [[The Computer Museum, Boston, with cover removed. Control panel is at top center, to the left of the memory drum.]]
The LGP-30, standing for Librascope General Purpose and then Librascope General Precision, is an early off-the-shelf computer. It was manufactured by the Librascope company of Glendale, California (a division of General Precision Inc.), and sold and serviced by the Royal Precision Electronic Computer Company, a joint venture with the Royal McBee division of the Royal Typewriter Company. The LGP-30 was first manufactured in 1956, at a retail price of $47,000, .
The LGP-30 was commonly referred to as a desk computer. Its height, width, and depth, excluding the typewriter shelf, was . It weighed about , and was mounted on sturdy casters which facilitated moving the unit.
Design
thumb|The LGP-30 control panel.
thumb|German control panel.
The primary design consultant for the Librascope computer was Stan Frankel, a Manhattan Project veteran and one of the first programmers of ENIAC, assisted by James Cass, at the time a graduate student at Caltech. They designed a usable computer with a minimal amount of hardware.
{|style="text-align:center;"
|style="width:15px;"|00
|style="width:15px;"|
|style="width:15px;"|
|style="width:15px;"|
|style="width:15px;"|
|style="width:15px;"|
|style="width:15px;"|
|style="width:15px;"|
|style="width:15px;"|
|style="width:15px;"|
|style="width:15px;"|
|style="width:15px;"|11
|style="width:15px;"|12
|style="width:15px;"|
|style="width:15px;"|
|style="width:15px;"|15
|style="width:15px;"|16
|style="width:15px;"|17
|style="width:15px;"|18
|style="width:15px;"|
|style="width:15px;"|
|style="width:15px;"|
|style="width:15px;"|
|style="width:15px;"|23
|style="width:15px;"|24
|style="width:15px;"|
|style="width:15px;"|
|style="width:15px;"|
|style="width:15px;"|
|style="width:15px;"|29
|style="width:15px;"|30
|-
|colspan="12" style="background-color:#CCC;"|000000000000
|colspan="4" style="background-color:#99F;"|Order
|colspan="2" style="background-color:#CCC;"|00
|colspan="6" style="background-color:#9F9;"|Track
|colspan="6" style="background-color:#9C9;"|Sector
|colspan="1" style="background-color:#CCC;"|0
|}
{|class="wikitable"
!Example || Order || Operation
|-
!b 2000
|0001 || <code>Bring from Memory:</code> Replace the contents of the accumulator with the contents of memory location 2000. The contents of memory location 2000 is unaffected.
|-
!h 2000
|1100 || <code>Hold and Store:</code> Replace the contents of memory location 2000 with the contents of the accumulator. The contents of the accumulator is unaffected.
|-
!c 2000
|1101 || <code>Clear and Store:</code> Replace the contents of memory location 2000 with the contents of the accumulator and replace the contents of the accumulator with zero.
|-
!y 2000
|0010 || <code>Store Address:</code> Replace the contents of the address portion of the word in memory location 2000 with the contents of the address portion of the word in the accumulator. The contents of the accumulator is unaffected. The LGP-30 has no index register. Y can be used to self-modify code to index an array.
|-
!u 2000
|1010 || <code>Unconditional transfer:</code> Replace the number in the (program) counter register with the contents of the address portion of the unconditional transfer instruction.
|-
!r 2000
|0011 || <code>Return address:</code> Add one to the contents of the (program) counter register and replace the address portion of memory location 2000 with the contents of the counter register. This instruction is used to patch an <code>unconditional transfer</code> instruction at the end of a subroutine to direct it to return to the caller. R is followed immediately with a branch instruction to the beginning of the subroutine. R can also be used to patch a <code>Test</code> instruction to create a conditional return.
|-
!t 2000
|1011 || <code>Test:</code> (Conditional transfer) If a one is in the sign bit of the word in the accumulator, the test instruction has the effect of an unconditional transfer. If a zero is in the sign bit of the word in the accumulator, the next following instruction in normal sequence is executed.
|-
!z 0000
|0000 || <code>Stop:</code> Stop computation. If computation is to stop, the address portion of the stop instruction is usually of no significance. However, the stop order has a special characteristic. If there is a one in the third bit from the right hand end of the track portion of a stop instruction, computation does not stop if break point switch 4 on the console of the computer is depressed. Four break point switches are supported by the z instruction.
|-
!p 2000
|1000 || <code>Print:</code> Execute the typewriter keyboard function indicated by the 6 track bits. The print order has no effect on the contents of any memory location, the accumulator, or the counter register. For example, p 2000 has 010100 in the track bits which is the code for a back space on the typewriter. The execution of p 2000 results in the typewriter back spacing.
|-
!i 0000
|0100 || <code>Input:</code> The address portion of the instruction constructed from this order is always 0000. It is always preceded by the instruction p 0000. After a p 0000 instruction starts the tape reader, an i 0000 instruction transfers into the last 4 bit positions of the accumulator the first 4 bits of the typewriter code for the first character read on the tape. When the second character is read, the bits representing the first character are shifted left into the next to last four bit positions of the accumulator and the first four bits of the typewriter code of the second character on tape are placed in the last four bit positions of the accumulator. This process continues up to eight times to fill the entire accumulator until a stop code (100000) appears on the tape. The stop code stops the tape reader and sends a start signal to the computer so that the instruction following i 0000 in memory is executed. Often this next instruction is a h or c instruction so that the characters read into the accumulator can be stored in some memory location.
|-
!a 2000
|1110 || <code>Add:</code> Add the contents of memory location 2000 to the contents of the accumulator and place the result in the accumulator. The contents of memory location 2000 is unaffected.
|-
!s 2000
|1111 || <code>Subtract:</code> Subtract the contents of memory location 2000 from the contents of the accumulator and place the result in the accumulator. The contents of memory location 2000 is unaffected.
|-
!m 2000
|0111 || <code>Multiply upper:</code> Multiply the number in the accumulator by the number in memory location 2000 and place the most significant thirty bits of the product in the accumulator. The contents of memory location 2000 is unaffected.
|-
!n 2000
|0110 || <code>Multiply lower:</code> Multiply the number in the accumulator by the number in memory location 2000 and place the least significant thirty-one magnitude bits of the product in the sign bit and thirty magnitude bits of the accumulator. The contents of memory location 2000 is unaffected.
|-
!d 2000
|0101 || <code>Divide:</code> Divide the number in the accumulator by the number in memory location 2000 and place the quotient rounded to thirty bits in the accumulator. The contents of memory location 2000 is unaffected.
|-
!e 2000
|1001 || <code>Extract:</code> Place zeroes in the word in the accumulator wherever there are zeroes in location 2000 but otherwise leave the word in the accumulator unchanged. The contents of location 2000 is unaffected. This is the equivalent of an AND instruction on most computers.
|}
===ACT-III programming language===<!-- This section is linked from Alphabetical list of programming languages -->
The LGP-30 had a high-level language called ACT-III. Every token had to be delimited by an apostrophe, making it hard to read and even harder to prepare tapes:
<pre><nowiki>
s1'dim'a'500'm'500'q'500
index'j'j+1'j-1
daprt'e'n't'e'r' 'd'a't'acr
rdxit's35
s2'iread'm'1iread'q'1iread'diread'n
1';'j
0'flo'd';'d.
s3'sqrt'd.';'sqrd.
1'unflo'sqrd.'i/'10';'sqrd
2010'print'sqrd.2000'iprt'sqrdcrcr
...
</nowiki></pre>
ALGOL 30
Dartmouth College developed two implementations of ALGOL 60 for the LGP-30. Dartmouth ALGOL 30 is a three-pass system (compiler, loader, and interpreter) that provides almost all features of ALGOL except those requiring run-time storage allocation. SCALP, a Self Contained Algol Processor, is a one-pass system for a small subset of ALGOL: no blocks other than the entire program, no procedure declarations, conditional statements but no conditional expressions, no constructs other than <code>while</code> in a <code>for</code> statement, no nested <code>switch</code> declarations (nested calls are permitted), and no Boolean variables or operators. As in ACT-III, every token had to be separated by an apostrophe.
DICTATOR
DICTATOR is a convoluted acronym for DODCO Interpretive Code for Three Address with Technical Optimum Range. DICTATOR, introduced in 1959, is an interpreter designed to hide the LGP-30 machine details from the programmer. The programming language resembles three-operand assembly code with two source operands and one destination operand. All numbers are in floating point with an eight digit mantissa and two digit exponent. Natural logs and exponents are supported along with sin, cos, and arctan. Up to four nested loops are supported. Table look-up and block memory move operations are implemented. A bit more than half the total LGP-30 memory is used by the interpreter; it takes about 30 minutes to load the paper tape via the Flexowriter. Floating point add, subtract, multiply, and divide take less than 455 milliseconds each. Cosine is calculated in 740 milliseconds.
Starting the machine
The procedure for starting, or "booting" the LGP-30 was complicated. First, the bootstrap paper tape was snapped into the console typewriter, a Friden Flexowriter. The operator pressed a lever on the Flexowriter to read an address field and pressed a button on the front panel to transfer the address into a computer register. Then the lever on the Flexowriter was pressed to read the data field and three more buttons were pressed on the front panel to store it at the specified address. This process was repeated, maybe six to eight times, and a rhythm was developed:
burrrp, clunk,
burrrp, clunk, clunk, clunk,
burrrp, clunk,
burrrp, clunk, clunk, clunk,
burrrp, clunk,
burrrp, clunk, clunk, clunk,
burrrp, clunk,
burrrp, clunk, clunk, clunk,
burrrp, clunk,
burrrp, clunk, clunk, clunk,
burrrp, clunk,
burrrp, clunk, clunk, clunk.
The operator then removed the bootstrap tape, snapped in the tape containing the regular loader, carefully arranging it so it would not jam, and pressed a few more buttons to start up the bootstrap program. Once the regular loader was in, the computer was ready to read in a program tape. The regular loader read a more compact format tape than the bootstrap loader. Each block began with a starting address so the tape could be rewound and retried if an error occurred. If any mistakes were made in the process, or if the program crashed and damaged the loader program, the process had to be restarted from the beginning. Similar to the LGP-30, but transistorized, it featured 8,008 32-bit words of memory drum storage. It had 500 transistors and 4,500 diodes, sold for $87,500 (), and weighed .
LGP-21
In 1963, Librascope produced a transistorized update to the LGP-30 named the LGP-21. The new computer had about 460 transistors and about 375 diodes. It cost only US$16,250 (), one-third the price of its predecessor. However, it was also about one-third as fast as the earlier computer.
The central computer weighed about , the basic system (including printer and stands) about .
Notable uses
Edward Lorenz used the LGP-30 in his attempt to model changing weather patterns. His discovery that massive differences in forecast could derive from tiny differences in initial data led to him coining the terms strange attractor and butterfly effect, core concepts in chaos theory.
</references>
Bibliography
External links
- Working LGP-30 on display in Stuttgart, Germany
- LGP-30 description
- LGP-21 description
- 1962 advertisement showing both the LGP-30 and RPC-4000
- Story of Stan P. Frankel, designer of the LGP-30, with photos.
- Programming manual
- Warming up the LGP-30 on YouTube
- technikum 29: LGP 30
- 1950-1959 Librazettes – company newsletters on LGP-30:
