.MCALL .MODULE .MODULE MRKT,VERSION=08,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) ; ; ENVIRONMENT: ; ; The I-form routine can be used by any job running in a single- ; or multi-job environment with timer support. ; ; The M-form routine can be used by any job running in a single- ; or multi-job mapped or unmapped environment with timer support. ; ; "TRAP" is used for error processing. ; ; INCLUDE FILES: ; ; SYSMAC.SML ; RT-11 system macro library. .MCALL .MRKT ; MRKT programmed request. ; ; EXTERNAL REFERENCES: ; .GLOBL $ERRP0 ; Entry point to EMT error conversion routine. .GLOBL $NXADR ; Entry point to next address routine. .GLOBL $NXVAL ; Entry point to next value routine. .GLOBL $SYSLB ; Include system library work area. .WEAK $MSARG ; Trap code for missing argument .GLOBL $AMODE ;Routine to process AMODE argument ; ;- .SBTTL MRKT - Fortran Callable Routine ;+ ; ; FUNCTIONAL DESCRIPTION: ; ; Posts a timer which will cause an asynchronous completion ; routine to be entered after a specified time interval has ; elapsed. ; ; CALLING SEQUENCE: ; ; i = MRKT ( id, crtn, itime [, amode] ) ; ; INPUT PARAMETERS: ; ; R5 address of argument list ; 0(R5) argument count (low byte) ; 2(R5) address of timer id to pass to completion routine ; 4(R5) address of assembly language completion routine ; 6(R5) address of time block (two-word internal timer format) ; 10(R5) address of string specifying assembly language completion ; routine address space {U|S} ; ; RETURNED FUNCTION VALUE: ; ; R0 Return code ; 0 no error, timer posted ; 1 no queue element available, timer not posted ; -19. invalid mode argument ; ;- .PSECT SYS$I MRKT:: MOV (R5)+,R4 ;R4 (low byte) contains argument count CALL $NXVAL ;Get timer ID BCS 20$ ;Argument is required... MOV R0,R3 ;R3 = Timer ID CALL $NXADR ;Get completion routine address BCS 20$ ;Argument is required... MOV R0,R2 ;R2 -> Completion routine CALL $NXADR ;Get address of timer block BCS 20$ ;Argument is required... MOV R0,R1 ;R1 -> Time block CALL $AMODE ;Process AMODE argument BCS 30$ ;Invalid mode specified, ; error code (-19.) in R0 BIS (SP)+,R2 ;Set the address space flag SUB #<4*2>,SP ;Make space on stack for EMT area .MRKT SP,R1,R2,R3 ;Perform the request ADD #<4*2>,SP ;Dump the EMT area 10$: CALLR $ERRP0 ;Convert and return any EMT errors 20$: TRAP $MSARG ;Report missing arguments 30$: RETURN .END