.title IMAGE_HEADER - Reads the image header .ident /0487.1/ ; .link "SYS$SYSTEM:SYS.STB"/selective_search .library "SYS$LIBRARY:LIB" $DSCDEF $IHDDEF $IHIDEF $SSDEF .disable GLOBAL .external CTL$GL_IMGHDRBF $OFFSET 4,POSITIVE, ; Argument pointer offsets .psect code, rd,nowrt,exe,long .entry IMAGE_HEADER, ^M cmpl (ap), #1 ; Make sure that there is at least bgeq ENOUGH_ARGUMENTS ; one argument to this routine movl #SS$_INSFARG, r0 ; ret ENOUGH_ARGUMENTS: ; Get identification of the image movl @#CTL$GL_IMGHDRBF, r11 ; R11 = address of image buffer movl (r11), r6 ; R6 = address of image header cvtwl IHD$W_IMGIDOFF(r6), r7 movab (r6)[r7], r7 ; R7 = address of ID block cvtbl IHI$T_IMGID(r7), r0 ; Length of the ID string movl ident(ap), r8 movc5 r0, (r7), - #32, DSC$W_LENGTH(r8), - @DSC$A_POINTER(r8) cmpl (ap), #2 bgeq RETURN_TIME movzbl #1, r0 ret RETURN_TIME: ; Get the time the image was linked $ASCTIM_S timbuf=@time(ap), - timadr=IHI$Q_LINKTIME(r7) ret .end