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

28. PLAN INSTRUCTIONS NOT PROVIDED FOR IN PLASYD

There are a number of instructions in the 1900 order code which are found useful by programmers writing in PLASYD, but which can only be used by writing the PLAN instruction explicitly. The following sections describe some of the more commonly used of such instructions.

28.1 Counter-modifiers

Several 1900 orders permit an accumulator to be regarded as being composed of two sections:- an address field, occupying B9-23, (the lower 15 bits) (See Note) and a counter field, occupying B0-8. The following instructions act upon these fields.

!BUX(X,label);

Increment the address field of accumulator X by one, then decrement the counter field by one, and if this is not now zero branch to the address indicated by label. (See Note.)

!BDX(X,label);

Similar to BUX except that the address field is incremented by two.

!BCHX(X,label);

For this instruction, the accumulator is considered to consist of a word address field in B9-23 (See Note), a counter field in B2-8, and a character address field in B0-1. The instruction increments the character address by one, with overflow being added into the word address, then decrements the counter and branches if it is not now zero.

!BCT(X,label);

Decrement the address field of accumulator X by one, and branch to label if it is not now zero.

NOTE: If the program is running in 22AM, the address field occupies B2-23 of the accumulator, and there is no counter field. The instructions BUX, BOX and BCHX therefore update the address field as described, and branch unconditionally to the address indicated by label. In this address mode the BCT instruction can be used to update a counter in a different accumulator.

28.2 Program Termination and Display Messages

There is a group of six instructions which can be used to send messages into the monitoring file of the job in which the program is being run, and optionally to halt or delete the binary.

The instructions are:

!DISP(chars);

Send the message DISPLAY: chars to the monitoring file. (See Note)

!DISTY(index);

Send the message DISPLAY: string to the monitoring file. (See Note)

!SUSWT(chars);

Send the message HALTED: chars to the monitoring file and suspend the program.

!SUSTY(index);

Send the message HALTED: string to the monitoring file and suspend the program.

!DEL(chars);

Send the message DELETED: chars to the monitoring file and delete the program.

!DELTY(index);

Send the message DELETED: string to the monitoring file and delete the program.

NOTE: chars is a two character message. The instructions using this form may be written in various ways, thus if X1 contains the value 2, the following instructions will all have the same effect.

!DISP('A2'); !DISP(#4l02); !DISP(2114); !DISP((X1+2112));

index is the address of either:

  1. a word whose address field contains the address of string, and whose counter field contains the length of string in characters, or
  2. a pair of words, the first of which contains the length of string, and the second the address. This form is only allowed in 22AM.

string is a sequence of not more than forty characters, beginning in the first character position of a word.

For example, to delete a program with the message:

DELETED : IT WORKED! 

the following code can be used:

LOWER LOGICAL MESSAGE (4)= 
(10CNT+@MESSAGE+1, "IT WORKED:!");
......
LOWEND;
.......
!DELTY (MESSAGE);

28.3 Number Conversion and Block Movement

A pair of instructions are provided for converting between binary numbers and decimal characters. They operate on a binary value held in a long integer accumulator, and a character representation of the number in store.

!CDB(X, address);       for example  !CDB(4, (X2));

If the character pointed to by the address in X2 (in the example) is numeric, the long integer value in X45 will be multiplied by ten, and the character will be added to X5. If not, the carry register will be set and no other action taken.

!CBD(X, address);       for example  !CBD(4, (X2));

For the purposes of this instruction, the value held in X45 (in the example) is considered to be a double length binary fraction. This value is multiplied by ten, and the integral part of the product is stored in the character position indicated by the address in X2. If zero-suppression is set, non-significant zeroes in the resultant number are replaced by zeroes. Zero-suppression may be set by obeying the instruction:

!MODE(1);

It is unset automatically when a non-zero digit is generated by a CBD order, or by program control with the instruction:

!MODE(0);

There are two instructions for transferring information from one part of store to another. They operate on a pair of accumulators, which contain the source and destination addresses, and the size of the transfer is indicated by the address field of the instruction.

!MOVE(X,N);

Move N words from the address specified in X to the address specified in X+1. (See Note)

Example 1: to move ten words from INPUT to OUTPUT.

X4:=@INPUT; X5:=@OUTPUT; !MOVE(4,10);

Example 2: to set to zero a block of words starting at FIRST, whose length is held in the variable LENGTH.

X4:=@FIRST; X5:=@FIRST(1); FIRST:=0; X3:=LENGTH; !MOVE(4, (X3)); 

or alternatively:

X4:=@FIRST; X5:=X4+1; FIRST:=0; !MOVE (4, (LENGTH));
!MVCH(X,N);

Move N characters from the character address specified in X to that specified in X+1.|

Example 3: to move 17 characters from BUFA to BUFB.

X4:=@BUFA; X5:=@BUFB; !MVCH(4,17);

NOTE: The count of words or characters to be transferred must be less than 512. A count of zero will cause 512 words or characters to be transferred. In the case of the MOVE instruction, the addresses in the pair of accumulators used remain unchanged after execution, unless they are in the area to which the transfer was made. In the case of the MVCH instruction, the addresses are updated to point to the character after the last character transferred. (It is therefore possible to concatenate several strings of characters without resetting the destination-address accumulator.)

28.4 PERI, GIVE and SUSBY

These instructions will not be described in detail here as they are described in the GEORGE manual. The use of PERI and SUSBY instructions may be seen in the sample program in Appendix 7, which reads from a simulated card reader, and writes to a simulated lineprinter. A brief description of the simpler GIVE instructions follows.

!GIVE(4,n);

A pair of accumulators is specified, in this case X4 and X5. The address field is an integer indicating the variety of the instruction.

n = 1, place the current date in X45 in the form dd/mm/yy, for example 10/09/73.

n = 2, place the current time in X45 in the form hh/mm/ss, for example 17/05/25.

n = 3, place the current size of the program in X4, B0 is set if the program is sparse.

n = 4, the program size is altered to that specified in X4, it will be sparse if B0 is set.

⇑ 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