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
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:
!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.