xcellassignment ::=xcell:=xacc|xcell:=0|xcell:=storeop xacc| xcell:=partop xacc|samexcellassign|xcellassignment addop xcell| xcellassignment logical xacc rcellassignment ::=rcell:=A1|rcell:=0.0 xxcellassignment ::=xxcell:=xxacc|xxcell:=0|xxcell:=NEG xxacc| samexxcellassign|xxcellassignment addop xxacc rrcellassignment ::=rrcell:=A12 storeop ::=NEG|CARRY|NEG CARRY partop ::=EX|SA|LA|CH addop ::=+|-|++|-- samexcellassign ::=xcell:=xcell samexxcellassign ::=xxcell:=xxcell
As the 1900 series order code has few operations involving only operands in store and not using accumulators, the possible cell assignment statements are few. In the more complex statements involving several operators on the right hand side, it should be remembered that each operator/operand pair will cause a store access. Consequently, it is usually more efficient to use accumulator assignments especially if the right hand side of the statement is at all complex. For example:
X1:=X2+X3-X4++X5--X6 AND X7; LIX:=X1;
is more efficient than:
LIX:=X2+X3-X4++X5--X6 AND X7;
Although the first method will generate one extra instruction, only one instruction will involve a store access. In the second method all six instructions will cause store accesses on the same cell. On the 1906A, this is certain to be less efficient.
In the syntax definitions for samexcellassign and samexxcellassign, the xcell and xxcell on the left and right hand sides of the assignment operator, :=, must be identical and on the same line.
The two simple formats are the assignment of an integer accumulator or zero to a cell. For example:
LIX:=X0; LIA(1):=X1; LIA(-1):=X2; (4):=X3; (X1):=X2; (X1+3):=X5; UIA(X1):=X6; UIA(X1+3):=X7; LIA(X1):=X0; UIV(X1-5):=X2; LIX:=0; UIV(X1-2):=0;
Assignments of zero to cells use the special 1900 order for this operation. In the cases where the left hand side's type is not obvious, the type is assumed to be correct for the RHS. Thus (3):=X1 will assume that an integer cell assignment is required. In the potentially ambiguous situation of an assignment of zero to a cell, the cell type of the left hand side is assumed to be INTEGER and not LONG INTEGER. Thus (3):=0 sets only the contents of address 3 to zero.
The integer accumulator on the right of the assignment may be preceded by a monadic operator. The meanings of the operators are similar to those for integer cell assignments. The possible monadic operators are:
LIX:=EX X1 sets LIX to #07777333 LIX:=SA X1 sets LIX to #07773333 LIX:=LA X1 sets LIX to #07733333
LIX:=CH X1; will set LIX to '123D' X2:=0; LIX(X2):=CH X1; will set LIX to 'D234' X2:=CHAR 2; LIX(X2):=CH X1; will set LIX to '12D4'
Certain arithmetic and logical operations can be carried out on the values of integer cells without going via an accumulator. A more complex integer cell assignment takes one of the forms described above followed by any number of operator-accumulator pairs. It is also possible to modify the existing contents of a cell by the first part of the statement consisting of the same cell designation on either side of the := operator. This part of the statement must be on the same line. Thus LIX:=LIX+X1; is possible but LIX:=LIA+X1; is not allowed.
The possible operators are +, -, ++, --, AND, OR, ER and these have the same meaning as given in Section 8.7. As for accumulator assignments all operations are carried out strictly from left to right. Examples of possible statements are:
LIX:=LIX+X1-X2++X3--X4 AND X5 OR X6 ER X7; LIX:=X0+X1; LIX(X2):=X3+X4; (3):=(3)+X2;
The possible forms of real cell assignments are very limited with only the real accumulator and zero being possible right hand sides. For example:
LRX:=A1; (3):=A1; LRA(X1):=A1; URA(X1-2):=A1; LRX:=0.0; URA(X1):=0.0;
Note that zero is the only constant that can be directly assigned to a cell. To assign the constant 3.0 to LRX requires:
A1:=3.0; LRX:=A1;
To assign zero to a cell, the left hand side must have its type known. There is a compiler error such that (3)=0.0, for example, is compiled incorrectly.
The only possible long real assignment is assigning the long real accumulator to a cell. For example:
LRRX:=A12; LRRA(X1-4):=A12;
The long integer cell assignments are similar to the corresponding integer cell assignments. The two simple forms allow a long accumulator or zero to be assigned to the designated cell. For example:
LIIX:=X12; LIIX:=0; (X1):=X12;
The only monadic operator allowed is NEG which assigns the negated value of the long integer accumulator specified to the cell. For example:
LIIX:=NEG X23;
More complex assignment statements can be generated by following any of these simple statements with any number of operator/long accumulator pairs. These are obeyed strictly from left to right. As with the integer and real cell assignments, it is possible to define the same cell on both the left and right of the := operator if the current contents of the cell are to be modified. For example:
LIIX:=LIIX+X12-X34++X56--X70; LIIX:=0+X23; LIIX:=NEG X12+X23; LIIA(X1+2):=LIIA(X1+2)+X23-X45;
The possible operators are the same as for integer cell assignments. The difference is that operations are performed on 48 bit quantities instead of 24.
Although logical operations have been defined for double length integer quantities, the code generated is incorrect. These should not therefore be used.