rassignment ::= A1:=rprimary|A1:=A1|A1:=NEG rprimary| rassignment FROM rprimary|rassignment UNDER rprimary| rassignment rarithmetic rprimary rprimary ::= rvalue|rcell rarithmetic ::= +|-|*|/
A1:=rprimary A1:=A1
The basic real accumulator assignment sets the floating point accumulator (A1) equal to the value of the primary specified. The statement A1:=A1 does not generate any instructions and is really only of use in the construction of more complex assignments. There are basically two kinds of basic assignments:
A1:=0.13261; A1:=321.67; A1:=MINUS 0.141579; A1:=1.4&20; A1:=MINUS 0.5613 & MINUS 6; A1:=3&6; A1:=43 & MINUS 12;The type of accumulator and the primary must be identical. Thus A1:=0 is illegal and must be written A1:=0.0. Assignment of the value 0.0 to the real accumulator is more efficient than any other real assignment and does not require the number 0.0 to be stored. Assignment of all values other than 0.0 will cause two 24 bit words for each value to be assigned in lower storage to hold the value. Several uses of the same number in one segment will result in only one pair of lower storage cells being set aside.
A1:=LRX; A1:=LRA(4); A1:=LRY(-40); A1:=(X1); A1:=(1); A1:=URA(X1+6);
The primary on the right of the assignment may be preceded by a monadic operator. The effect on the assignment is as follows:
For this reason it should not normally be used with values as primaries. That is use A1:=MINUS 3.0 rather than A1:=NEG 3.0. In the latter case 3.0 is stored in lower and is negated to A1 by two instructions, while in the second MINUS 3.0 is stored in lower and is loaded into A1 by one instruction.
rassignment FROM rprimary rassignment UNDER rprimary rassignment rarithmetic rprimary
A general real assignment statement extends the basic assignment statement. The first part of the statement equivalent to the basic statement assigns a value to the real accumulator. The remaining terms of the statement then cause various arithmetic operations to be performed on the contents of the real accumulator. These operations are performed strictly from left to right. For example:
A1:=LRY+LRX*LRA(2);
is equivalent to
A1:=LRY; A1:=A1+LRX; A1:=A1*LRA(2);
A statement where the real accumulator appears before and after the := (on the same line) does not cause any code to be generated for that operation. If the statement is split between lines immediately after the := symbol, then incorrect code is generated. The possible operations are:
Examples of real accumulator assignments are:
A1:= LRX * LRY FROM LRA(2) UNDER LRA(4) - URA(X1+2)/3.0; A1:= NEG 3.145/LRX+LRY-3.2&7;