Contact us Heritage collections Image license terms
HOME ACL Associates Technology Literature Applications Society Software revisited
Further reading □ Contents □ 1. Introduction □ 2. Basic symbols and comments □ 3. Identifiers, accumulators and cells □ 4. Types and values □ 5. Addresses and storage allocation □ 6. Simple cell designation □ 7. Assignment statements □ 8. Integer accumulator assignments □ 9. Real accumulator assignments □ 10. Long accumulator assignments □ 11. Cell assignments □ 12. Block structure □ 13. Procedures and labels □ 14. Conditional and control statements □ 15. Functions □ 16. Cell declarations □ 17. Synonym declarations □ 18. Storage allocation □ 19. Subcompilation and global storage □ 20. Define statements, conditional compilation and include statements □ 21. Compiler directives □ 22. FORTRAN/PLASYD mixed programming □ 23. ALGOL/PLASYD mixed programming □ 24. Useful library routines □ 25. Use of TASK macro to compile PLASYD programs □ 26. SMO cell designation □ 27. Compiler output □ 28. PLAN instructions not provided for in PLASYD □ Appendices □ 1: Errors and comments □ 2: 1900 character set □ 3: Syntax definitions in alphabetical order □ 4: Use of program XMED □ 5: 1900 order code □ 6: Code genereated for typical PLASYD statements □ 7: A sample PLASYD program □ 8: Less commonly used directives □ References
ACD C&A INF CCD CISD Archives Contact us Heritage archives Image license terms

Search

   
⟶ ACL ⟶ Literature ⟶ ICL 1906A manuals ⟶ PLASYD
⟶ ACL ⟶ Literature ⟶ ICL 1906A manuals ⟶ PLASYD
ACL ACD C&A INF CCD CISD Archives
Further reading ⇓

□ Contents □ 1. Introduction □ 2. Basic symbols and comments □ 3. Identifiers, accumulators and cells □ 4. Types and values □ 5. Addresses and storage allocation □ 6. Simple cell designation □ 7. Assignment statements □ 8. Integer accumulator assignments □ 9. Real accumulator assignments □ 10. Long accumulator assignments □ 11. Cell assignments □ 12. Block structure □ 13. Procedures and labels □ 14. Conditional and control statements □ 15. Functions □ 16. Cell declarations □ 17. Synonym declarations □ 18. Storage allocation □ 19. Subcompilation and global storage □ 20. Define statements, conditional compilation and include statements □ 21. Compiler directives □ 22. FORTRAN/PLASYD mixed programming □ 23. ALGOL/PLASYD mixed programming □ 24. Useful library routines □ 25. Use of TASK macro to compile PLASYD programs □ 26. SMO cell designation □ 27. Compiler output □ 28. PLAN instructions not provided for in PLASYD
Appendices
□ 1: Errors and comments □ 2: 1900 character set □ 3: Syntax definitions in alphabetical order □ 4: Use of program XMED □ 5: 1900 order code □ 6: Code genereated for typical PLASYD statements □ 7: A sample PLASYD program □ 8: Less commonly used directives □ References

9. REAL ACCUMULATOR ASSIGNMENTS

9.1 Syntax

rassignment  ::= A1:=rprimary|A1:=A1|A1:=NEG rprimary|
                 rassignment FROM rprimary|rassignment UNDER rprimary|
                 rassignment  rarithmetic  rprimary
rprimary     ::= rvalue|rcell
rarithmetic  ::= +|-|*|/

9.2 Basic Real Accumulator Assignment

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:

  1. Assigning a value: one of the real values defined in Section 4.4 is assigned to the floating point accumulator. Examples are:
    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.
  2. Assigning a cell: any of the simple cell designators defined in Section 6 can be used to assign the contents of the cell to the real accumulator. The type of the cell must be real if it is known. In the case where the type is indeterminate, it is assumed to be correct. Some examples:
    A1:=LRX; A1:=LRA(4);   A1:=LRY(-40); 
    A1:=(X1); A1:=(1); A1:=URA(X1+6);
    

9.3 Monadic Operators

The primary on the right of the assignment may be preceded by a monadic operator. The effect on the assignment is as follows:

  1. NEG: the real accumulator is assigned the negative of the primary value. This requires an extra instruction to be obeyed.

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.

9.4 General Real Accumulator Assignments

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:

  1. +, -, *, /: these have their usual meaning. Real arithmetic is rounded on the 1900 range. As A1 is not a primary, the statement A1:=LRX+A1 is illegal.
  2. FROM: this is the reverse subtraction operator. For example, A1:= LRX FROM LRY is equivalent to A1:=LRY-LRX. It can be useful in the form A1:=A1 FROM LRX as A1:=LRX-A1 is illegal.
  3. UNDER: this is the reverse divide operator. For example, A1:=LRX UNDER LRY is equivalent to A1:=LRY/LRX. Again it is useful when the first operand is the real accumulator.

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;
⇑ Top of page
© Chilton Computing and UKRI Science and Technology Facilities Council webmaster@chilton-computing.org.uk
Our thanks to UKRI Science and Technology Facilities Council for hosting this site