*
*  SIGMA 5/6/7/8/9 META-SYMBOL INSTRUCTION PROCEDURES
*
         OPEN     A,D,F,G1,IFE,P,P#,S7,S9,W,X,Y,Z
         OPEN     X560
*
*   XEROX 560 META-SYMBOL INTRUCTIONS ARE ASSEMBLED WITH
*       SIG9 AND SIG9P AS APPROPRIATE,  ONLY IF X560 IS SET TO 1
*
X560     SET      1                 ALLOW XEROX 560 OP CODES WITHIN S9
D        SET      (S:IVAL&2)=2
F        SET      (S:IVAL&4)=4
G1       SET      1,7,4,3,17
IFE      SET      'INSTRUCTION FORMAT ERROR'
P        SET      (S:IVAL&1)
P#       SET      S:UFV(P#)+1
S7       SET      (S:IVAL&8)=8
S9       SET      (S:IVAL&X'10')=X'10'
Z        SET      2*S9
* USAGE FREQ 9
FORM     CNAME
         PROC
LF       CNAME    CF(2)|(CF(2)=0),(AF)                     4961
         PROC
         BOUND    NAME(1)
LF       GEN,NAME(2) AF
         PEND
         PEND
         DO       S9&X560           (THIS IS FOR X560)
LVAW     S:SIN,0  X'34'
         FIN
         DO       P                                        4961
LLOCKS   CNAME    1
         DO       S7                                       4961
LMAP     CNAME    4
LPC      CNAME    2
         DO       S9
LMAPRE   CNAME    5
         DO1      X560
LLOCKSE  CNAME    3                 XEROX 560 OPERATION
         FIN
         FIN                                               4961
MMC      CNAME    0
         PROC
         BOUND    4
A        SET      NAME|AF(1)
LF       GEN,G1   0,X'6F',CF(2),A,0
         ERROR,1,NUM(CF)~=2|A>5|CF(2)&1|AFA   IFE
         PEND
         FIN                                               4961
ANLZ     S:SIN,0  X'44'
BC       S:SIN,1  X'698'
BDP      S:SIN,1  X'694'
BEV      S:SIN,1  X'688'
BIL      S:SIN,1  X'689'
BNC      S:SIN,1  X'688'
BNCNO    S:SIN,1  X'68C'
BNSO     S:SIN,1  X'688'
BNSU     S:SIN,1  X'68A'
BOD      S:SIN,1  X'698'
BOL      S:SIN,1  X'699'
BSE      S:SIN,1  X'691'
BSF      S:SIN,1  X'694'
BSNE     S:SIN,1  X'681'
BSNF     S:SIN,1  X'68F'
BSO      S:SIN,1  X'698'
BSU      S:SIN,1  X'692'
BWP      S:SIN,1  X'684'
CAL2     S:SIN,0  X'05'
CAL3     S:SIN,0  X'06'
CAL4     S:SIN,0  X'07'
INT      S:SIN,0  X'6B'
* USAGE FREQ 8
         DO       S7&D                                     4961
BID      S:SIN,1  X'698'                                   4961
BLD      S:SIN,1  X'688'                                   4961
DSA      S:SIN,1  X'7C0'                                   4961
         FIN                                               4961
         DO       P                                        4961
BIOANR   S:SIN,1  X'698'                                   4961
BIOAR    S:SIN,1  X'688'                                   4961
BIODNO   S:SIN,1  X'684'                                   4961
BIODO    S:SIN,1  X'694'                                   4961
BIOSNP   S:SIN,1  X'694'                                   4961
BIOSNS   S:SIN,1  X'694'                                   4961
BIOSP    S:SIN,1  X'684'                                   4961
BIOSS    S:SIN,1  X'684'                                   4961
LRP      S:SIN,1  X'2F0'                                   4961
         FIN                                               4961
         DO       S7                                       4961
CBS      CNAME    X'60'
         DO       D
EBS      CNAME    X'63'
         FIN                                               4961
MBS      CNAME    X'61'
TBS      CNAME    X'41'
TTBS     CNAME    X'40'
         PROC
         BOUND    4
LF       GEN,8,4,20 NAME,CF(2),BA(AF)
         ERROR,1,NUM(CF)~=2|AFA    IFE
         PEND
         FIN                                               4961
* USAGE FREQ 7
         DO       P                                        4961
AIO      CNAME    X'6E'                                    4961
         PROC
         BOUND    4
LF       GEN,G1   AFA,NAME,CF(2),AF(2),WA(AF(1))           4961
         ERROR,1,NUM(CF)~=2|NUM(AF)>2 IFE
         PEND
