.TITLE SYMFINDLEI ; locate SYMBOL$AST_LEI paged data .IDENT "SYMBOL v3%4.091" ; internals demo program... ;++ ; This routine will locate the Loadable Executive Image (LEI) which contains ; the AST routines used by SYMBOL. The AST routines are maintained in a LEI ; to provide for a common mechanism for supporting SYMBOL on OpenVMS/VAX and ; OpenVMS/AXP. ;-- ; Copyright © 1993, 1994 by Brian Schenkenberger and TMESIS Consulting ; All rights reserved. ; ------------------------ ; This software is provided "as is" and is supplied for informational purpose ; only. No warranty is expressed or implied and no liability can be accepted ; for any actions or circumstances incurred from the use of this software or ; from the information contained herein. The author makes no claim as to the ; suitablility or fitness of this software or information contain herein for a ; particular purpose. ; ------------------------- ; This software may be copied and distributed only with the inclusion of this ; copyright notice. ;-- ; Modifications: ; 24-FEB-1994: Created. ;-- .SBTTL DECLARATIONS .LIBRARY "SYS$LIBRARY:LIB.MLB" ; look here during assembly $LDRIMGDEF ; LEI block definitions ;---------------------------------------------------------------------------- .NTYPE ...ON_ALPHA...,R31 .IIF EQ,<...ON_ALPHA...@-4&^XF>-5, ALPHA=0 .IIF DF,ALPHA, .DISABLE FLAGGING ;---------------------------------------------------------------------------- .SBTTL XDELTA DEBUGGER OPTIONAL BREAKPOINT MACRO ;;; XDELTA_DEBUG = 1 .MACRO XDELTA_BREAKPOINT .IIF DF,XDELTA_DEBUG, JSB G^INI$BRK .ENDM ;---------------------------------------------------------------------------- .PSECT $$DATA,WRT,NOEXE,LONG ;123456789012345678901234567890123456789 SYMBOL$AST_LEI: .ASCID /SYS$LOADABLE_IMAGES:SYMBOL$AST_LEI.EXE/ ;---------------------------------------------------------------------------- .PSECT $$CODE_RO,PIC,GBL,SHR,NOWRT,EXE,LONG FIND_LDRIMG:: .IIF DF,ALPHA, .JSB_ENTRY INPUT=<>,OUTPUT= XDELTA_BREAKPOINT .IF DF ALPHA MOVAL G^EXE$GQ_BASIMGMTX,R0 ; get adr of QW base image mutex MOVL G^CTL$GL_PCB,R4 ; get our PCB adr JSB G^SCH$LOCKR_QUAD ; lock the QW mutex .IF_FALSE PUSHR #^m ; save R1,R2,R4,R5,R6,R7 MOVAL G^EXE$GL_BASIMGMTX,R0 ; get adr of base image mutex MOVL G^CTL$GL_PCB,R4 ; get our PCB adr JSB G^SCH$LOCKR ; lock the mutex .ENDC MOVQ SYMBOL$AST_LEI,R6 ; move SYMBOL_LEI descr to R6:R7 MOVAB @#LDR$GQ_IMAGE_LIST,R4 ; get loadable image listhead address MOVL R4,R5 ; put in r5 so we can walk-the-list 10$: MOVL (R5),R5 ; get an entry from the list CMPL R4,R5 ; check if its the 'end-of-the-line' BEQL 20$ ; list exhausted? ('end-of-the-line') CMPB LDRIMG$B_IMGNAMLEN(R5),-; could this be the one? check if the R6 ; ==- image name is the right size BNEQU 10$ ; better luck next time around CMPC3 R6,(R7),- ; length checked out ok! now check if LDRIMG$T_IMGNAM(R5) ; ==- the image name is correct BNEQU 10$ ; better luck next time around MOVL LDRIMG$L_PAG_W_BASE(R5),- ; get adr of paged data region R3 ; where AST adr's are stored BGEQ 20$ ; image must have been unloaded PUSHL #1 ; return with success. BRB 30$ 20$: PUSHL # ; return warning! non-existant page 30$: .IF DF ALPHA MOVAL G^EXE$GQ_BASIMGMTX,R0 ; get adr of QW base image mutex MOVL G^CTL$GL_PCB,R4 ; get our PCB adr JSB G^SCH$UNLOCK_QUAD ; unlock the QW mutex POPL R0 ; restore the status value .IF_FALSE MOVAL G^EXE$GL_BASIMGMTX,R0 ; get adr of base image mutex MOVL G^CTL$GL_PCB,R4 ; get our PCB adr JSB G^SCH$UNLOCK ; unlock the mutex POPL R0 ; restore the status value POPR #^m ; restore R1,R2,R4,R5,R6,R7 .ENDC RSB .END ;SYMDELSET