.title IMAGESUBS - Get IMAGE info for C .library 'sys$share:lib' $ifddef $ihddef $ihidef $ssdef .psect IMAGESUBS$$CODE,pic,usr,con,rel,lcl,shr,exe,nowrt,novec ;++ ; IMI_LINKTIME - Retrieve linktime of main executing image ; imi_linktime(&quad_pointer) ; ;-- .entry IMI_LINKTIME, ^m<> movl g^CTL$GL_IMGHDRBF,r0 ;grab pointer to HDRBF array moval @(r0),r0 ;actual IHD address movzwl IHD$W_IMGIDOFF(r0),r1 ;get offset to IDENT information addl r0,r1 ;r1 points to IDENT section movaq IHI$Q_LINKTIME(r1),@4(AP) ;shove address backto caller movzwl #SS$_NORMAL,r0 ;allok ret ;++ ; IMI_IDENT - Retrieve internal identification strings from main image ; imi_ident(&name_buffer,&ident_buffer) ; ;-- .entry IMI_IDENT, ^m movl g^CTL$GL_IMGHDRBF,r0 ;grab pointer to HDRBF array moval @(r0),r0 ;actual IHD address movzwl IHD$W_IMGIDOFF(r0),r1 ;get offset to IDENT information addl r0,r1 ;r1 points to IDENT section movab IHI$T_IMGNAM(r1),r2 ;address of source movzbl (r2),r3 ;extract source length addl3 #1,r3,r4 ;prep for output area ASCIZ copy pushr #^m movc5 r3,1(r2),#0,r4,@4(AP) ;Zing! ASCIZ'd copy popr #^m movab IHI$T_IMGID(r1),r2 ;address of source movzbl (r2),r3 ;extract source length addl3 #1,r3,r4 ;prep for output area ASCIZ copy movc5 r3,1(r2),#0,r4,@8(AP) ;Zing! ASCIZ'd copy movzwl #SS$_NORMAL,r0 ;allok ret ;++ ; IMI_FILESPEC- Retrieve internal filename path ; imi_filespec(&path_buffer) ; ;-- .entry IMI_FILESPEC, ^m movl g^CTL$GL_IMGHDRBF,r0 ;grab pointer to HDRBF array moval @4(r0),r1 ;actual IFD address movq IFD$Q_CURPROG(r1),r1 ;grab descriptor of image name movzwl r1,r1 ;extract source length only addl3 #1,r1,r3 ;prep for output area ASCIZ copy movc5 r1,(r2),#0,r3,@4(AP) ;Zing! ASCIZ'd copy movzwl #SS$_NORMAL,r0 ;allok ret .end