    ----------------------------------------------------------------------------
    PROC Multiplex([]CHAN OF BUNDLE CtoA, CtoB,  CHAN OF BUNDLE Abus, Bbus,
                   FRdLkPCA,FRdLkPCB )
 
      [MESGLEN]INT Adata, Bdata,Adata1, Bdata1:
      INT i,j:
      BOOL end,ab,bb,pca,pcb:
      SEQ
        end:=FALSE
        ab,bb,pca,pcb:=FALSE,FALSE,FALSE,FALSE
        WHILE  end=FALSE
          SEQ
            PAR
              ---------------------------
              PRI ALT 
                ALT i = 0 FOR num.of.reg
                  CtoA[i]?Adata1
                    ab:=TRUE
                TRUE & SKIP
                  SKIP
              --------------------------
              PRI ALT
                ALT j = 0 FOR num.of.reg
                  CtoB[j]?Bdata1
                    bb:=TRUE
                TRUE & SKIP
                  SKIP
              ---------------------------
              PRI ALT
                ALT
                  FRdLkPCA? Adata               --Read PC  From Read Lock
                    SEQ
                      IF
                        Adata[0]<>FINISH
                          SEQ
                            pca:=TRUE
                        TRUE
                          end:=TRUE
                  FRdLkPCB?Bdata
                    SEQ
                      pcb:=TRUE
              
                TRUE & SKIP
                  SKIP
            IF
              end=FALSE
                PAR                      
                  IF
                    ((ab=TRUE) AND (pca=FALSE))
                      Abus!Adata1 
                    ((ab=FALSE) AND (pca=TRUE))            
                      Abus!Adata
                    TRUE
                      SKIP 
                  IF
                    ((bb=TRUE) AND (pcb=FALSE))
                      Bbus!Bdata1 
                    ((bb=FALSE) AND (pcb=TRUE))            
                      Bbus!Bdata
                    TRUE
                      SKIP 
                      
              TRUE
                SKIP
                               
    :
