.MCALL .MODULE .IIF NDF SYSL$X, SYSL$X = 0 ;Build I-form routines by default .IF EQ SYSL$X .MODULE ISDAT,VERSION=05,COMMENT=,IDENT=NO,LIB=YES .IFF ;EQ SYSL$X .MODULE MSDAT,VERSION=05,COMMENT=,IDENT=NO,LIB=YES .ENDC ;EQ SYSL$X ; 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: ; ; ISDAT, IDSATC, ISDATW ; or ; MSDAT, MSDATC, MSDATW ; ; ENVIRONMENT: ; ; The I-form routines can be used by any job running in a multi- ; job environment. ; ; The M-form routines can be used by any job running in a multi- ; job mapped environment. ; ; "TRAP" is used to provide error processing. ; ; INCLUDE FILES: ; ; SYSMAC.SML ; RT-11 system macro library .MCALL .BR .MCALL .SDATC ; Send data programmed request .LIBRARY "SRC:SYSTEM.MLB" .MCALL ..SDAT ..SDAT ; ; EXTERNAL REFERENCES: ; .GLOBL $SYSLB ; Include SYSLIB version number .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 .GLOBL $NOARG ; Missing argument code .WEAK $MSARG ; Trap code for missing argument .IF NE SYSL$X .GLOBL $BCMOD ;Routine to handle BMODE and CMODE arguments .ENDC ;NE SYSL$X ; ; CONDITIONALS: ; ; SYSL$X (0) Build I-form library routines ; 1 Build M-form library routines ; ;- .SBTTL {I|M}SDAT{_|C|W} - Fortran Callable Routines ;+ ; ; FUNCTIONAL DESCRIPTION: ; ; ISDAT, MSDAT ; Posts a request to send data to another job on the ; system. Program execution continues. ; ISDATC, MSDATC ; Posts a request to send data to another job on the ; system. Program execution continues. When the request ; completes, the specified asynchronous completion routine ; is executed. ; ISDATW, MSDATW ; Posts a request to send data to another job on the ; system. Program execution continues when the request ; completes. ; ; CALLING SEQUENCE: ; ; i = ISDAT ( buff, wcnt ) ; i = ISDATC ( buff, wcnt, crtn ) ; i = ISDATW ( buff, wcnt ) ; ; i = MSDAT ( buff, wcnt [,bmode] ) ; i = MSDATC ( buff, wcnt, crtn [,bmode] [,cmode] ) ; i = MSDATW ( buff, wcnt [,bmode] ) ; ; INPUT PARAMETERS: ; ; R5 address of argument block ; 0(R5) argument count ; 2(R5) address of the array containing the data to be transfered ; 4(R5) address of number of words to transfer ; ; arguments beyond the second one depend on the call: ; ; ISDATC: ; 6(R5) address of the assembly language routine to be executed ; when the request completes ; ; MSDAT, MSDATW: ; 6(R5) address of string specifying the data buffer address space ; ; MSDATC: ; 6(R5) address of the assembly language routine to be executed ; when the request completes ; 10(R5) address of the string specifying the data buffer address space ; 12(R5) address of the string specifying the completion routine ; address space ; ; OUTPUT PARAMETERS: ; ; R0 Function return ; 0 normal return ; 1 no other job exists currently ; -19. Invalid mode specified (M-form request) ; ; Notes: ; o If entered from ISDATF, R1 already contains address of ; the completion routine ; ;- .PSECT SYS$I,I .ENABL LSB .IF EQ SYSL$X SDAT:: ISDAT:: .IFF ;EQ SYSL$X MSDAT:: .ENDC ;EQ SYSL$X MOV #1,R1 ;Set asynch flag (non-wait mode) BR $SEND ; and join common code .IF EQ SYSL$X SDATC:: ISDATC:: .IFF ;EQ SYSL$X MSDATC:: .ENDC ;EQ SYSL$X MOV #$NOARG,R1 ;Indicate completion routine required BR $SEND ; and join common code .IF EQ SYSL$X SDATW:: ISDATW:: .IFF ;EQ SYSL$X MSDATW:: .ENDC ;EQ SYSL$X CLR R1 ;Reset asynch flag (wait mode) .BR $SEND ; and join common code .IF EQ SYSL$X $SEND:: .IFF ;EQ SYSL$X $SEND: .ENDC ;EQ SYSL$X MOV (R5)+,R4 ;R4 (low byte) contains argument count SUB #L.SDAU,SP ;Make room on stack for EMT area MOV SP,R2 ;R2 -> Buffer in EMT area ADD #A.BUF,R2 ; ... ; Arguments are in an order which permit loading of the EMT area ; in forward order beginning with the buffer address CALL $NXADR ;Get buffer address BCS ERR ;Argument is required... MOV R0,(R2)+ ;Move to EMT area CALL $NXVAL ;Get word count BCS ERR ;Argument is required... MOV R0,(R2)+ ;Move to EMT area CMP R1,#$NOARG ;Completion routine required? BNE 10$ ;Nope... CALL $NXADR ;Yes, get its address BCS ERR ;Argument is required... MOV R0,R1 ;R1 -> Completion routine 10$: .IF NE SYSL$X CALL $BCMOD ;Handle the BMODE and CMODE arguments BCS 20$ ;Invalid mode specified, ; error code (-19.) in R0 MOV (SP)+,R2 ;R2 = Buffer mapping mask .IFF ;NE SYSL$X .SDATC SP,CRTN=R1 ;Perform the I-form request .IFT ;NE SYSL$X .SDATC SP,CRTN=R1,BMODE=*BYPASS*,CMODE=R2 ;Perform the M-form request .ENDC ;NE SYSL$X CALL $ERRP0 ;Perform EMT error conversion 20$: ADD #L.SDAU,SP ;Dump the EMT area RETURN ERR: TRAP $MSARG ;Report missing arguments RETURN .DSABL LSB .END