.MCALL .MODULE .MODULE INDIN0,VERSION=04,COMMENT= GLOBAL=.IIN0 ; 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 calls ;+ ;System macro calls. ;- .MCALL .EXIT, .RCTRLO, .GVAL, .ELRG, .RDBDF .MCALL GCLDF$, RT5DF$, DEFIN$ .RDBDF ;Define region assignments GCLDF$ ;Define GCML block offsets. RT5DF$ ;Define RT offsets. DEFIN$ ;Definitions for IND files .PSECT INDIN0 TTNAM: .RAD50 /TT/ .SBTTL MAP - Mapping for exit status errors. ;+ ;MAP - Error mapping table. ;- MAP:: .BYTE 1 ;Equivalant to RT's success (0 after ASR) .BYTE 0 ;Equivalant to RT's warning (1 after ASR) .BYTE 2 ;Equivalant to RT's error (2 after ASR) .BYTE 2 ;Equivalant to RT's error (3 after ASR) .BYTE 4 ;Equivalant to RT's fatal (4 after ASR) .BYTE 4 ;Equivalant to RT's fatal (5 after ASR) .BYTE 4 ;Equivalant to RT's fatal (6 after ASR) .BYTE 4 ;Equivalant to RT's fatal (7 after ASR) .BYTE -1 ;Equivalant to RT's unconditional (10) abort .BYTE -1 ;Equivalant to RT's unconditional (11) abort .BYTE -1 ;Equivalant to RT's unconditional (12) abort .BYTE -1 ;Equivalant to RT's unconditional (13) abort .BYTE -1 ;Equivalant to RT's unconditional (14) abort .BYTE -1 ;Equivalant to RT's unconditional (15) abort .BYTE -1 ;Equivalant to RT's unconditional (16) abort .BYTE -1 ;Equivalant to RT's unconditional (17) abort .EVEN .SBTTL INDIN0 - Indirect initialization. ;+ ;INDIN0 ;Routine to initialize IND tables, etc. ; ; R0 = Pointer to the start of RMON ; ;Call: CALL INDIN0 ;Initialize symbol table ; ;Contents of registers are undetermined. ;- .ENABL LSB INDIN0::MOV #INDERR,@#TRAPPC ;Set up trap vector - PC CLR @#TRAPPS ;Initialize trap vector - PS BIT #,$CONFG(R0) ;XM? BEQ 1$ ;No BIS #140000,@#TRAPPS ;Set user mode bits for traps 1$: BITB #IN$RUN,$INDIR(R0) ;Forced on by KMON (is it second pass)? BEQ 2$ ;Initial pass - set up ;+ ;If not the initial pass the RUN bit must be cleared and the exit status must ;be saved converted to IND error status (to be consistent with RSX) and then ;stored in SPSEXS. ;- BICB #,$INDIR(R0) ;Clear out random bits CLR R1 ;Initialize working register BISB $INDER(R0),R1 ;Get KMON's exit status ASR R1 ;Map it for IND status MOVB MAP(R1),SPSEXS+SEVAL ;Store corresponding IND error status BMI 4$ ;Branch to exit if 'U' error - unconditional BR 3$ ;Do common code 2$: .GVAL #EMTBLK,#SYSVER ;Get the system version number CMPB #5,R0 ;Are we using the correct monitor? BGT VERERR ;No, give error and exit CALL INDIN1 ;Set up pointers and tables MOV RMON,R0 ;Make sure that R0 contains start of RMON 3$: MOV LIMIT+2,PRGEND ;Store highest available limit for .FETCHes CLRB $INDER(R0) ;Make sure there are no left over error bits ;in RMON stored error offset BIS #,@#$JSW ;Enable lower case in JSW .RCTRLO ;Make sure CTRL/O is reset CLRB GCML+F$FLGS ;Make sure GCML FDB is closed. CLRB TSTFDB+F$FLGS ;Make sure test file FDB is closed. MOV #TTFDB,R1 ;R1 -> terminal FDB. MOV #TTNAM,R2 ;Point to the RAD50 "TT" name. CALL $OPENR ;Open the terminal for read. RETURN ;Return to caller 4$: BIS #,REGION+R.GSTS ;Set eliminate global region bit .ELRG #EMTBLK,#REGION ;Return region to free list .EXIT ;If unconditional error exit immediately VERERR: TRAP ERVER ;Wrong version of RT-11 .DSABL LSB .END