364 Part 4 The instruction-set processor level: special-function processors
Section 4÷ Processors based on a programming language
such innovations as subroutines, etc. In addition, the usual "built in" subroutines SIN (x), COS (x), etc., are not included. Their inclusion would require additional effort for their hardware implementation which did not appear to be worth expending at this time.
The FORTRAN statement types which are accepted by the machine as machine language are in the table that follows.^{1}
Statement |
Comment |
a = b |
The value of the arithmetic expression b is stored in the memory location referenced by the variable name a, which may have up to two subscripts. |
GO TO n |
Program control is transferred to the statement numbered n. |
GO TO (n_{1}, n_{2},..., n_{m}), i |
Program control is transferred to one of the statements numbered n_{1},. . . , n_{2 }depending on the value of i at the time this statement is executed. |
IF(e) n_{1}, n_{2}, n_{3} |
Program control is transferred to the statement numbered n_{1 }if the algebraic expression e is negative, to that numbered n_{2 }if e is zero, and to that numbered n_{3 }if e is positive. |
PAUSE |
Program execution is halted until restarted by console switch. |
DO n i = m_{1}, m_{2}, m_{3} |
All statements following this one in the program, including the statement numbered n, are executed repeatedly. The first execution is with i equal m_{1}, i is incremented by the value of m_{3 }before each succeeding execution. This continues until is greater than m_{2 }at which time program control is transferred either to the statement following n or to that statement required by the DO sequencing rules for DO nests. If m_{3 }is not given it is under stood to be 1. |
CONTINUE |
This statement has the effect of the "no operation" instruction in conventional machines. Program control goes to the next statement in the program unless the CONTINUE is the last statement in the range of a DO. In this case normal DO sequencing takes place. |
END |
This statement generates a control signal to start execution of the program. |
PRINT, List READ, List |
These statements cause data to be read or printed, respectively, in accordance with the specified list of variables which may be subscripted; however, the "implied DO" feature has not been implemented. No FORMAT control is available with this machine, therefore no statement number need be given. |
DIMENSION v, v, . . . |
This statement has the effect of reserving memory space for the subscripted variables v. Each v stands for a variable name followed by parentheses enclosing one or two constants. |
No distinction is made in this machine between fixed (integer) and floating point (real) variables. These may have names of any length, starting with any alphabetic character.
Fixed point constants may be specified, in a program or as data, as any combination of one to four numeric characters preceded by a + or - sign. however, these are converted to an internal decimal floating point number and so there are no restrictions on "mixed mode" expressions. Statement numbers must be unsigned fixed point constants, which are not so converted since they only affect program control and not arithmetic processing.
Floating point constants are specified in the form of a mantissa of one to four numeric symbols preceded by a decimal point (and a + or - sign). These are followed by the character E and a single (positive or negative) digit representing the power of ten in the usual scientific notation.
These constraints on number size and format are made to simplify certain circuits and could easily be relaxed if desired. The restriction to a two-subscript maximum for subscripted variables is similarly motivated.
Internally, all numerical data require three 8-bit words (Fig. 1). The first two words contain the four-digit mantissa, packed two per word in a 4-bit code for each digit. A decimal point is assumed to exist to the left of the most significant digit. The most significant two bits of the third word are zero. The third bit is 0 if the mantissa is positive, or 1 if it is negative, and similarly the fourth bit is 0 or 1 if the exponent is, respectively, positive or negative. The single exponent digit occupies the least significant four bits of this word. All other characters occupy a full 8-bit word of which the two most significant are l's. Any numeric characters which are symbols of a variable, e.g.. the "2" in AB2X, also occupy a full word of this type. Statement numbers are simply packed 2 digits per word and always occupy 2 full words.
Before proceeding with the description of the overall charac-
^{1Some familiarity with the FORTRAN language is assumed. previous | contents | next }