Concepts of Programming Languages

(Sean Pound) #1
Variables were named with byte-pair codes, as were locations to be used as
constants. For example, X0 and Y0 could be variables. The statement

X0 = SQRT(ABS(Y0))

would be coded in a word as 00 X0 03 20 06 Y0. The initial 00 was used
as padding to fill the word. Interestingly, there was no multiplication code;
multiplication was indicated by simply placing the two operands next to each
other, as in algebra.
Short Code was not translated to machine code; rather, it was implemented
with a pure interpreter. At the time, this process was called automatic program-
ming. It clearly simplified the programming process, but at the expense of
execution time. Short Code interpretation was approximately 50 times slower
than machine code.

2.2.2 Speedcoding


In other places, interpretive systems were being developed that extended
machine languages to include floating-point operations. The Speedcoding
system developed by John Backus for the IBM 701 is an example of such a
system (Backus, 1954). The Speedcoding interpreter effectively converted the
701 to a virtual three-address floating-point calculator. The system included
pseudoinstructions for the four arithmetic operations on floating-point
data, as well as operations such as square root, sine, arc tangent, exponent,
and logarithm. Conditional and unconditional branches and input/output
conversions were also part of the virtual architecture. To get an idea of the
limitations of such systems, consider that the remaining usable memory after
loading the interpreter was only 700 words and that the add instruction took
4.2 milliseconds to execute. On the other hand, Speedcoding included the
novel facility of automatically incrementing address registers. This facility did
not appear in hardware until the UNIVAC 1107 computers of 1962. Because of
such features, matrix multiplication could be done in 12 Speedcoding instruc-
tions. Backus claimed that problems that could take two weeks to program in
machine code could be programmed in a few hours using Speedcoding.

2.2.3 The UNIVAC “Compiling” System


Between 1951 and 1953, a team led by Grace Hopper at UNIVAC developed a
series of “compiling” systems named A-0, A-1, and A-2 that expanded a pseudo-
code into machine code subprograms in the same way as macros are expanded
into assembly language. The pseudocode source for these “compilers” was still
quite primitive, although even this was a great improvement over machine code
because it made source programs much shorter. Wilkes (1952) independently
suggested a similar process.

2.2 Pseudocodes 41
Free download pdf