Contact us Heritage collections Image license terms
HOME ACL Associates Technology Literature Applications Society Software revisited
Further reading □ Contents □ 1. Introduction □ 2. Basic symbols and comments □ 3. Identifiers, accumulators and cells □ 4. Types and values □ 5. Addresses and storage allocation □ 6. Simple cell designation □ 7. Assignment statements □ 8. Integer accumulator assignments □ 9. Real accumulator assignments □ 10. Long accumulator assignments □ 11. Cell assignments □ 12. Block structure □ 13. Procedures and labels □ 14. Conditional and control statements □ 15. Functions □ 16. Cell declarations □ 17. Synonym declarations □ 18. Storage allocation □ 19. Subcompilation and global storage □ 20. Define statements, conditional compilation and include statements □ 21. Compiler directives □ 22. FORTRAN/PLASYD mixed programming □ 23. ALGOL/PLASYD mixed programming □ 24. Useful library routines □ 25. Use of TASK macro to compile PLASYD programs □ 26. SMO cell designation □ 27. Compiler output □ 28. PLAN instructions not provided for in PLASYD □ Appendices □ 1: Errors and comments □ 2: 1900 character set □ 3: Syntax definitions in alphabetical order □ 4: Use of program XMED □ 5: 1900 order code □ 6: Code genereated for typical PLASYD statements □ 7: A sample PLASYD program □ 8: Less commonly used directives □ References
ACD C&A INF CCD CISD Archives Contact us Heritage archives Image license terms

Search

   
⟶ ACL ⟶ Literature ⟶ ICL 1906A manuals ⟶ PLASYD
⟶ ACL ⟶ Literature ⟶ ICL 1906A manuals ⟶ PLASYD
ACL ACD C&A INF CCD CISD Archives
Further reading ⇓

□ Contents □ 1. Introduction □ 2. Basic symbols and comments □ 3. Identifiers, accumulators and cells □ 4. Types and values □ 5. Addresses and storage allocation □ 6. Simple cell designation □ 7. Assignment statements □ 8. Integer accumulator assignments □ 9. Real accumulator assignments □ 10. Long accumulator assignments □ 11. Cell assignments □ 12. Block structure □ 13. Procedures and labels □ 14. Conditional and control statements □ 15. Functions □ 16. Cell declarations □ 17. Synonym declarations □ 18. Storage allocation □ 19. Subcompilation and global storage □ 20. Define statements, conditional compilation and include statements □ 21. Compiler directives □ 22. FORTRAN/PLASYD mixed programming □ 23. ALGOL/PLASYD mixed programming □ 24. Useful library routines □ 25. Use of TASK macro to compile PLASYD programs □ 26. SMO cell designation □ 27. Compiler output □ 28. PLAN instructions not provided for in PLASYD
Appendices
□ 1: Errors and comments □ 2: 1900 character set □ 3: Syntax definitions in alphabetical order □ 4: Use of program XMED □ 5: 1900 order code □ 6: Code genereated for typical PLASYD statements □ 7: A sample PLASYD program □ 8: Less commonly used directives □ References

15. FUNCTIONS

15.1 Syntax

functionstatement ::=simplef|oneargf|twoargf
simplef           ::=!fidsimple
fidsimple         ::=NULL|SUSAR|LFPZ
oneargf           ::=!fidone  (nparam)
fidone            ::=BRN|BVS|BVSR|BVC|BVCR|BCS|BCC|BVCI|SUSTY|DISTY|
                     DELTY|SUSWT|DISP|DEL|OBEY|MODE|FIX|SFPZ|SMO|
                     STOZ|ACT|RMS
twoargf           ::=!fidtwo (xparam, nparam) | !fidtwo(,nparam)
fidtwo            ::=SFP|SUSBY|REL|DIS|CONT|SUSDP|ALLOT|PERI|SUSMA|
                     AUTO|SUSIN|GIVE|RRQ|LDX|ADX|NGX|SBX|LDXC|ADXC|
                     NGXC|SBXC|STO|ADS|NGS|SBS|STOC|ADSC|NGSC|SBSC|
                     ANDX|ORX|ERX|LDCH|LDEX|TXU|TXL|ANDS|ORS|ERS|
                     DCH|DEX|DSA|DLA|MPY|MPR|MPA|CDB|DVD|DVR|DVS|
                     CBD|BZE|BNZ|BPZ|BNG|BUX|BDX|BCHX|BCT|CALL|EXIT|
                     BFP|LDN|ADN|NGN|SBN|LDNC|ADNC|NGNC|SBNC|SLC|SLL|
                     SLA|SRC|SRL|SRA|SRAV|NORM|MVCH|SLC2|SLL2|SLA2|
                     SRC2|SRL2|SRA2|SRAV2|ANDN|ORN|ERN|LDCT|MOVE|SUM|
                     FLOAT|DAF|FSB|FMPY|FDVD|LFP
xparam            ::=octaldigit|xacc|xxacc
nparam            ::=simplecell|integer|octalinteger|charsequence|
                     pidentifier|lidentifier
simplecell        ::=xcell|rcell|xxcell|rrcell

15.2 PLAN Instructions in PLASYD

A function statement is the way that a machine code instruction can be compiled into a PLASYD program. The type of machine instruction is defined by the PLAN mnemonic preceded by ! symbol. The identifier of the mnemonic is not a reserved word and can be used as a normal identifier at any other part of the program. The identifier will have none, one or two arguments depending on the type of instruction. The two arguments which may be involved are the nparam which corresponds to the address and modifier fields of the instruction and the xparam which corresponds to the index field. If the xparam field has value zero then it can be omitted.

Therefore

!FAD(,LRX) !FAD(0,LRX) 

have the same meaning. The possible settings for the two parameters are:

  1. nparam. A function which is not a branch instruction may have as an nparam an unsigned integer number or octal value which does not exceed 12 bits (10 bits in the case of shifts) or a one or two character sequence. The binary representation of any of these quantities will be placed in the N field of the machine order. Alternatively the nparam may be a simplecell in which case the address of the cell will be placed in the N field of the instruction. For branch instructions the N field may be either a label or the name of a procedure. The address of the statement so designated will be placed in the N field of the machine instruction. Alternatively, an integer or octal integer will be interpreted as an absolute address.
  2. xparam. An xparam may be an octal digit or an accumulator identifier. If it is an accumulator identifier, the corresponding octal number is assumed. For example:
    !LDX(X7,LIX)     !LDX(7,LIX)
    
    are the same.

Some typical examples of functions are:

!CDB(X3,UIV(X1)); !STO(0,7); !FAD(3,LRX); 
!DISP('%%'); !BVCI(LBL); !FSB(,URA(X1+2)); !NULL; 
!SLC2(X12,LIX);

A complete set of mnemonics with the meaning of the orders is given in the Appendix. The two functions !ACT and !RMS have only an nparam as X7 is assumed.

⇑ 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