LMS      S:SIN,0  X'2D'
LPSD     S:SIN,0  X'0E'                                    4961
XPSD     S:SIN,0  X'0F'                                    4961
         FIN                                               4961
         DO       F                                        4961
FAL      S:SIN,0  X'1D'                                    4961
FAS      S:SIN,0  X'3D'                                    4961
FDL      S:SIN,0  X'1E'                                    4961
FDS      S:SIN,0  X'3E'                                    4961
FML      S:SIN,0  X'1F'                                    4961
FMS      S:SIN,0  X'3F'                                    4961
FSL      S:SIN,0  X'1C'                                    4961
FSS      S:SIN,0  X'3C'                                    4961
         FIN                                               4961
         DO       S7                                       4961
CVA      S:SIN,0  X'29'                                    4961
CVS      S:SIN,0  X'28'                                    4961
         FIN                                               4961
         DO       S7&D
DA       S:SIN,0  X'79'                                    4961
DC       S:SIN,0  X'7D'                                    4961
DD       S:SIN,0  X'7A'                                    4961
DL       S:SIN,0  X'7E'                                    4961
DM       S:SIN,0  X'7B'                                    4961
DS       S:SIN,0  X'78'                                    4961
DST      S:SIN,0  X'7F'                                    4961
PACK     S:SIN,0  X'76'                                    4961
UNPK     S:SIN,0  X'77'                                    4961
         FIN                                               4961
* USAGE FREQ 6
AD       S:SIN,0  X'10'
CD       S:SIN,0  X'11'
CLM      S:SIN,0  X'19'
CLR      S:SIN,0  X'39'
DH       S:SIN,0  X'56'
EOR      S:SIN,0  X'48'
LAD      S:SIN,0  X'1B'
LAH      S:SIN,0  X'5B'
LAS      S:SIN,0  X'26'
LAW      S:SIN,0  X'3B'
LC       S:SIN,1  X'702'
LCD      S:SIN,0  X'1A'
LF       S:SIN,1  X'701'
MH       S:SIN,0  X'57'
MSP      S:SIN,0  X'13'
MTB      S:SIN,0  X'73'
SD       S:SIN,0  X'18'
* USAGE FREQ 5
LCFI     CNAME    X'3000'
LCI      CNAME    X'2000'
LFI      CNAME    X'1000',0
         PROC
         BOUND    4
LF       GEN,8,16,4,4  2,NAME,AF
         ERROR,1,AFA|NUM(AF)=0       IFE                                961
         PEND
         DO       S9&P
         DO       X560
PSS      S:SIN,0  X'0D'             FOR XEROX 560
PLS      CNAME
         PROC
         BOUND    4
         GEN,8,4,20  X'0C',CF(2),0  FOR XEROX 560
         PEND
         FIN
LRA      S:SIN,0  X'2C'
RIO      CNAME    2
POLP     CNAME    4
POLR     CNAME    6
         PROC
         DO       P#=2
         DO       AFA
LF       GEN,G1   1,X'4F',CF(2),AF(2),WA(AF(1))
         ELSE
LF       GEN,8,4,3,4,5,8   X'4F',CF(2),AF(2),NAME,AF(1),0
         FIN
         ELSE
W        SET      AF
LF       RES      1
         FIN
         PEND
         FIN
         DO       P                                        4961
HIO      CNAME    X'094F'                                  4961
RD       CNAME    X'016C'                                  4961
SIO      CNAME    X'094C'                                  4961
TDV      CNAME    X'094E'                                  4961
TIO      CNAME    X'094D'                                  4961
WAIT     CNAME    X'032E'                                  4961
WD       CNAME    X'016D'                                  4961
         FIN                                               4961
NOP      CNAME    X'0202'
PZE      CNAME    X'0200'
SFL      CNAME    X'1424'
SFS      CNAME    X'0424'
* IS -IO|TDV
* . IS SF-
* . . IS PZE|WAIT|NOP
* . . . PRIVILEGED
* X X X X   :2ND DIGIT OF NAME
         PROC
         DO       P#=2
X        SET      NAME**-8&X'F'
Y        SET      NAME&X'7F'
         BOUND    4
         ERROR,1,NUM(CF)~=2&(X&2)=0|NUM(AF)>2 IFE
         GOTO,NUM(AF(1)) A,B,C
A        DO       (X&4)=0|AFA
LF       GEN,G1   AFA,Y,CF(2),AF(2),WA(AF(1))
         ERROR,1,Y=2&(NUM(CF)>1|AFA)    IFE
         ELSE
LF       GEN,8,4,3,6,3,1,7   Y,CF(2),AF(2),0,NAME(1)**-12,0,AF(1)
         FIN
         GOTO     EXIT
