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

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