.MCALL .MODULE .MODULE ISFDAT,VERSION=05,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 (SYSLIB) ; ; CALLABLE ENTRIES: ; ; ISFDAT ; ; ENVIRONMENT: ; ; This routine can be used by any job running in a single-job ; or multi-job environment. It uses "TRAP" to provide error ; processing. ; ; INCLUDE FILES: ; ; SYSMAC.SML ; RT-11 system macro library. .MCALL .SFDAT ; SFDAT programmed request. ; ; EXTERNAL REFERENCES: ; .GLOBL $ERRP0 ; Entry point to EMT error conversion rtn .GLOBL $NXVAL ; Entry point to next value routine. .GLOBL $NXADR ; Entry point to next address .GLOBL $SYSLB ; Include system library work area. .WEAK $MSARG ; Trap code for missing argument .SBTTL ISFDAT - Fortran-callable Routine ; ; ++ ; FUNCTIONAL DESCRIPTION: ; ; The ISFDAT function saves and then modifies the Directory Entry ; Date Word of specified RT-11 file. ; ; CALLING SEQUENCE: ; ; i = ISFDAT(chan,dblk,[idate] [,iold] ) ; ; INPUT PARAMETERS: ; ; R5 - address of ISFDAT argument block ; ; 0(R5) - argument count of ISFDAT call ; 2(R5) - is 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 changed ; 6(R5) - address of the integer date in RT-11 date format, if this ; argument is #0 or omitted, the system date is used. ; 10(R5) - address to return previous date value ; ; OUTPUT PARAMETERS: ; ; iold - file creation date before it was modified ; ; RETURNED FUNCTION VALUE: ; ; i = 0 normal return ; 1 channel active ; 2 file not found ; 3 invalid operation (ie. non file-structured device) ; ;-- .PSECT SYS$I,I SFDAT:: ISFDAT:: MOV (R5)+,R4 ; R4 (low byte) contains arg count CALL $NXVAL ; get a channel number BCS ERR ; missing arg -> err MOV R0,R1 ; save channel number CALL $NXADR ; get dblk BCS ERR ; missing arg -> err MOV R0,R2 ; save dblk CLR R0 ; date= 0,if not supplied CALL $NXVAL ; get idate, if any MOV R0,R3 ; save date CLR R0 ; 'iold' = 0, if not supplied CALL $NXADR ; get 'iold' addr MOV R0,R5 ; save it SUB #6,SP ; allocate space for SFDAT arg blk .SFDAT SP,R1,R2,R3 ; perform SFDAT call ROR R1 TST R5 ; was 'iold' requested ? BEQ 10$ ; no, then return MOV R0,@R5 ; return old date value 10$: ROL R1 CALL $ERRP0 ; Get and convert any errors (status in R0) ADD #6,SP RETURN ERR: TRAP $MSARG ; Handle any missing arguments in call; RETURN .END