.TITLE ENTRY_INDEX .SUBTITLE DATA STORAGE AREA .ENABLE DEBUG .PSECT IMPURE_DATA,RD,WRT,NOSHR,NOEXE,CON,GBL,LONG ARG1: .LONG 0 ARG2: .LONG 0 OUTPUT_LINE: .BLKB 132 OUTPUT_STRING: .LONG 0,0 LINE_COUNT: .LONG 0 CHAR_COUNT: .LONG 0 NUMBER: .LONG 0 TREE_QUEUE: .ADDRESS 0,0 LEVEL: .LONG 0 OVERFLOW: .LONG 0 RECURSION: .LONG 0 MULT_DEF_ERROR: ;V1.13 .LONG MULT_END-MULT_START ;V1.13 .ADDRESS MULT_START ;V1.13 MULT_START: ;V1.13 .ASCII /INDEX-W-Multiple Definition of Entry Point / ;V1.13 MULT_SYMBOL: ;V1.13 .ASCII / / ;V1.13 MULT_END: ;V1.13 ERROR_NUMBER: ;V3.02 .LONG 0 ;V3.02 .PSECT PURE_DATA,RD,NOWRT,SHR,NOEXE,CON,GBL CODE_1: .LONG 1 ;V1.4 CODE_2: .LONG 2 ;V1.4 CODE_3: .LONG 3 ;V1.4 CODE_4: .LONG 4 ;V1.4 CODE_5: .LONG 5 ;V1.4 T1: .ASCID / is defined in module / T1A: .ASCID / ??????/ T2: .ASCID / Calls Routines / ;V3.07 T3: .ASCID / Called by Routines / ;V3.07 T4: .ASCID / is in file / ;V1.21 VM_ARG: .LONG 2 .ADDRESS ARG1,ARG2 SUPER_REWIND_ERROR: .ASCID /INDEX-F-Rewind Super Index Scratch File Error/ ENTRY_REWIND_ERROR: .ASCID /INDEX-F-Rewind Entry Index Scratch File Error/ ENTRY_READ_ERROR: .ASCID /INDEX-F-Read Entry Scratch File Error/ SUPER_READ_ERROR: .ASCID /INDEX-F-Read Super Scratch File Error/ .PAGE .SUBTITLE INITALIZE ENTRY POINT .PSECT CODE,RD,NOWRT,SHR,EXE,GBL,CON .ENTRY DUMP_ENTRY_INDEX,^M PUSHAL TIME_COMMAND ;V1.4 PUSHAL CODE_1 ;V1.4 CALLS #2,G^LIB$STAT_TIMER ;V1.4 PUSHAL TIME_COMMAND+8 ;V1.4 PUSHAL CODE_2 ;V1.4 CALLS #2,G^LIB$STAT_TIMER ;V1.4 PUSHAL TIME_COMMAND+12 ;V1.4 PUSHAL CODE_3 ;V1.4 CALLS #2,G^LIB$STAT_TIMER ;V1.4 PUSHAL TIME_COMMAND+16 ;V1.4 PUSHAL CODE_4 ;V1.4 CALLS #2,G^LIB$STAT_TIMER ;V1.4 PUSHAL TIME_COMMAND+20 ;V1.4 PUSHAL CODE_5 ;V1.4 CALLS #2,G^LIB$STAT_TIMER ;V1.4 CALLG NULL,G^LIB$INIT_TIMER ;V1.4 TSTL ENTRY_SAVED_FLAG ;V1.12 BEQL 4$ ;V1.12 BRW DO_ENTRY_OUTPUT ;V1.12 4$: $REWIND RAB=SUPER_INDEX_RAB ;REWIND THE SCRATCH FILES ;V1.12 BLBS R0,1$ MOVL R0,ERROR_NUMBER ;V3.02 PUSHAL SUPER_INDEX_RAB+RAB$L_STV ;V3.02 PUSHAL ERROR_NUMBER ;V3.02 PUSHAL SUPER_REWIND_ERROR CALLS #3,SYSTEM_ERROR_MESSAGE ;V3.02 $EXIT_S ;V3.02 1$: $REWIND RAB=ENTRY_INDEX_RAB BLBS R0,2$ MOVL R0,ERROR_NUMBER ;V3.02 PUSHAL ENTRY_INDEX_RAB+RAB$L_STV ;V3.02 PUSHAL ERROR_NUMBER ;V3.02 PUSHAL ENTRY_REWIND_ERROR CALLS #3,SYSTEM_ERROR_MESSAGE ;V3.02 $EXIT_S ;V3.02 2$: ; SYMBOL TABLE IS IN AN EMPTY CONDITION PUSHAL DAY_TIME CALLS #1,G^LIB$DATE_TIME ;GET CURRENT TIME FOR HEADER CLRL LINES_ON_PAGE MOVL #ENTRY_OUTPUT,STATUS_WORD MOVL #132,LINE_COUNT MOVAL OUTPUT_LINE,OUTPUT_STRING+4 BITL #NARROW_FLAG,FLAG_WORD BEQL 3$ MOVL #80,LINE_COUNT ; RESET THE SYMBOL TABLE QUEUE HEADER -USE THE OLD FORM FOR ENTRY POINT ;V1.10 ; TABLE HANDLEING. THE GAINS FROM REWRITEING TO A BINARY TREE STRUCTURE ;V1.10 ; USEING THE SUPPLIED SYSTEM ROUTINES NOT WORTH THE EFFORT FOR THE ;V1.10 ; RELATIVELY SMALL NUMBER OF SYMBOLS THAT ARE PROCESSED ;V1.10 3$: MOVAL SYMBOL_TABLE_QUEUE,SYMBOL_TABLE_QUEUE ;V1.10 MOVL SYMBOL_TABLE_QUEUE,SYMBOL_TABLE_QUEUE+4 ;V1.10 ; ; DATA STORAGE ELEMENT IN THE ENTRY INDEX QUEUE LIST ; IS AS FOLLOWS ; ; SYMBOL_TABLE_QUEUE POINTS TO SYMBOL ELEMENTS ; ; ---------------------------------- ; !POINTER TO NEXT SYMBOL ! 0 ; ---------------------------------- ; !POINTER TO LAST SYMBOL ! 4 ; ---------------------------------- ; !POINTER TO FIRST CALLS ELEMENT! 8 ; ---------------------------------- ; !POINTER TO LAST CALLS ELEMENT !12 ; ---------------------------------- ; !POINTER TO FIRST CALL BY ELEMENT!16 ; ---------------------------------- ; !POINTER TO LAST CALL BY ELEMENT !20 ; ---------------------------------- ; !SYMBOL (NULL PADDED) !LENGTH !<= ONE BYTE 24-25 ; ---------------------------------- ; !31 BYTES LONG ! ; ; ! ! ; ---------------------------------- ; !DEFINEING-MODULE NAME !LENGTH!<=ONE BYTE 56-57 ; ---------------------------------- ; !NULL PADDED-EMPTY IF NOT DEFINED! ; ; ! ! ; ---------------------------------- ; !DEFINEING-FILE NAME !LENGTH! ; ; ARGUMENTS PASSED ; R10 POINTS TO NEW SYMBOL TO OUTPUT AND WHOS CALLING ROUTINES TO OUTPUT ; LEVEL CURRENT CALLING LEVEL ; TREE_QUEUE QUEUE OF SYMBOLS IN LINE TO MAIN ROUTINE-TO CHECK ; FOR RECURSION ; ; OUTPUT THE SYMBOL WITH LEADING DOTS MOVC5 #0,NULL,#0,#132,OUTPUT_LINE ;CLEAR THE LINE CLRL OUTPUT_STRING MOVAL OUTPUT_LINE,OUTPUT_STRING ;INIT THE DESCRIPTER CLRL OVERFLOW ;CLEAR OVERFLOW FLAG MULL3 #4,LEVEL,R6 ;GET NUMBER OF DOTS ;EACH LEVEL DOWN IN CALLING TREE-INDENT BY 4 LOCATIONS ;FILLING IN WITH DOTS BEQL 1$ ;IF LEVEL ZERO-SKIP NEXT PART CVTBL 24(R10),R7;GET LENGTH OF SYMBOL ADDL2 #3,R7 ;ACCOUNT FOR POSSABLE FLAGS ADDL3 R6,R7,R8;GET TOTAL LENGTH REQUIRED CMPL R8,LINE_COUNT;SEE IF TOO LONG BLEQ 2$ ;NO -LENGTH OK SUBL3 R7,LINE_COUNT,R6 ;GET NUMBER OF DOTS INCL OVERFLOW ;SET THE OVERFLOW FLAG 2$: MOVC5 #0,NULL,#^A/./,R6,OUTPUT_LINE ;FILL IN THE DOTS ; PUT IN VISUAL INDICATION OF NESTING LEVEL ;V2.03 MOVL #4,R0 ;V2.03 1002$: CMPB #^A/./,OUTPUT_LINE[R0] ;V2.03 BNEQ 1$ ;V2.03 MOVB #^A/+/,OUTPUT_LINE[R0] ;V2.03 ADDL2 #4,R0 ;V2.03 BRB 1002$ ;V2.03 1$: CVTBL 24(R10),R7 ;SYMBOLLENGTH MOVC3 R7,25(R10),L^OUTPUT_LINE(R6) ;FILL IN THE SYMBOL ;V1.21 ADDL3 R6,R7,OUTPUT_STRING ;UPDATE THE DESCRIPTER ADDL2 R7,R6 ;UPDATE R6 FOR FLAG INPUTS ; CHECK FOR OVERFLOW TSTL OVERFLOW BEQL 3$ MOVB #^A/*/,L^OUTPUT_LINE(R6) ;V1.21 INCL R6 INCL OUTPUT_STRING 3$: ; CHECK FOR UNDEFINED ENTRY POINT TSTB 56(R10) BNEQ 4$ ;DEFINED 103$: MOVB #^A/?/,L^OUTPUT_LINE(R6) ;V1.21 INCL R6 INCL OUTPUT_STRING 4$: ; CHECK FOR RECURSION CLRL RECURSION MOVAL TREE_QUEUE,R9 ;SCAN TREE QUEUE FOR THIS SYMBOL MOVL R9,R8 5$: MOVL (R8),R8 CMPL R8,R9 BEQL 6$ CMPC3 #32,8(R8),24(R10) BNEQ 5$ INCL RECURSION MOVB #^A/#/,L^OUTPUT_LINE(R6) ;V1.21 INCL OUTPUT_STRING 6$: ;OUTPUT THE COMPLETED LINE PUSHAL OUTPUT_STRING CALLS #1,PRINT_LINE TSTL RECURSION ;WAS THE SYMBOL RECURSIVE ?? BEQL 10$ ;NO RET ;YES-DON'T BOTHER TRYING TO GO DEEPER 10$: ;DOES THIS SYMBOL CALL ANY ONE? MOVAL 8(R10),R6 CMPL 8(R10),R6 BNEQ 11$ ;YES RET ;NO ; PUSH CURRENT SYMBOL ON TREE STACK AND CALL TO GET NEXT LEVEL 11$: BITL #FLOW_DEPTH_FLAG,FLAG_WORD+4 ;V1.12 BEQL 1111$ ;V1.12 CMPL ENTRY_DEPTH,LEVEL ;V1.12 BGTR 1111$ ;V1.12 RET ;V1.12 1111$: MOVL #40,ARG1 ;GET AN ELEMENT FOR TREE ;V1.12 CALLG VM_ARG,ALLOCATE INSQUE (R0),@TREE_QUEUE+4 MOVL R0,R9 ;INSERT IN QUEUE AND COPY SYMBOL MOVC3 #32,24(R10),8(R9) INCL LEVEL MOVL R6,R7 ;SET UP TO SCANN FOR CALLS SYMBOLS 12$: MOVL (R7),R7 ;NEXT SYMBOL CMPL R6,R7 BEQL 100$ MOVAL SYMBOL_TABLE_QUEUE,R11 MOVL R11,R10 13$: MOVL (R10),R10 CMPL R10,R11 BEQL 12$ CMPC3 #32,8(R7),24(R10) BNEQ 13$ CALLG NULL,SCAN_CALLING_SYMBOL BRW 12$ 100$:;DONE AT THIS LEVEL-BACK UP EVERYTHING BY ONE DECL LEVEL REMQUE @TREE_QUEUE+4,R0 MOVL R0,ARG2 MOVL #40,ARG1 CALLG VM_ARG,FREE RET .PAGE .SUBTITLE CALLED BY TREE TRY_CALLED_TREE: BITL #CALLED_BY_TREE_FLAG,FLAG_WORD ;AS CALLING TREE ASED FOR BNEQ 1$ ;NO JMP CLEAN_UP 1$: CLRL LINES_ON_PAGE ;SET UP FOR NEW PAGE AND TITLE MOVL #CALLED_BY_OUTPUT,STATUS_WORD CLRL LEVEL ;LEVEL IS ZERO MOVAL TREE_QUEUE,TREE_QUEUE ;INIT TREE RECURSION CHECK QUEUE MOVL TREE_QUEUE,TREE_QUEUE+4 MOVAL SYMBOL_TABLE_QUEUE,R11 ;SET UP FOR SCANN FOR BOTTOM ;LEVEL MODULES MOVL R11,R10 CALLED_TOP_LEVEL_LOOP: MOVL (R10),R10 ;NEXT SYMBOL PLEASE CMPL R10,R11 ;CHECK FOR DONE BNEQ 1$ JMP CLEAN_UP ;DONE THIS TREE-EXIT 1$: BITL #FLOW_SYMBOL_FLAG,FLAG_WORD+4 ;V1.12 BEQL 2$ ;V1.12 CMPC3 #32,ENTRY_SYMBOL,24(R10) ;FOUND WANTED SYMBOL ;V1.12 BNEQ CALLED_TOP_LEVEL_LOOP ;V1.12 CALLG NULL,SCAN_CALLED_SYMBOL ;V1.12 BRW CLEAN_UP ;NO NEED TO CONTINUE ;V1.12 2$: MOVAL 8(R10),R9 ;SEE IF ANY CALLS ;V1.12 CMPL 8(R10),R9 BNEQ CALLED_TOP_LEVEL_LOOP ;NOT A TOP SYMBOL ; FOUND A BOTTOM MODULE-START FROM HERE ; CALL RECUSRIVE ROUTINE TO OUTPUT THIS SYMBOL AND ALL ABOVE IT CALLG NULL,SCAN_CALLED_SYMBOL BRW CALLED_TOP_LEVEL_LOOP .ENTRY SCAN_CALLED_SYMBOL,^M ; ; ARGUMENTS PASSED ; R10 POINTS TO NEW SYMBOL TO OUTPUT AND WHOS CALLED ROUTINES TO OUTPUT ; LEVEL CURRENT CALLING LEVEL ; TREE_QUEUE QUEUE OF SYMBOLS IN LINE TO MAIN ROUTINE-TO CHECK ; FOR RECURSION ; ; OUTPUT THE SYMBOL WITH LEADING DOTS MOVC5 #0,NULL,#0,#132,OUTPUT_LINE ;CLEAR THE LINE CLRL OUTPUT_STRING MOVAL OUTPUT_LINE,OUTPUT_STRING ;INIT THE DESCRIPTER CLRL OVERFLOW ;CLEAR OVERFLOW FLAG MULL3 #4,LEVEL,R6 ;GET NUMBER OF DOTS ;EACH LEVEL UP IN CALLED TREE-INDENT BY 4 LOCATIONS ;FILLING IN WITH DOTS BEQL 1$ ;IF LEVEL ZERO-SKIP NEXT PART CVTBL 24(R10),R7;GET LENGTH OF SYMBOL ADDL2 #3,R7 ;ACCOUNT FOR POSSABLE FLAGS ADDL3 R6,R7,R8;GET TOTAL LENGTH REQUIRED CMPL R8,LINE_COUNT;SEE IF TOO LONG BLEQ 2$ ;NO -LENGTH OK SUBL3 R7,LINE_COUNT,R6 ;GET NUMBER OF DOTS INCL OVERFLOW ;SET THE OVERFLOW FLAG 2$: MOVC5 #0,NULL,#^A/./,R6,OUTPUT_LINE ;FILL IN THE DOTS ; PUT IN VISUAL INDICATION OF NESTING LEVEL ;V2.03 MOVL #4,R0 ;V2.03 1002$: CMPB #^A/./,OUTPUT_LINE[R0] ;V2.03 BNEQ 1$ ;V2.03 MOVB #^A/+/,OUTPUT_LINE[R0] ;V2.03 ADDL2 #4,R0 ;V2.03 BRB 1002$ ;V2.03 1$: CVTBL 24(R10),R7 ;SYMBOLLENGTH MOVC3 R7,25(R10),L^OUTPUT_LINE(R6) ;FILL IN THE SYMBOL ;V1.21 ADDL3 R6,R7,OUTPUT_STRING ;UPDATE THE DESCRIPTER ADDL2 R7,R6 ;UPDATE R6 FOR FLAG INPUTS ; CHECK FOR OVERFLOW TSTL OVERFLOW BEQL 3$ MOVB #^A/*/,L^OUTPUT_LINE(R6) ;V1.21 INCL R6 INCL OUTPUT_STRING 3$: ; CHECK FOR UNDEFINED ENTRY POINT TSTB 56(R10) BNEQ 4$ ;DEFINED 103$: MOVB #^A/?/,L^OUTPUT_LINE(R6) ;V1.21 INCL R6 INCL OUTPUT_STRING 4$: ; CHECK FOR RECURSION CLRL RECURSION MOVAL TREE_QUEUE,R9 ;SCAN TREE QUEUE FOR THIS SYMBOL MOVL R9,R8 5$: MOVL (R8),R8 CMPL R8,R9 BEQL 6$ CMPC3 #32,8(R8),24(R10) BNEQ 5$ INCL RECURSION MOVB #^A/#/,L^OUTPUT_LINE(R6) ;V1.21 INCL OUTPUT_STRING 6$: ;OUTPUT THE COMPLETED LINE PUSHAL OUTPUT_STRING CALLS #1,PRINT_LINE TSTL RECURSION ;WAS THE SYMBOL RECURSIVE ?? BEQL 10$ ;NO RET ;YES-DON'T BOTHER TRYING TO GO DEEPER 10$: ;DOES THIS SYMBOL CALLED BY ANY ONE? MOVAL 16(R10),R6 CMPL 16(R10),R6 BNEQ 11$ ;YES RET ;NO ; PUSH CURRENT SYMBOL ON TREE STACK AND CALL TO GET NEXT LEVEL 11$: BITL #FLOW_DEPTH_FLAG,FLAG_WORD+4 ;V1.12 BEQL 1111$ ;V1.12 CMPL ENTRY_DEPTH,LEVEL ;V1.12 BGTR 1111$ ;V1.12 RET ;V1.12 1111$: MOVL #40,ARG1 ;GET AN ELEMENT FOR TREE ;V1.12 CALLG VM_ARG,ALLOCATE INSQUE (R0),@TREE_QUEUE+4 MOVL R0,R9 ;INSERT IN QUEUE AND COPY SYMBOL MOVC3 #32,24(R10),8(R9) INCL LEVEL MOVL R6,R7 ;SET UP TO SCANN FOR CALLED BY SYMBOLS 12$: MOVL (R7),R7 ;NEXT SYMBOL CMPL R6,R7 BEQL 100$ MOVAL SYMBOL_TABLE_QUEUE,R11 MOVL R11,R10 13$: MOVL (R10),R10 CMPL R10,R11 BEQL 12$ CMPC3 #32,8(R7),24(R10) BNEQ 13$ CALLG NULL,SCAN_CALLED_SYMBOL BRW 12$ 100$:;DONE AT THIS LEVEL-BACK UP EVERYTHING BY ONE DECL LEVEL REMQUE @TREE_QUEUE+4,R0 MOVL R0,ARG2 MOVL #40,ARG1 CALLG VM_ARG,FREE RET .PAGE .SUBTITLE CLEAN UP SYMBOL TABLE CLEAN_UP: PUSHAL TIME_OUTPUT ;V1.4 PUSHAL CODE_1 ;V1.4 CALLS #2,G^LIB$STAT_TIMER ;V1.4 PUSHAL TIME_OUTPUT+8 ;V1.4 PUSHAL CODE_2 ;V1.4 CALLS #2,G^LIB$STAT_TIMER ;V1.4 PUSHAL TIME_OUTPUT+12 ;V1.4 PUSHAL CODE_3 ;V1.4 CALLS #2,G^LIB$STAT_TIMER ;V1.4 PUSHAL TIME_OUTPUT+16 ;V1.4 PUSHAL CODE_4 ;V1.4 CALLS #2,G^LIB$STAT_TIMER ;V1.4 PUSHAL TIME_OUTPUT+20 ;V1.4 PUSHAL CODE_5 ;V1.4 CALLS #2,G^LIB$STAT_TIMER ;V1.4 MOVL ELEMENT_64+4,ELEMENT_64+12 ;V1.4 MOVL ELEMENT_128+4,ELEMENT_128+12 ;V1.4 MOVL ELEMENT_192+4,ELEMENT_192+12 ;V1.4 MOVL ELEMENT_256+4,ELEMENT_256+12 ;V1.4 MOVL ELEMENT_LARGE+4,ELEMENT_LARGE+12 ;V1.4 BITL #FLOW_SAVE_FLAG,FLAG_WORD+4 ;V1.12 BEQL 1$ ;V1.12 MOVL #1,ENTRY_SAVED_FLAG ;V1.12 BRW DONE_CLEAN_UP ;V1.12 1$: CALLG NULL,CLEAR_FLOW_TABLE ;V1.12 BRW DONE_CLEAN_UP ;V1.12 .ENTRY CLEAR_FLOW_TABLE,^M ;V1.12 OUTTER_LOOP: REMQUE @SYMBOL_TABLE_QUEUE,R11 BVS TABLE_EMPTY ; REMOVE ALL CALL ELEMENTS CALLS_LOOP: REMQUE @8(R11),R10 BVS CALLS_EMPTY MOVL #40,ARG1 MOVL R10,ARG2 CALLG VM_ARG,FREE BRB CALLS_LOOP CALLS_EMPTY: CALLED_LOOP: REMQUE @16(R11),R10 BVS CALLED_EMPTY MOVL #40,ARG1 MOVL R10,ARG2 CALLG VM_ARG,FREE BRB CALLED_LOOP CALLED_EMPTY: MOVL #120,ARG1 ;V1.21 MOVL R11,ARG2 CALLG VM_ARG,FREE BRB OUTTER_LOOP .PAGE .SUBTITLE RESET SCRATCH FILES TABLE_EMPTY: CLRQ SYMBOL_TABLE_QUEUE ;V1.10 CLRL ENTRY_SAVED_FLAG ;V1.12 RET ;V1.12 DONE_CLEAN_UP: ;V1.12 PUSHAL TIME_CLEANUP ;V1.4 PUSHAL CODE_1 ;V1.4 CALLS #2,G^LIB$STAT_TIMER ;V1.4 PUSHAL TIME_CLEANUP+8 ;V1.4 PUSHAL CODE_2 ;V1.4 CALLS #2,G^LIB$STAT_TIMER ;V1.4 PUSHAL TIME_CLEANUP+12 ;V1.4 PUSHAL CODE_3 ;V1.4 CALLS #2,G^LIB$STAT_TIMER ;V1.4 PUSHAL TIME_CLEANUP+16 ;V1.4 PUSHAL CODE_4 ;V1.4 CALLS #2,G^LIB$STAT_TIMER ;V1.4 PUSHAL TIME_CLEANUP+20 ;V1.4 PUSHAL CODE_5 ;V1.4 CALLS #2,G^LIB$STAT_TIMER ;V1.4 CALLG NULL,DUMP_STATS ;V1.4 CALLG NULL,G^LIB$INIT_TIMER ;V1.4 CALLG NULL,CLOSE_SCRATCH CALLG NULL,OPEN_SCRATCH RET .END