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

11. CELL ASSIGNMENTS

11.1 Syntax

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

11.2 Introduction

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.

11.3 Integer Cell Assignments

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:

  1. NEG: this causes the negated value of the integer accumulator specified to be assigned to the cell.
  2. CARRY: the cell specified is assigned the value of the integer accumulator without its most significant bit. The CARRY register is set if the most significant bit of the primary is set. As in all 1900 integer arithmetic, the value assigned to the cell will be incremented by the value of the CARRY bit. So if X1 contains #37777777 and CARRY is set then LIX:=CARRY X1; will set LIX to 0 and will propagate the CARRY leaving the CARRY register set.
  3. NEG CARRY: the value of the integer accumulator is first negated and the operator CARRY is performed on the result before the cell assignment.
  4. EX: this assigns the bottom 9 bits of the integer accumulator specified to the cell designated but does not alter the other 15 bits of the cell. Thus it is not strictly equivalent to EX in accumulator assignments where the remaining 15 bits are set to zero.
  5. SA: similar to EX except that 32 bits are deposited instead of 9. The remaining bits are unaltered.
  6. LA: similar to EX except that 15 bits are deposited instead of 9. The remaining bits are unaltered. Assuming LIX contains #07777777 and X1 contains #33333333 then
    LIX:=EX X1 sets LIX to #07777333
    LIX:=SA X1 sets LIX to #07773333
    LIX:=LA X1 sets LIX to #07733333
    
  7. CH: sets the bottom character of the integer accumulator into the designated cell. Which character position is changed will depend on the form of the cell specified. If the cell is unmodified, the lower 6 bits of the cell will be changed. If the cell is defined using a modifier, then the address is taken as a character address and the assignment alters the bits in that character position of the cell. For example if X1 contains ABCD and LIX contains 1234 then
    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;

11.4 Real Cell Assignments

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.

11.5 Long Cell Assignments

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.

⇑ 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