.MCALL .MODULE .MODULE ISDATF,06,COMMENT=,IDENT=NO,LIB=YES,GLOBAL=.SDATF ; 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 Declaration .NLIST .ENABL LC .DSABL GBL .NLIST CND .LIST ; ++ ; FACILITY: ; ; RT-11 System Subroutine Library (SYSLIB) ; ; CALLABLE ENTRIES: ; ; ISDATF ; ; ENVIRONMENT: ; ; This routines can be used by any job running in a multi-job ; environment. It uses "TRAP" to provide error processing. ; ; ; INCLUDE FILES: ; ; SYSMAC.SML ; RT-11 system macro library .MCALL .SDATC ; Send data programmed request ; ; EXTERNAL REFERENCES: ; .GLOBL $SYSLB ; Include SYSLIB version number .GLOBL $CMPLT ; Entry point to set-up linkage to a Fortran ; completion routine. .GLOBL $SEND ; Entry point to ISDAT common code .GLOBL $NOARG ; Missing argument code .GLOBL $NXADR ; Entry point to the next address rtn .GLOBL $NXVAL ; Entry point to the next value rtn .GLOBL $ERRP0 ; Entry point to EMT error conversion rtn .WEAK $MSARG ; Trap code for missing argument .SBTTL ISDATF - Fortran-callable Routines ;++ ; FUNCTIONAL DESCRIPTION: ; ; ISDATF routine transfers a specified nember of words from ; one job to the other. When the other job accepts the message, ; the specified FORTRAN subprogram is activated. ; The buffer containing the message should not be modified until ; the message has been received by the other job. ; ; ; CALLING SEQUENCE: ; ; I = ISDATF( buff, wcnt, area, crtn ) ; ; INPUT PARAMETERS: ; ; R5 - address of ISDATF argument block ; ; 0(R5) - argument count of ISDATF call ; 2(R5) - address of the array containg the data to be transfered ; 4(R5) - address of number of words to transfer ; 6(R5) - address of a four-word area to be set for link information ; 10(R5) - address of the FORTRAN routine to be actovated ; on complition of the transfer ; ; OUTPUT PARAMETERS: ; ; R0 - status of the tansfer request ; ; ROUTINE VALUE: ; ; 0 - normal return ; 1 - no other job exists currently ; ; MODIFICATION HISTORY: ; ; 13-APR-1997 Tim Shoppa ; ISDATF was badly broken in 5.6 when ISDAT.MAC was ; "upgraded" to mapped environment operation. The entry ; point $ISDAT:: in ISDAT.MAC is now useless for ISDATF's ; purposes. So now ISDATF no longer calls common code ; in ISDAT - instead, it is all self-contained. ; ; -- .PSECT SYS$I,I SDATF:: ISDATF::CMPB #4,@R5 ; all arg present ? BNE ERR2 ; no, then err ADD #6,R5 ; r5 -> addr of area CMP #$NOARG,@R5 ; missing AREA ? BEQ ERR2 ; yes, then err CMP #$NOARG,2(R5) ; missing CRTN ? BEQ ERR2 ; yes, then err MOV (R5)+,R1 ; R1 -> area MOV R1,-(SP) ; set compl. rtn. addr CALL $CMPLT ; set up linkage area SUB #10,R5 ; back up to beginning of args MOV SP,R1 ; TST (R1)+ ; save original stack pntr MOV (R5)+,R4 ; R4 (low byte) arg count CALL $NXADR ; get buff BCS ERR ; missing arg -> err CLR -(SP) ; allocate space for WCNT MOV R0,-(SP) ; store buff on arg block CALL $NXVAL ; get wcnt BCS ERR ; missing arg -> err MOV R0,2(SP) ; store wcnt addr CLR -(SP) ; null word CLR -(SP) ; sp -> arg block .SDATC SP MOV R1,SP ;*c* restore stack CALLR $ERRP0 ; Get and convert any errors (status in R0). ERR: MOV R1,SP ; restore stack ERR2: TRAP $MSARG ; handle any missing arguments in call; RETURN .END