C
C       N12DMP:  DUMP ROUTINES FOR PHASES 1 & 2.
C
        SUBROUTINE N1DMP(CALLER,B,PL,IFL)
C
      INCLUDE  FORENV  @ COMFORTABLE
      INCLUDE  EXOTIC  @   ENVIRONMENT.
        INCLUDE FORCR    @ COMMUNICATION REGION
      COMPILER (GEN=NOTRA)
C
      COMMON  /LOOPTZ/ MLOOP, LOOPT(1)
      COMMON /N12TBZ/ NAMES(1) /N12TCZ/ LOCS(1)
      COMMON  /N12VRZ/ NVAR, VAR(1)
      INTEGER  DESCX(2)/2*-1/
      INTEGER  B(1)
C
      MODE = 1                               @ INDICATE FULL DUMP.
      LL = MIN(MLOOP,PL)
      NTRY = 'N1DMP'
      GO TO 10
C
         ENTRY  N2DMP(CALLER,B,MD,IFL)
      MODE = MD
      LL = MLOOP
      NTRY = 'N2DMP'
C
   10 BALLER = H2(CALLER)                    @ ASSUME CALL WAS SLJ.
        DATA IFLZ/0/
        INTEGER CUSFL
        IF(CUSFL.NE.0)   RETURN      @ NO DUMPS
       IF(IFLZ.NE.0)    CALL RP6   @ SKIP TO PHASE V ON ERROR ENTRY
        IFLZ=IFL       @  @ IFL ZERO FOR DIAGNOSTIC CALL NON ZERO FOR CONTINGENC
      IF (BALLER.EQ.0) BALLER = H2(B(12))    @ NO. TRY LMJ B11.
      WRITE (6,5000) NTRY, BALLER, (I,B(I+1),B(I+13),B(I+29),I=0,15)
C
      IF (NVAR.GT.1) WRITE (6,5050) (VAR(I),I=1,NVAR)
C
C         IF SPECIFIED, FORMAT SYM AND LOOPT.
C
      IF (MODE) 40,20,20
C
   20 CALL N23DMP                            @ SYMBOL TABLE.
C
      LOCC = LOC(LOOPT(1))                   @ LOOP TABLE.
      WRITE (6,5100) LOCC, LL
      DO 30 I=1,LL,2                         @ LIMIT DUMP LENGTH.
          IF (H1(LOOPT(I)).EQ.2**18-1) GO TO 40    @ TEST END TABLE.
          J = T3(LOOPT(I)+1)                 @ INDEX OF ASSOC ELEMENT.
      K = IABS(I-1)
   30 WRITE (6,5200) K, LOOPT(I), LOOPT(I+1), LOOPT(J), LOOPT(J+1)
C
C         TABLES IN N12TB.
C
   40 DO 60 I=1,1000 @ REASONABLE LIMIT.
          IF (NAMES(I).EQ.0) RETURN
          DESCX(1) = NAMES(I)
          CALL SNAP (H2(LOCS(I)), H1(LOCS(I)), DESCX)
   60     CONTINUE
   70 RETURN
C
 5000 FORMAT (///'0',A5,' CALLED FROM LOCATION ',O6//'0', 9X,'B',13X,
     $ 'A',13X,'R'/(I8,2X,3(O12,2X)))
 5050 FORMAT (///5(1X,A6,1X,O12,3X))
 5100 FORMAT (///' LOOP TABLE - ORIGIN = ',O6,', LENGTH = ',O6//)
 5200 FORMAT (5X,O6,4(5X,O12))
      END
