.MCALL .MODULE .MODULE IGFINF,VERSION=02,COMMENT=,IDENT=NO,LIB=YES ; 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. .SBTTL Module Declarations .NLIST .ENABL LC .DSABL GBL .NLIST CND .LIST ; ++ ; FACILITY: ; ; RT-11 System Subroutine Library ; ; ENVIRONMENT: ; ; This routine can be used by any job running in a single-job ; or multi-job environment. ; ; CALLABLE ENTRIES: ; ; IGFINF, IGFDAT, IGFSTA ; ; INCLUDE FILES: ; ; SYSMAC.SML ; RT-11 system macro library .MCALL .SFINF ; Entry point to SFINF programmed request ; EXTERNAL REFERENCES: ; .GLOBL $GSFIN ; Entry point to get file information routine .GLOBL $NXVAL ; Entry point to next value routine .GLOBL $NXADR ; Entry point to next address routine .GLOBL $SYSLB ; Include system library work area .GLOBL $ARGER ; Code for missing argument .GLOBL $ERRM0 ; Get and convert any errors .SBTTL IGFDAT - Fortran-callable Routine ; ; ++ ; FUNCTIONAL DESCRIPTION: ; ; The IGFDAT function returns the Directory Entry Date Word of specified ; RT-11 file. ; ; CALLING SEQUENCE: ; ; Form: i = IGFDAT (chan, dblk, idate) ; ; INPUT PARAMETERS: ; ; R5 - address of IGFDAT argument block ; ; 0(R5) - argument count of IGFDAT call ; 2(R5) - address of the integer value of the RT-11 channel to be used ; 4(R5) - address of the four word RT-11 file specification, in Radix-50, ; of the file whose date is being requested ; 6(R5) - address to return file creation date (Directory Entry Date Word) ; ; OUTPUT PARAMETERS: ; ; idate - Directory Entry Date Word ; ; RETURNED FUNCTION VALUE: ; ; i = 0 - Normal return ; -1 - Channel was open ; -2 - File not found ; -3 - Invalid operation (internal error) ; -4 - Offset invalid (internal error) ; -257. - Required argument missing ; ; -- .SBTTL IGFSTA - Fortran-callable Routine ; ; ++ ; FUNCTIONAL DESCRIPTION: ; ; The IGFSTA function returns the Directory Entry Status Word of specified file. ; ; CALLING SEQUENCE: ; ; i = IGFSTA (chan, dblk, ista) ; ; INPUT PARAMETERS: ; ; R5 - address of IGFSTA argument block ; ; 0(R5) - argument count of IGFSTA call ; 2(R5) - address of the integer value of the RT-11 channel to be used ; 4(R5) - address of the four word RT-11 file specification, in Rad50, ; of the file whose status word is being returned ; 6(R5) - address to return the Directory Entry Status Word ; ; OUTPUT PARAMETRS: ; ; ista - Directory Entry Status Word ; ; RETURNED FUNCTION VALUE: ; ; i = 0 - Normal return ; -1 - Channel was open ; -2 - File not found ; -3 - Invalid operation (internal error) ; -4 - Offset invalid (internal error) ; -257. - Required argument missing ; -- .SBTTL IGFINF - Fortran-callable Routine ; ; ++ ; FUNCTIONAL DESCRIPTION: ; ; The IGFINF function returns specified Directory Entry Word of specific file. ; ; CALLING SEQUENCE: ; ; i = IGFINF (chan, dblk, offset, ival) ; ; INPUT PARAMETERS: ; ; R5 - address of IGFINF argument block ; ; 0(R5) - argument count of IGFINF call ; 2(R5) - address of the integer value of the RT-11 channel to be used ; 4(R5) - address of the four word RT-11 file specification, in Radix-50, ; of the file whose status word is being returned ; 6(R5) - address of offset to requed Directory Entry Word ; 10(R5) - address to return the specified Directory Entry Word ; ; ; OUTPUT PARAMETERS: ; ; ival - Specified Directory Entry Word ; ; RETURNED FUNCTION VALUE: ; ; i = 0 - Normal return ; -1 - Channel was open ; -2 - File not found ; -3 - Invalid operation (internal error) ; -4 - Invalid offset (internal error) ; -257. - Required argument missing ; -- .SBTTL IGFINF - Fortran-callable routine .PSECT SYS$I,I .MCALL .BR .ENABL LSB GFINF:: IGFINF:: MOV #-1,-(SP) ;set flag to indicate this is IGFINF BR GFINF$ ;Join common code GFDAT:: IGFDAT:: MOV #14,-(SP) ;Offset to Directory Entry Date Word, save it BR GFINF$ ;Join common code GFSTA:: IGFSTA:: CLR -(SP) ;Offset= 0 to Directory Entry Status Word, save it .BR GFINF$ ;Join common code GFINF$: MOV (R5)+,R4 ;Get count CALL $NXADR ;Get channel address BCS 20$ ;Required arg missing MOVB @R0,R1 ;Get channel number CALL $NXADR ;Get dblk address BCS 20$ ;Required arg missing MOV R0,R2 ;Save it TST @SP ;Is it IGFINF ? BGE 10$ ;no, then branch CALL $NXVAL ;Get offset value BCS 20$ ;Required arg missing MOV R0,@SP ;Offset, save it 10$: CALL $NXADR ;get addr of 'idat','ista','ifin' BCC 30$ ;addr presented 20$: TST (SP)+ ;Align stack MOV #$ARGER,R0 ;Required arg missing RETURN 30$: CLR R3 ;value = 0 CLR -(SP) ;Oper = GET=0, save it .BR $GSFIN ;Call common service .DSABL LSB ;+ ; $GSFNF Service Routine - ; ; ; On entry: ; ; R1 = the channel number ; R2 -> dblk ; R3 = value to be placed in the specified offset location ; R0 -> 'idat','ista','ifin' or 'iold' ; if 'iold' missing R0 = 0 ; @SP = 'oper' indicates the operation to be performed ; 2(SP) = offset ;- .ENABL LSB $GSFIN:: MOV R0,R5 ;save addr(or flag) to return parameter SUB #4*2,SP ;Reserve 4 words .SFINF SP,R1,R2,R3,USER,12(SP),10(SP) ROL R1 ;save carry bit ADD #<4+2>*2,SP ;Pop stack TST R5 ;arg was passed ? BEQ 10$ ;no, then skip MOV R0,@R5 ;Save returned value 10$: ROR R1 CALLR $ERRM0 ;Process any error code .DSABL LSB .END