xacc ::= X0|X1|X2|X3|X4|X5|X6|X7 racc ::= A1 xxacc ::= X01|X12|X23|X34|X45|X56|X67|X70 rracc ::= A12 modifer ::= X1|X2|X3 identifier ::= letter|%|identifier letter|identifier digit|identifier %
A PLASYD program consists of a series of declarations and statements. A statement corresponds to one or more computer instructions to be obeyed at object program run time. A declaration gives information to the computer mainly about storage layout and intercommunication.
Statements are basically of two kinds, control statements and assignment statements. Control statements can cause the normal sequence in which statements are to be obeyed to be altered. This can be used for example, to omit conditionally the execution of statements or to repeat a number of statements. Assignment statements are the means by which calculations are carried out. Their effect is to cause a value to be calculated and assigned to a variable. Variables are of two kinds called accumulators and cells. Accumulators correspond to the hardware accumulators in the 1900 series. Each cell corresponds to one or more words in the computer's main store.
Variables are divided into classes in PLASYD according to the type of data that they are used to hold and the mode of arithmetic that can be carried out on them. The various data types are dealt with later. Each variable has an identifier or name by which it is referenced in the program.
Accumulators have fixed identifiers assigned to them automatically by the system. These identifiers may not be used for any other purpose and are therefore similar to reserved words. They are:
All the accumulators may be given additional names by using the synonym declaration to be defined later. For example:
ACC I SYN X2;
would allow fixed point accumulator X2 to also be called I.
Cells have no fixed names like accumulators. They may be assigned identifiers in the program by the relevant declarations. The form of identifiers is given by the syntactic class identifier given above. Each identifier must be less than 32 characters in length and must not contain any layout characters such as space and newline as these will terminate the identifier. The identifiers defined for accumulators may not be used for other purposes. An identifier cannot coincide with a reserved word but a reserved word can be part of an identifier. Thus AND is not a legal identifier but ANDY is. Examples of possible cell identifiers are:
A X X8 % A%B AB% %AB AVERYLONGIDENTIFIER ANDY BEGI CHAR1 A1234567890B PLASYD ROOT1 ROOT2
If communication is desired between PLASYD and some other language then the global identifiers in PLASYD must conform to the limitations on identifiers in the other language.
The same identifier cannot be used for two different purposes in the same segment (a program consisting of a number of separated compiled segments could have local identifiers in different segments with the same name but different meaning).