.MCALL .MODULE .MODULE INDFDC,VERSION=02,COMMENT= ; Copyright (c) 1998 by Mentec, Inc., Nashua, NH. ; All rights reserved ; ; This software is furnished under a license for use only on a ; single computer system and may be copied only with the ; inclusion of the above copyright notice. This software, or ; any other copies thereof, may not be provided or otherwise ; made available to any other person except for use on such ; system and to one who agrees to these license terms. Title ; to and ownership of the software shall at all times remain ; in Mentec, Inc. ; ; The information in this document is subject to change without ; notice and should not be construed as a commitment by Digital ; Equipment Corporation, or Mentec, Inc. ; ; Digital and Mentec assume no responsibility for the use or ; reliability of its software on equipment which is not supplied ; by Digital or Mentec, and listed in the Software Product ; Description. .ENABL GBL,LC .SBTTL Macro definitions ;+ ;Macro calls. ;- .MCALL GCLDF$, DEFIN$ GCLDF$ ;Define GCML offsets DEFIN$ ;Definitions for IND files .PSECT INDFDC .SBTTL INDFDC - Process change in IND level ;+ ;INDFDC ;Process indirect file depth change. ;- INDFDC::CALL CLRLBT ;Clear label table 1$: CMPB G.CDEP(R0),INDDEP ;Has depth changed? BLT 2$ ;Yes, decreased BGT 6$ ;Yes, increased JMP IND2 ;No, go process this command ;+ ;Bring back an old indirect file. ;- 2$: TSTB SKIP ;Skipping to label? BNE 5$ ;Branch if yes MOV SSB,SSP ;Restore subroutine stack pointer MOV (SP)+,SSB ;Restore beginning of subroutine stack MOV (SP)+,LSYME ;Restore end of local symbol table MOV (SP)+,ERLBL+4 ;Restore error label MOV (SP)+,ERLBL+2 ; MOV (SP)+,ERLBL ; MOV (SP)+,LIFLGA ;Restore mode flags MOV (SP)+,LIFLG2 ;Restore second mode flag word MOV (SP)+,SYMND ;Restore local symbol table start MOV STATUS,SEVAL+SPSEXS ;Set up exit status MOV (SP)+,STATUS ;Restore previous command file status MOV LIFLGA,.LIFLG ;Update real flag word with old mode setting MOV LIFLG2,.LFLG2 ;And second word 3$: TSTB BLOCK ;Any context to remove? BEQ 4$ ;Branch if no CALL POPBLK ;Yes, pop block context from stack BR 3$ ;look for more 4$: MOV (SP)+,BLOCK ;Restore old block context CLR ENDAT ;Clear default-data mode flag DEC INDDEP ;Decrement indirect file depth BNE 1$ ;Try until level goes to zero TRAP EREOF ;End of file error 5$: TRAP ERUDL ;Undefined label error ;+ ;Set up a new indirect file level. ; ;*** NOTE *** ;The "CHAIN" routine expects words to be saved on the stack in exactly the ;order it is done below!! ;- 6$: MOV BLOCK,-(SP) ;Save current block context CLR BLOCK ;Initialize new block context MOV STATUS,-(SP) ;Save command file status MOV SYMND,-(SP) ;Save pointer to local symbol table start MOV LIFLG2,-(SP) ;Second flag word MOV LIFLGA,-(SP) ;Save listing control flags MOV ERLBL,-(SP) ;Save error processing routine MOV ERLBL+2,-(SP) ;Label MOV ERLBL+4,-(SP) ; MOV LSYME,-(SP) ;Save pointer to local symbol table end MOV SSB,-(SP) ;Save beginning of subroutine stack MOV SSP,SSB ;Set new beginning of subroutine stack CLR ERLBL ;Set no error processing label MOV SYMND,LSYME ;Set end of new local symbol table INC INDDEP ;Increment indirect file depth MOV #EX$SUC,STATUS ;Default new status to success JMP INDPAR ;Call INDPAR to handle parameter passing .DSABL LSB .END