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

26. SMO CELL DESIGNATION

26.1 Syntax

smoαcell  ::=  (simplesmo)|(simplesmo+integer)|(simplesmo+modifier)|
               (simplesmo+modifier+integer)| αidentifier(simplesmo)|
                αidentifier(simplesmo+integer)|αidentifier(simplesmo+modifier)|
                αidentifier(simplesmo+modifier+integer) {a=x|r}
   (but see Section 26.4)
simplesmo ::= simpleαcell|£upperidentifier|blockidentifier

26.2 Addresses

This section describes the more complex formats for accessing the contents of storage cells. The syntax above defines an address of a storage location. The assignment statements defined earlier either deposit a new value into this location or access its contents. Unlike the simpleαcell designators, it is necessary to generate more than one instruction for each appearance of a smoαcell in a statement. On some 1900 computers (including a 1906A) there is a special SMO hardware instruction which causes the next instruction obeyed to have its address modified by the contents of the word specified in the SMO instruction. On these computers it is therefore reasonably efficient to use SMO designators. On other computers in the 1900 range, a macro instruction has to be obeyed which is equivalent to between 3 and 5 instructions. It is recommended that SMO cell designation should only be used when the same effect cannot be produced using simple cell designators.

The three different forms of the SIMPLESMO define a value as follows:

  1. simplexcell: the value is the contents of the simplexcell
  2. £upperidentifier: the value is the base address of the domain containing the upper identifier specified
  3. blockidentifier: the value is the address of the first word of the global storage area with this name

If the value defined by the simplesmo is V, the value of the integer defined in the syntax is I, the contents of the modifier is X, and the displacement of the identifier is $ then the address specified in each case is:

(simplesmo)                                              V
(simplesmo + integer)                                    V+I
(simplesmo + modifier)                                   V+X
(simplesmo + modifier + integer)                         V+X+I
αidentifier (simplesmo)                                  $+V
αidentifier (simplesrno + integer)                       $+V+I
αidentifier (simplesmo + modifier)                       $+V+X 
αidentifier (simplesmo + modifier + integer)             $+V+X+I

The addresses calculated must have 0 ≤ $-I, I, $+I < 4096

26.3 Some Example Assignment Statements

Consider the declarations:

LOWER
INTEGER LAA=@LB, LE=1, LC=@UA;
LOWEND;
BASE;
INTEGER UA=3, UB=@UA, UC=11;
GLOBAL FRED:
INTEGER D=5,E=9;
GLOBEND;

Then the following integer assignments statements produce the result given:

(a) X2 := (LAA);         sets X2 to 1, the contents of @LB
(b) X2 := (LAA(2))       sets X2 to 3, the contents of @UA
(c) X1 := @LAA; 
    X2 := ((X1));        sets X2 to 1
(d) X3 := 2; 
    X2 := (LAA(X3));     sets X2 to 3
(e) X3 := £UB; 
    X2 := (UB(X3))       sets X2 to 3
(f) X3 := 1; 
    X2 := (LAA(X3-1));   sets X2 to 1
(g) X3 := 1; 
    X2 := (LAA(X3+1)+2); sets X2 to 11
(h) X2 := LAA(LAA(1)+1); sets X2 to GUA
(i) X2 := E(FRED)        sets X2 to 9
(j) X2 := UA(£UA)        sets X2 to 3

As the integer accumulators can also be accessed as the first 8 locations of store, it is possible to use integer accumulators other than X1, X2 and X3 as modifiers by specifying their store addresses. For example, X6 can be referred to as (6) so that in the same way X3 can be used as a modifier in U(X3), X6 can be used in U((6)). Double modification can be achieved by using designators of form ((6)+X2). To use an index consisting of contents of X1 and X2, the designators ((1)+X2) or ((2)+X1) can be used.

26.4 Errors in PLASYD Compiler

There are currently two errors in the PLASYD compiler involving SMO designators. Using the alternatives given below:

smoαcell    ::= (simplesmo)
simplesmo   ::= simplexcell
simplexcell ::= lowerαidentifier (-integer)

it should be possible to write statements of the form:

X2 := (LC(-2));

Statements of this type currently give a compiler error and generate incorrect code.

Similarly:

smoαcell ::= (simplesmo + integer)
simplesmo ::= simplexcell
simplexcell ::= αidentifier (modifier - integer)

should allow a statement of the form:

X2 := (LAA(X3-1)+1;

This also generates incorrect code and gives a compiler error.

Apart from these two cases, the correct code is generated for the syntax given at the head of the chapter.

⇑ 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