Contact us Heritage collections Image license terms
HOME ACL Associates Technology Literature Applications Society Software revisited
Further reading □ Contents1. Introduction2. Basic symbols and comments3. Identifiers, accumulators and cells4. Types and values5. Addresses and storage allocation6. Simple cell designation7. Assignment statements8. Integer accumulator assignments9. Real accumulator assignments10. Long accumulator assignments11. Cell assignments12. Block structure13. Procedures and labels14. Conditional and control statements15. Functions16. Cell declarations17. Synonym declarations18. Storage allocation19. Subcompilation and global storage20. Define statements, conditional compilation and include statements21. Compiler directives22. FORTRAN/PLASYD mixed programming23. ALGOL/PLASYD mixed programming24. Useful library routines25. Use of TASK macro to compile PLASYD programs26. SMO cell designation27. Compiler output28. PLAN instructions not provided for in PLASYD □ Appendices □ 1: Errors and comments2: 1900 character set3: Syntax definitions in alphabetical order4: Use of program XMED5: 1900 order code6: Code genereated for typical PLASYD statements7: A sample PLASYD program8: Less commonly used directivesReferences
ACD C&A INF CCD CISD Archives Contact us Heritage archives Image license terms

Search

   
ACLLiteratureICL 1906A manualsPLASYD
ACLLiteratureICL 1906A manualsPLASYD
ACL ACD C&A INF CCD CISD Archives
Further reading

Contents1. Introduction2. Basic symbols and comments3. Identifiers, accumulators and cells4. Types and values5. Addresses and storage allocation6. Simple cell designation7. Assignment statements8. Integer accumulator assignments9. Real accumulator assignments10. Long accumulator assignments11. Cell assignments12. Block structure13. Procedures and labels14. Conditional and control statements15. Functions16. Cell declarations17. Synonym declarations18. Storage allocation19. Subcompilation and global storage20. Define statements, conditional compilation and include statements21. Compiler directives22. FORTRAN/PLASYD mixed programming23. ALGOL/PLASYD mixed programming24. Useful library routines25. Use of TASK macro to compile PLASYD programs26. SMO cell designation27. Compiler output28. PLAN instructions not provided for in PLASYD
Appendices
1: Errors and comments2: 1900 character set3: Syntax definitions in alphabetical order4: Use of program XMED5: 1900 order code6: Code genereated for typical PLASYD statements7: A sample PLASYD program8: Less commonly used directivesReferences

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