B        ERROR,1,(X&6)>0 IFE
         DO       X=1
LF       GEN,8,4,3,1,4,12 Y,CF(2),AF(2),0,AF(1,1),AF(1,2)
         ELSE
LF       GEN,8,4,3,6-Z,3+Z,1,7 Y,CF(2),AF(2),0,AF(1,1),0,AF(1,2)
         FIN
         GOTO     EXIT
C        ERROR,1,(X&8)=0 IFE
         GEN,8,4,3,6-Z,3+Z,1,3,4 ;
                  Y,CF(2),AF(2),0,AF(1,1),1,AF(1,2),AF(1,3)
         ELSE
W        SET      AF
LF       RES      1
         FIN
EXIT     PEND                                              4961
         DO       S9
SSD      CNAME    X'E'
SSS      CNAME    X'C'
         FIN
SAD      CNAME    X'A'
SAS      CNAME    X'8'
SCD      CNAME    X'6'
SCS      CNAME    X'4'
SLD      CNAME    X'2'
SLS      CNAME    X'0'
         PROC
         BOUND    4
         DO       P#=2
         ERROR,1,NUM(CF)~=2|NUM(AF)=0   IFE
         DO       AFA
LF       GEN,G1   1,X'25',CF(2),AF(2),WA(AF(1))
         ELSE
LF       GEN,8,4,3,10,7   X'25',CF(2),AF(2),NAME,AF(1)
         FIN
         ELSE
W        SET      AF
LF       RES      1
         FIN
         PEND
         CLOSE    A,D,F,G1,IFE,P,P#,S7,S9,W,X,Y,Z
         CLOSE    X560
* USAGE FREQ 4
BNOV     S:SIN,1  X'684'
BOV      S:SIN,1  X'694'
CB       S:SIN,0  X'71'
EXU      S:SIN,1  X'670'
LCF      S:SIN,1  X'703'
LCH      S:SIN,0  X'5A'
LCW      S:SIN,0  X'3A'
LS       S:SIN,0  X'4A'
MTH      S:SIN,0  X'53'
PLM      S:SIN,0  X'0A'
PLW      S:SIN,0  X'08'
PSM      S:SIN,0  X'0B'
PSW      S:SIN,0  X'09'
S        S:SIN,0  X'25'
SF       S:SIN,0  X'24'
SH       S:SIN,0  X'58'
STCF     S:SIN,1  X'740'
XW       S:SIN,0  X'46'
* USAGE FREQ 3
AH       S:SIN,0  X'50'
BCR      S:SIN,0  X'68'
BCS      S:SIN,0  X'69'
BGZ      S:SIN,1  X'692'
BLEZ     S:SIN,1  X'682'
BLZ      S:SIN,1  X'691'
CAL1     S:SIN,0  X'04'
CH       S:SIN,0  X'51'
CS       S:SIN,0  X'45'
DW       S:SIN,0  X'36'
LM       S:SIN,0  X'2A'
MI       S:SIN,2  X'23'
MW       S:SIN,0  X'37'
STH      S:SIN,0  X'55'
STM      S:SIN,0  X'2B'
STS      S:SIN,0  X'47'
* USAGE FREQ 2
AND      S:SIN,0  X'4B'
AWM      S:SIN,0  X'66'
BANZ     S:SIN,1  X'694'
BAZ      S:SIN,1  X'684'
BDR      S:SIN,0  X'64'
BGE      S:SIN,1  X'681'
BGEZ     S:SIN,1  X'681'
BIR      S:SIN,0  X'65'
BLE      S:SIN,1  X'682'
BNE      S:SIN,1  X'693'
LD       S:SIN,0  X'12'
LH       S:SIN,0  X'52'
MTW      S:SIN,0  X'33'
OR       S:SIN,0  X'49'
STD      S:SIN,0  X'15'
SW       S:SIN,0  X'38'
* USAGE FREQ 1
AI       S:SIN,2  X'20'
AW       S:SIN,0  X'30'
B        S:SIN,1  X'680'
BAL      S:SIN,0  X'6A'
BE       S:SIN,1  X'683'
BEZ      S:SIN,1  X'683'
BG       S:SIN,1  X'692'
BL       S:SIN,1  X'691'
BNEZ     S:SIN,1  X'693'
CI       S:SIN,2  X'21'
CW       S:SIN,0  X'31'
LI       S:SIN,2  X'22'
LB       S:SIN,0  X'72'
LW       S:SIN,0  X'32'
STB      S:SIN,0  X'75'
STW      S:SIN,0  X'35'
         END

