.TITLE USRNAM.MAC 87c26a 17-SEP-80/26-Mar-87. .ENABL LC ; Author: N. A. Bourgeois, Jr. ; NAB Software Services, Inc. ; PO Box 20009 ; Albuquerque, NM 87154 ; The code and information in this software is subject to ; change without notice and should not be construed as a ; commitment by NAB Software Services, Inc. NAB Software ; Services,Inc. assumes no responsibility for any errors ; that may appear in this software. ; ; ; NOTICE ; ; This software is sponsored by NAB Software Services, Inc. ; Neither NAB Software Services, Inc., nor any of their ; employees, nor any of their contractors, subcontractors, ; or their employees makes any warranty, express or implied, ; or assumes any legal liability or responsibility for the ; accuracy, completeness or usefulness of any information, ; apparatus, product or process disclosed, or represents ; that its use would not infringe privately owned rights. ; THIS SOFTWARE WAS ORIGINALLY ISSUED BY SANDIA NATIONAL ; LABORATORIES, OPERATED FOR THE UNITED STATES DEPARTMENT ; OF ENERGY BY SANDIA CORPORATION. ; ; NOTICE ; ; THIS SOFTWARE WAS ORIGINALLY SPONSORED BY THE UNITED ; STATES GOVERNMENT. NEITHER THE UNITED STATES GOVERNMENT ; NOR THE UNITED STATES DEPARTMENT OF ENERGY, NOR ANY OF ; THEIR EMPLOYEES, NOR ANY OF THEIR CONTRACTORS, ; SUBCONTRACTORS, OR THEIR EMPLOYEES MAKES ANY WARRANTY, ; EXPRESS OR IMPLIED, OR ASSUMES ANY LEGAL LIABILITY OR ; RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS OR ; USEFULNESS OF ANY INFORMATION, APPARATUS, PRODUCT OR ; PROCESS DISCLOSED, OR REPRESENTS THAT ITS USE WOULD NOT ; INFRINGE PRIVATELY OWNED RIGHTS. ; ; THIS WORK WAS ORIGINALLY FUNDED BY: ; ; HEADQUARTERS, ESD / OCB / STOP 36 ; HANSCOM AIR FORCE BASE, MA 04731 .SBTTL EDIT RECORD 17-SEP-80/26-Mar-87. ;17-SEP-80 ORIGINAL CREATION. ;18-SEP-80 ADDED GLOBAL TO LOCATE DATA IN LINK MAP. ;10-OCT-80 CHANGED TITLE, REVISED AND ADDED ISPBLK. ;25-MAR-81 CORRECTED ADDRESSING ERROR. CORRECTED EMT # ERRORS. ;08-APR-81 ADDED THE "MEMSET" AND ITSLIC" ROUTINES. RENAMED ; "TSXTST" TO "ITSLIN". ADDED FUNCTION CALLING CODE. ; MADE CODE REENTRANT. ;14-APR-81 ADDED STATEMENT ABOUT REENTRANT CODE TO DESCRIPTION. ;26-FEB-82 ADDED IDENTIFICATION CODE. ;06-Jan-84 Maintenance assumed by NAB Software Services, Inc. ;28-Jan-84 Added the IFLINF, ISTFTM, GTUNAM, STUNAM, ISTPRV, ; ISPCTL, DOIT2, DOIT3, and DOIT4 routines. ;31-Jul-84 Corrected stack error in DOIT2, DOIT3, and DOIT4 ; routines. ;09-Oct-84 Converted from TSXMSC.MAC. Minor revisions for V5.1. ;26-Feb-86 Revised for V6.0. Changed the STUNAM routine ; description. ;26-Mar-87 Revised for V6.2. Added NAB Software disclaimer. .PAGE .SBTTL DESCRIPTION 17-SEP-80/28-Jan-84. ; This module contains the user name support routines. The module is ; a part of the library of FORTRAN callable TSX-Plus EMT support ; routines. The code is reentrant. ; Get the user name associated with the current job. ; ; Calling sequence: ; ; CALL GTUNAM ( USRNAM ) ; ; where: USRNAM is the name of the twelve-character array that ; is to receive the user name ASCII string. ; Set the user name associated with the current job. ; ; Calling sequences: ; ; CALL STUNAM ( USRNAM [ , IERR ] ) ; or ; IERR = STUNAM ( USRNAM ) ; ; where: USRNAM is the name of the twelve-character array that ; contains the user name ASCII string. ; ; IERR is negative or as follows: ; ; 0 The job does not have SETNAME ; privilege. .PAGE .SBTTL DIRECTIVES 17-SEP-80/26-Mar-87. .IDENT \87c26a\ ;TELL LINKER OUR VERSION .PSECT TSXLIB,I .GLOBL TSLBID .WORD TSLBID .DSABL GBL .SBTTL ASSIGNMENTS 28-Jan-84/. ERRBYT = 52 ;EMT error code locationn NOERR = -1 ;code for no error condition .PAGE .SBTTL ENTRY POINTS 17-SEP-80/09-Oct-84. ; Get the user name associated with the current job. ; GTUNAM::MOV #147 ,R1 ;EMT code CLR R2 ;EMT id CALL DOIT3 ;get the name RETURN ; Set the user name associated with the current job. ; STUNAM::MOV #147 ,R1 ;EMT code MOV #1 ,R2 ;EMT id CALL DOIT3 ;set the name RETURN .PAGE .SBTTL SUPPORTING SUBROUTINES 17-SEP-80/09-Oct-84. DOIT3: MOV 2(R5) ,-(SP) ;pass argument 1 address TST -(SP) ;bump the stack pointer MOV SP ,R0 ;set up the EMT pointer MOVB R1 ,1(R0) ;hi byte = EMT code MOVB R2 ,(R0) ;lo byte = EMT id MOV #NOERR ,R1 ;no error code EMT 375 ;let TSX do it BCC 1$ ; if no error CLR R1 ; if error MOVB @#ERRBYT,R1 ; get the code 1$: CMPB #2 ,(R5) ;subroutine error return? BNE 2$ ; no MOV R1 ,@4(R5) ; yes 2$: MOV R1 ,R0 ;function error return CMP (SP)+ ,(SP)+ ;fix the stack pointer RETURN .SBTTL END 17-SEP-80/. .END