Data storage on the 1900 range is complicated by the architecture which allows only the first 4096 locations of store to be accessed directly. The standard 1900 instructions have a 12-bit address field and a 2-bit modifier field. The modifier field indicates whether the address is unmodified or modified by the contents of X1, X2 or X3. To access a store location, other than the first 4096, requires the most significant part of the address to be stored in a modifier. For example, if the modifier field contains the value i (≠ 0) and the address field contains α then the actual address accessed is α + (Xi) where the brackets denote contents of. The first 4096 locations are called lower storage on the 1900 series while the remainder are called upper storage. The standard method of accessing upper storage in 1900 software is to place in lower storage the base addresses for domains of upper storage not greater than 4096 locations in length. Assuming the base address is not already in a modifier, accessing an address in upper storage is achieved by loading the base address of the upper store domain into a modifier and placing the displacement in the modified instruction itself which does the accessing. To keep the number of lower store locations used in this way to a minimum, it is usual to divide upper storage into domains as close to 4096 words in length as possible.
PLASYD declarations are defined in full in a later section. It is necessary, however, to define some basic declarations before individual PLASYD statements can be defined. The simplest form of the PLASYD declaration is:
celldec ::= xcelldec|rcelldec|xxcelldec|rrcelldec αcelldec ::= αtype αitemlist; {α = x|r|xx|rr} xtype ::= INTEGER | LOGICAL rtype ::= REAL xxtype ::= LONG INTEGER rrtype ::= LONG REAL αitemlist ::= αitem|αitemlist, αitem { α= x|r|xx|rr} αitem ::= αidentifier | αidentifier (integer) {α=x|r|xx|rr} αidentifier ::= identifier {α=x|r|xx|rr}
Individual declarations are separated by semicolons.
The two forms of item are:
INTEGER A, B, C; REAL D, E, F;allocates single 1900 words to A, B and C and two words each to D, E and F.
INTEGER A(20), B(20); LONG REAL D(50);allocates 20 words to the arrays A and B and 200 words to the array D which consists of 50 LONG REAL cells each of four words in length.
To specify that a set of declarations define cells to be placed in lower storage, they are placed between the basic symbols LOWER and LOWEND. All storage cells defined as lower can be accessed directly. For example:
LOWER INTEGER A, B; REAL C, D(10), E; LOWEND;
defines a set of lower cells A, B, C, D(10) and E.
Cells that are not in lower storage cannot be directly accessed by the 1900. To enable such cells to be used, the upper storage may be divided into arbitrary sections called domains which must not exceed 4096 words. An upper cell can then be accessed by specifying the address of the first word of its domain (called the base of the cell) and the number of words (less than 4096) between this base and the cell required. This number is called the displacement of the cell in PLASYD. Declaration in PLASYD will define upper storage for cells unless lower storage is specified explicitly by the LOWER declaration given above. Upper storage is divided up into domains by the base declaration written
BASE;
which starts a new domain. The first upper declaration will cause a new domain to be set up and successively declared items will be assigned store locations in that domain in order until the appearance of a base declaration, or until the next declaration would cause the size of the domain to exceed 4096 words. A new domain will then be started in the next available word. Whenever a new domain is started, one word of lower storage is used to store the address of the first word of the domain.
In PLASYD, the symbol £ is used to specify the base address of a domain. Thus £A is the base address of the domain containing the cell A. The symbol $ is used to specify the displacement of a cell from its base address. Thus $A defines the displacement of the cell A from the base of the domain. The actual address of A is denoted by @A so that @A = £A + $A. For lower cells $A = @A and £A = 0.
For example:
INTEGER A, B, C; REAL D; BASE; REAL G, H; INTEGER I, J, K;
defines two upper domains. The first is 5 words in length while the second is 7 (real cells take two words). The values of $D, $H and $K are 3, 2 and 6 respectively.
lowerαidentifier ::= identifier {α=x|r|xx|rr} upperαidentifier ::= identifier {α=x|r|xx|rr} loweridentifier ::= lowewrxidentifier|lowerridentifier|lowerxxidentifier|lowerrridentifier upperidentifier ::= upperxidentifier|upperridentifier|upperxxidentifier|upperrridentifier
Identifiers are divided up into the classes, as defined above, depending on the cell's type defined in the declaration and whether it was allocated upper or lower storage.