.MCALL .MODULE .MODULE INDSU1,VERSION=06,COMMENT= GLOBAL=.ISU1 ; 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. ; ;REVISION HISTORY ; ; 005 On 5.6 source kit ; ; 006 11-JUL-97 Tim Shoppa ; now has 4-digit year filled in by TIMDAT ; .ENABL GBL,LC .SBTTL Macro definitions. ;+ ;System macro calls. ;- .MCALL .GTIM, .DATE .MCALL FDBDF$, GCLDF$, DEFIN$ FDBDF$ ;Define FDB offsets. GCLDF$ ;Define GCML offsets. DEFIN$ ;Definitions for IND files .PSECT INDSU1 .SBTTL SRSYM - Search symbol table ;+ ;SRSYM ;General routine to search for symbol. If SPCSYM is set, search the special ;symbol table. Otherwise search the internal symbol table. ; ; Input: CRNTS = Symbol to look for (RAD-50 packed in 2 words). ; ; Output: R4 - first free hole ; C-bit set -> R5 - end of symbol table. ; C-bit clear -> R5 - entry for symbol. ;- .ENABL LSB SRSYM:: TSTB SPCSYM ;Searching for special symbol? BEQ 2$ ;No MOV #SPCTAB,R5 ;Yes, set start of table MOV SPCEND,R4 ;Set end of table ;+ ;First see if the symbol is one of the irregular special symbols (FILSPC ;or EXSTRI). ;- CMP CRNTS,#<^RFIL> ;Is this "FILSPC"? BNE 1$ ;No CMP CRNTS+2,#<^RSPC> ;Check the last three characters BNE 1$ ;No, it is not "FILSPC" MOV #FILSPC,R5 ;Return a pointer to the special symbol BR 10$ ;Clear c-bit to show symbol found 1$: CMP CRNTS,#<^REXS> ;Is this "EXSTRI"? BNE 4$ ;No CMP CRNTS+2,#<^RTRI> ;Check the last three characters BNE 4$ ;No, it is not "EXSTRI" MOV #SPSDEV,R5 ;Return a pointer to the special symbol BR 10$ ;Clear c-bit to show symbol found ;+ ;If not special symbol check global symbol table (if symbol is global). ;- 2$: TSTB GLOBS ;Can it be a global symbol? BEQ 3$ ;No MOV SYMTB,R5 ;Yes, get start of global symbol table MOV SYMFR,R4 ;Set address of free space CALL 4$ ;Try to find symbol in global table BCC 10$ ;If found exit, else try local symbol table ;+ ;Check local symbol table. ;- 3$: MOV SYMND,R5 ;Start of local table MOV LSYME,R4 ;End of local symbol table ;+ ;Symbol table search routine for special, global, and local symbols. ;- 4$: CMP R5,R4 ;End of defined symbols? BHIS 11$ ;Yes CMP CRNTS,@R5 ;First half of symbol name match? BNE 5$ ;No CMP CRNTS+2,2(R5) ;Second half of symbol name match? BEQ 7$ ;Yes 5$: CLR R3 BISB SELEN(R5),R3 ;Get length of value field of this entry ADD #SEVAL+1,R3 ;Add offset to value field plus 1 BIC #<1>,R3 ; to round up 6$: ADD R3,R5 ;Point to next entry BR 4$ ;Test next symbol ;+ ;Symbol found in table. If the symbol is not a special symbol exit from ;routine. If the symbol is a special symbol find out which one and get ;stored value. ;- 7$: TSTB SPCSYM ;Is it a special symbol? BEQ 10$ ;No, just exit CMP R5,# ; special symbol? BNE 8$ ;No MOV SYMND,R1 ;Get start of local symbol table SUB SYMFR,R1 ;Minus end of global symbols to get # of free ;bytes in symbol table MOV R1,SEVAL(R5) ;Store the value BR 10$ ;Return to caller 8$: CMP R5,#SPSDAT ; special symbol? BEQ 9$ ;Yes CMP R5,#SPSD4Y ; special symbol? BEQ 9$ ;Yes CMP R5,#SPSTIM ;