From fd7fb7ce9ec84f553d93bdc00d871ca56b4aa3aa Mon Sep 17 00:00:00 2001 From: Kevin Lyda <kevin@ie.suberic.net> Date: Sun, 31 Jan 2016 00:45:28 +0000 Subject: [PATCH] Converted more files. No idea what this was in. All lines had ^A<8d> in front of them but sed wouldn't touch them for some reason. :%s/^A.// in vi removed them - ^A entered with C-vC-a. --- decus/vax85c/bulletin/clidef.mar | 6 +- decus/vax85c/bulletin/hpwd.mar | 446 ++++++++++++++--------------- decus/vax85c/bulletin/setuic.mar | 108 +++---- decus/vax85c/bulletin/setuser.mar | 166 +++++------ decus/vax85c/bulletin/useropen.mar | 308 ++++++++++---------- 5 files changed, 517 insertions(+), 517 deletions(-) diff --git a/decus/vax85c/bulletin/clidef.mar b/decus/vax85c/bulletin/clidef.mar index bf2baba..b633374 100644 --- a/decus/vax85c/bulletin/clidef.mar +++ b/decus/vax85c/bulletin/clidef.mar @@ -1,3 +1,3 @@ -� .LIBRARY /SYS$LIBRARY:LIB.MLB/ -� $CLIDEF GLOBAL -� .END + .LIBRARY /SYS$LIBRARY:LIB.MLB/ + $CLIDEF GLOBAL + .END diff --git a/decus/vax85c/bulletin/hpwd.mar b/decus/vax85c/bulletin/hpwd.mar index 45d9653..d035df1 100644 --- a/decus/vax85c/bulletin/hpwd.mar +++ b/decus/vax85c/bulletin/hpwd.mar @@ -1,223 +1,223 @@ -�.TITLE HPWD - hash user password -�.IDENT 'V02-002' -� -�; This code was gotten by disassembling the AUTHORIZE program. -�; It is quite shameful that DEC has not seen fit to provide -�; this as a system service. -� -�; If you want lots of good comments, see the fiche. -� -�; e _lib$code:_lib$code+68 -� -� -�; Inputs: PWDDSC -- Addres of password descriptor -�; ENCRYPT -- Encryption algorithm index (byte) -�; SALT - random number (word) -�; USRDSC - Address of username descriptor -� -�; output: OUTDSC -- Address of encrypted output descriptor -� -�OUTDSC=4 -�PWDDSC=OUTDSC+4h -�ENCRYPT=PWDDSC+4 -�SALT=ENCRYPT+4 -�USRDSC=SALT+4 -� -�.PSECT _LIB$CODE RD,NOWRT,PIC,SHR,BYTE,EXE -� -�; AUTODIN-II polynomial table used by CRC algorithm -�AUTODIN: -� .LONG ^X000000000,^X01DB71064,^X03B6E20C8,^X026D930AC,^X076DC4190 -� .LONG ^X06B6B51F4,^X04DB26158,^X05005713C,^X0EDB88320,^X0F00F9344 -� .LONG ^X0D6D6A3E8,^X0CB61B38C,^X09B64C2B0,^X086D3D2D4,^X0A00AE278 -� .LONG ^X0BDBDF21C -� -�; Purdy polynomial coefficients. Prime, but don't need to be� -�Purdy_Poly:� -�c: -� .LONG -83,-1R -� .LONG -179,-1 -� .LONG -257,-1 -� .LONG -323,-1 -� .LONG -363,-1 -� -�.ENTRY LGI$HPWD,^M<R2,R3,R4> -� MOVAQ @outdsc(AP),R4e -� MOVAQ @4(R4),R4 -� TSTB encrypt(AP) -� BGTRU 10$ -� MNEGL #1,R0 -� MOVAQ @pwddsc(AP),R1� -� CRC autodin,R0,(R1),@4(R1)0 -� CLRL R13 -� MOVQ R0,(R4) -� BRB 20$ -� -�10$: CLRQ (R4)^ -� MOVAQ @pwddsc(AP),R3. -� BSBB COLLAPSE_R2 -� ADDW2 salt(AP),3(R4)e -� MOVAQ @usrdsc(AP),R3 -� BSBB COLLAPSE_R2 -� PUSHAQ (R4)3 -� CALLS #1,PURDY1 -� -�20$: MOVL #1,R0 -� RET -� -� -�COLLAPSE_R2: -� MOVZWL (R3),R0 -� BEQL 20$ -� MOVAL @4(R3),R2 -� PUSHR #^M<R1,R2>, -� MOVL R0,R1e -�5$: CMPB (R2)+,#32 -� BNEQ 7$ -� DECL R1 -�7$: SOBGTR R0,5$) -� MOVL R1,R0 -� POPR #^M<R1,R2> -�10$: BICL3 #-8,R0,R1 -� ADDB2 (R2)+,(R4)[R1] -� SOBGTR R0,10$R -�20$: RSB -� -�a=59 -�n0=1@24-3. -�n1=1@24-63 -� -� -�.ENTRY PURDY,^M<r2,r3,r4,r5> -� MOVQ @4(AP),-(SP) -� BSBW PQMOD_R0 -� MOVAQ (SP),R4 -� MOVAQ PURDY_POLY,R5 -� MOVQ (R4),-(SP)V -� PUSHL #n1 -� BSBB PQEXP_R3E -� MOVQ (R4),-(SP)0 -� PUSHL #n0-n1� -� BSBB PQEXP_R3� -� MOVQ (R5)+,-(SP) -� BSBW PQADD_R0B -� BSBW PQMUL_R2$ -� MOVQ (R5)+,-(SP) -� MOVQ (R4),-(SP)R -� BSBW PQMUL_R2> -� MOVQ (R5)+,-(SP) -� BSBW PQADD_R04 -� MOVQ (R4),-(SP)0 -� BSBB PQMUL_R2� -� MOVQ (R5)+,-(SP) -� BSBW PQADD_R0E -� MOVQ (R4),-(SP)r -� BSBB PQMUL_R2S -� MOVQ (R5)+,-(SP) -� BSBW PQADD_R0V -� BSBW PQADD_R0M -� MOVQ (SP)+,@4(AP)S -� MOVL #1,R0 -� RET -� -�PQEXP_R3:( -� POPR #^M<r3> -� MOVQ #1,-(SP) -� MOVQ 8+4(SP),-(SP) -� TSTL 8+8(SP) -� BEQL 30$ -�10$: BLBC 8+8(SP),20$ -� MOVQ (SP),-(SP) -� MOVQ 8+8(SP),-(SP) -� BSBB PQMUL_R2( -� MOVQ (SP)+,8(SP) -� CMPZV #1,#31,8+8(SP),#0 -� BEQL 30$ -�20$: MOVQ (SP),-(SP)- -� BSBB PQMUL_R2D -� EXTZV #1,#31,8+8(SP),8+8(SP)B -� BRB 10$ -� -�30$: MOVQ 8(SP),8+8+4(SP) -� MOVAQ 8+8+4(SP),SPD -� JMP (R3)( -� -�u=0S -�v=u+4 -�y=u+8 -�z=y+4� -� -�PQMOD_R0:� -� POPR #^M<R0> -� CMPL v(SP),#-1 -� BLSSU 10$ -� CMPL u(SP),#-a -� BLSSU 10$ -� ADDL2 #a,u(SP)8 -� ADWC #0,v(SP) -�10$: JMP (R0) -� -�PQMUL_R2: -� POPR #^M<r1> -� MOVL SP,R2 -� PUSHL z(R2) -� PUSHL v(R2) -� BSBB EMULQ -� BSBB PQMOD_R0( -� BSBB PQLSH_R0L -� PUSHL y(R2) -� PUSHL v(R2) -� BSBB EMULQ -� BSBB PQMOD_R0 -� PUSHL z(R2) -� PUSHL u(R2) -� BSBB EMULQ -� BSBB PQMOD_R0� -� BSBB PQADD_R0= -� BSBB PQADD_R0� -� BSBB PQLSH_R0 -� PUSHL y(R2) -� PUSHL u(R2) -� BSBB EMULQ -� BSBB PQMOD_R0U -� BSBB PQADD_R0 -� MOVQ (SP)+,Y(R2) -� MOVAQ Y(R2),SP( -� JMP (R1)_ -� -�EMULQ: -� EMUL 4(SP),8(SP),#0,-(SP)P -� CLRL -(SP) -� TSTL 4+8+4(SP) -� BGEQ 10$ -� ADDL2 4+8+8(SP),(SP)P -�10$: TSTL 4+8+8(SP) -� BGEQ 20$ -� ADDL2 4+8+4(SP),(SP)B -�20$: ADDL2 (SP)+,4(SP) -� MOVQ (SP)+,4(SP) -� RSB U -� -�PQLSH_R0:M -�.ENABLE LSB -� POPR #^M<r0> -� PUSHL v(SP) -� PUSHL #a -� BSBB EMULQ -� ASHQ #32,Y(SP),Y(SP) -� BRB 10$ -� -�PQADD_R0:B -� POPR #^M<R0> -�10$: ADDL2 u(SP),y(SP) -� ADWC v(SP),z(SP) -� BLSSU 20$ -� CMPL z(SP),#-1 -� BLSSU 30$ -� CMPL y(SP),#-a -� BLSSU 30$ -�20$: ADDL2 #a,y(SP)A -� ADWC #0,z(SP)P -�30$: MOVAQ Y(SP),SP) -� JMP (R0) -�.END +.TITLE HPWD - hash user password +.IDENT 'V02-002' + +; This code was gotten by disassembling the AUTHORIZE program. +; It is quite shameful that DEC has not seen fit to provide +; this as a system service. + +; If you want lots of good comments, see the fiche. + +; e _lib$code:_lib$code+68 + + +; Inputs: PWDDSC -- Addres of password descriptor +; ENCRYPT -- Encryption algorithm index (byte) +; SALT - random number (word) +; USRDSC - Address of username descriptor + +; output: OUTDSC -- Address of encrypted output descriptor + +OUTDSC=4 +PWDDSC=OUTDSC+4h +ENCRYPT=PWDDSC+4 +SALT=ENCRYPT+4 +USRDSC=SALT+4 + +.PSECT _LIB$CODE RD,NOWRT,PIC,SHR,BYTE,EXE + +; AUTODIN-II polynomial table used by CRC algorithm +AUTODIN: + .LONG ^X000000000,^X01DB71064,^X03B6E20C8,^X026D930AC,^X076DC4190 + .LONG ^X06B6B51F4,^X04DB26158,^X05005713C,^X0EDB88320,^X0F00F9344 + .LONG ^X0D6D6A3E8,^X0CB61B38C,^X09B64C2B0,^X086D3D2D4,^X0A00AE278 + .LONG ^X0BDBDF21C + +; Purdy polynomial coefficients. Prime, but don't need to be� +Purdy_Poly:� +c: + .LONG -83,-1R + .LONG -179,-1 + .LONG -257,-1 + .LONG -323,-1 + .LONG -363,-1 + +.ENTRY LGI$HPWD,^M<R2,R3,R4> + MOVAQ @outdsc(AP),R4e + MOVAQ @4(R4),R4 + TSTB encrypt(AP) + BGTRU 10$ + MNEGL #1,R0 + MOVAQ @pwddsc(AP),R1� + CRC autodin,R0,(R1),@4(R1)0 + CLRL R13 + MOVQ R0,(R4) + BRB 20$ + +10$: CLRQ (R4)^ + MOVAQ @pwddsc(AP),R3. + BSBB COLLAPSE_R2 + ADDW2 salt(AP),3(R4)e + MOVAQ @usrdsc(AP),R3 + BSBB COLLAPSE_R2 + PUSHAQ (R4)3 + CALLS #1,PURDY1 + +20$: MOVL #1,R0 + RET + + +COLLAPSE_R2: + MOVZWL (R3),R0 + BEQL 20$ + MOVAL @4(R3),R2 + PUSHR #^M<R1,R2>, + MOVL R0,R1e +5$: CMPB (R2)+,#32 + BNEQ 7$ + DECL R1 +7$: SOBGTR R0,5$) + MOVL R1,R0 + POPR #^M<R1,R2> +10$: BICL3 #-8,R0,R1 + ADDB2 (R2)+,(R4)[R1] + SOBGTR R0,10$R +20$: RSB + +a=59 +n0=1@24-3. +n1=1@24-63 + + +.ENTRY PURDY,^M<r2,r3,r4,r5> + MOVQ @4(AP),-(SP) + BSBW PQMOD_R0 + MOVAQ (SP),R4 + MOVAQ PURDY_POLY,R5 + MOVQ (R4),-(SP)V + PUSHL #n1 + BSBB PQEXP_R3E + MOVQ (R4),-(SP)0 + PUSHL #n0-n1� + BSBB PQEXP_R3� + MOVQ (R5)+,-(SP) + BSBW PQADD_R0B + BSBW PQMUL_R2$ + MOVQ (R5)+,-(SP) + MOVQ (R4),-(SP)R + BSBW PQMUL_R2> + MOVQ (R5)+,-(SP) + BSBW PQADD_R04 + MOVQ (R4),-(SP)0 + BSBB PQMUL_R2� + MOVQ (R5)+,-(SP) + BSBW PQADD_R0E + MOVQ (R4),-(SP)r + BSBB PQMUL_R2S + MOVQ (R5)+,-(SP) + BSBW PQADD_R0V + BSBW PQADD_R0M + MOVQ (SP)+,@4(AP)S + MOVL #1,R0 + RET + +PQEXP_R3:( + POPR #^M<r3> + MOVQ #1,-(SP) + MOVQ 8+4(SP),-(SP) + TSTL 8+8(SP) + BEQL 30$ +10$: BLBC 8+8(SP),20$ + MOVQ (SP),-(SP) + MOVQ 8+8(SP),-(SP) + BSBB PQMUL_R2( + MOVQ (SP)+,8(SP) + CMPZV #1,#31,8+8(SP),#0 + BEQL 30$ +20$: MOVQ (SP),-(SP)- + BSBB PQMUL_R2D + EXTZV #1,#31,8+8(SP),8+8(SP)B + BRB 10$ + +30$: MOVQ 8(SP),8+8+4(SP) + MOVAQ 8+8+4(SP),SPD + JMP (R3)( + +u=0S +v=u+4 +y=u+8 +z=y+4� + +PQMOD_R0:� + POPR #^M<R0> + CMPL v(SP),#-1 + BLSSU 10$ + CMPL u(SP),#-a + BLSSU 10$ + ADDL2 #a,u(SP)8 + ADWC #0,v(SP) +10$: JMP (R0) + +PQMUL_R2: + POPR #^M<r1> + MOVL SP,R2 + PUSHL z(R2) + PUSHL v(R2) + BSBB EMULQ + BSBB PQMOD_R0( + BSBB PQLSH_R0L + PUSHL y(R2) + PUSHL v(R2) + BSBB EMULQ + BSBB PQMOD_R0 + PUSHL z(R2) + PUSHL u(R2) + BSBB EMULQ + BSBB PQMOD_R0� + BSBB PQADD_R0= + BSBB PQADD_R0� + BSBB PQLSH_R0 + PUSHL y(R2) + PUSHL u(R2) + BSBB EMULQ + BSBB PQMOD_R0U + BSBB PQADD_R0 + MOVQ (SP)+,Y(R2) + MOVAQ Y(R2),SP( + JMP (R1)_ + +EMULQ: + EMUL 4(SP),8(SP),#0,-(SP)P + CLRL -(SP) + TSTL 4+8+4(SP) + BGEQ 10$ + ADDL2 4+8+8(SP),(SP)P +10$: TSTL 4+8+8(SP) + BGEQ 20$ + ADDL2 4+8+4(SP),(SP)B +20$: ADDL2 (SP)+,4(SP) + MOVQ (SP)+,4(SP) + RSB U + +PQLSH_R0:M +.ENABLE LSB + POPR #^M<r0> + PUSHL v(SP) + PUSHL #a + BSBB EMULQ + ASHQ #32,Y(SP),Y(SP) + BRB 10$ + +PQADD_R0:B + POPR #^M<R0> +10$: ADDL2 u(SP),y(SP) + ADWC v(SP),z(SP) + BLSSU 20$ + CMPL z(SP),#-1 + BLSSU 30$ + CMPL y(SP),#-a + BLSSU 30$ +20$: ADDL2 #a,y(SP)A + ADWC #0,z(SP)P +30$: MOVAQ Y(SP),SP) + JMP (R0) +.END diff --git a/decus/vax85c/bulletin/setuic.mar b/decus/vax85c/bulletin/setuic.mar index a584735..9436202 100644 --- a/decus/vax85c/bulletin/setuic.mar +++ b/decus/vax85c/bulletin/setuic.mar @@ -1,54 +1,54 @@ -�; -�; Name: SETUIC.MAR -�; -�; Type: Integer*4 Function (MACRO) -�; -�; Author: M. R. London -�; -�; Date: May 31, 1983 -�; -�; Purpose: To set the UIC of the current process (which turns out -�; to be the process running this program.) -�; -�; Usage: -�; status = SETUIC(group number, user number) -�; -�; status - $CMKRNL status return. 0 if arguments wrong. -�; group number - longword containing UIC group number -�; user number - longword containing UIC user number -�; -�; NOTES:S -�; Must link with SS:SYS.STBt -�;4 -� -� .Title SETUIC Set uic -� .IDENT /830531/ -�;� -�; Libraries:y -�;1 -� .LIBRARY /SYS$LIBRARY:LIB.MLB/e -�;o -�; Global variables: -�;t -� $PCBDEF -�;b -�; Executable: -�;h -� .PSECT SETUIC_CODE,EXE,NOWRT ; Executable codeI -� -� .ENTRY SETUIC,^M<R2,R3> -� CLRL R0 ; 0 is error coder -� MOVZBL (AP),R2 ; Get number of arguments -� CMPL R2,#2 ; Are there 2 arguments -� BNEQ 5$ ; If not, return -� MOVL @4(AP),R3 ; Group number into R3 -� ROTL #16,R3,R3 ; Move to upper half of R3 -� ADDL2 @8(AP),R3 ; User number to top half of R3 -� $CMKRNL_S ROUTIN=10$ ; Must run in kernel modeo -�5$: RETa -�10$: .WORD ^M<> ; Entry maskb -� MOVL SCH$GL_CURPCB,R2 ; Address of current process -� MOVL R3,PCB$L_UIC(R2) ; Set UIC to specified -� MOVZWL #SS$_NORMAL,R0 ; Normal ending -� RET -� .ENDG +; +; Name: SETUIC.MAR +; +; Type: Integer*4 Function (MACRO) +; +; Author: M. R. London +; +; Date: May 31, 1983 +; +; Purpose: To set the UIC of the current process (which turns out +; to be the process running this program.) +; +; Usage: +; status = SETUIC(group number, user number) +; +; status - $CMKRNL status return. 0 if arguments wrong. +; group number - longword containing UIC group number +; user number - longword containing UIC user number +; +; NOTES:S +; Must link with SS:SYS.STBt +;4 + + .Title SETUIC Set uic + .IDENT /830531/ +;� +; Libraries:y +;1 + .LIBRARY /SYS$LIBRARY:LIB.MLB/e +;o +; Global variables: +;t + $PCBDEF +;b +; Executable: +;h + .PSECT SETUIC_CODE,EXE,NOWRT ; Executable codeI + + .ENTRY SETUIC,^M<R2,R3> + CLRL R0 ; 0 is error coder + MOVZBL (AP),R2 ; Get number of arguments + CMPL R2,#2 ; Are there 2 arguments + BNEQ 5$ ; If not, return + MOVL @4(AP),R3 ; Group number into R3 + ROTL #16,R3,R3 ; Move to upper half of R3 + ADDL2 @8(AP),R3 ; User number to top half of R3 + $CMKRNL_S ROUTIN=10$ ; Must run in kernel modeo +5$: RETa +10$: .WORD ^M<> ; Entry maskb + MOVL SCH$GL_CURPCB,R2 ; Address of current process + MOVL R3,PCB$L_UIC(R2) ; Set UIC to specified + MOVZWL #SS$_NORMAL,R0 ; Normal ending + RET + .ENDG diff --git a/decus/vax85c/bulletin/setuser.mar b/decus/vax85c/bulletin/setuser.mar index 53b8e75..490004e 100644 --- a/decus/vax85c/bulletin/setuser.mar +++ b/decus/vax85c/bulletin/setuser.mar @@ -1,83 +1,83 @@ -�; -�; Name: SETUSER.MAR -�; -�; Type: Integer*4 Function (MACRO) -�; -�; Author: M. R. London -�; -�; Date: Jan 26, 1983 -�; -�; Purpose: To set the Username of the current process (which turns out -�; to be the process running this program.) -�; -�; Usage: -�; status = SETUSER(username) -�; -�; status - $CMKRNL status return. 0 if arguments wrong. -�; username - Character string containing username -�; -�; NOTES: -�; Must link with SS:SYS.STB -�; -� -� .Title SETUSER Set uicS -� .IDENT /830531/ -�;p -�; Libraries:t -�;M -� .LIBRARY /SYS$LIBRARY:LIB.MLB/n -�; -�; Global variables: -�; -� $PCBDEF -� $JIBDEF -�;t -�; local variables:e -�;o -� -� .PSECT SETUSER_DATA,NOEXEh -� -�NEWUSE: .BLKB 12 ; Contains new username -�OLDUSE: .BLKB 12 ; Contains old usernamet -�; -�; Executable: -�;0 -� .PSECT SETUSER_CODE,EXE,NOWRT ; Executable code -� -� .ENTRY SETUSER,^M<R2,R3,R4,R5,R6,R7,R8> -� CLRL R0 ; 0 is error code -� MOVZBL (AP),R8 ; Get number of arguments -� CMPL R8,#1 ; Correct number of arguments -� BLSS 5$ ; If not, return -� MOVZBL @4(AP),R6 ; Get size of string -� MOVL 4(AP),R7 ; Get address of descriptor -� MOVL 4(R7),R7 ; Get address of string -� MOVC5 R6,(R7),#32,#12,NEWUSE ; Get new username string -� CMPL R8,#2 ; Old username given? -� BLSS 2$ ; No -� MOVZBL @8(AP),R6 ; Get size of string -� MOVL 8(AP),R7 ; Get address of descriptor -� MOVL 4(R7),R7 ; Get address of string -� MOVC5 R6,(R7),#32,#12,OLDUSE ; Get old username string -� $CMKRNL_S ROUTIN=20$ ; Must run in kernel mode -� TSTL R0 ; If old username is checks with -� BEQL 2$ ; present process name, change -� MOVL #2,R0 ; to new username, else flagM -� RET ; error and returnG -�2$: $CMKRNL_S ROUTIN=10$ ; Must run in kernel mode -�5$: RETB -�10$: .WORD ^M<> ; Entry mask -� MOVL SCH$GL_CURPCB,R7 ; Address of current process -� MOVL PCB$L_JIB(R7),R7 ; Address of Job Info Blocki -� ; NOTE: MOVC destroys r0-r5; -� MOVC3 #12,NEWUSE,JIB$T_USERNAME(R7) ; change username JIBu -� MOVC3 #12,NEWUSE,CTL$T_USERNAME ; change username in P1 -� MOVZWL #SS$_NORMAL,R0 ; Normal ending -� RET -�20$: .WORD ^M<> ; Entry maskl -� MOVL SCH$GL_CURPCB,R7 ; Address of current process -� MOVL PCB$L_JIB(R7),R7 ; Address of Job Info Block� -� ; NOTE: MOVC destroys r0-r5M -� CMPC R6,OLDUSE,JIB$T_USERNAME(R7) ; change username JIBC -� RET -� .END +; +; Name: SETUSER.MAR +; +; Type: Integer*4 Function (MACRO) +; +; Author: M. R. London +; +; Date: Jan 26, 1983 +; +; Purpose: To set the Username of the current process (which turns out +; to be the process running this program.) +; +; Usage: +; status = SETUSER(username) +; +; status - $CMKRNL status return. 0 if arguments wrong. +; username - Character string containing username +; +; NOTES: +; Must link with SS:SYS.STB +; + + .Title SETUSER Set uicS + .IDENT /830531/ +;p +; Libraries:t +;M + .LIBRARY /SYS$LIBRARY:LIB.MLB/n +; +; Global variables: +; + $PCBDEF + $JIBDEF +;t +; local variables:e +;o + + .PSECT SETUSER_DATA,NOEXEh + +NEWUSE: .BLKB 12 ; Contains new username +OLDUSE: .BLKB 12 ; Contains old usernamet +; +; Executable: +;0 + .PSECT SETUSER_CODE,EXE,NOWRT ; Executable code + + .ENTRY SETUSER,^M<R2,R3,R4,R5,R6,R7,R8> + CLRL R0 ; 0 is error code + MOVZBL (AP),R8 ; Get number of arguments + CMPL R8,#1 ; Correct number of arguments + BLSS 5$ ; If not, return + MOVZBL @4(AP),R6 ; Get size of string + MOVL 4(AP),R7 ; Get address of descriptor + MOVL 4(R7),R7 ; Get address of string + MOVC5 R6,(R7),#32,#12,NEWUSE ; Get new username string + CMPL R8,#2 ; Old username given? + BLSS 2$ ; No + MOVZBL @8(AP),R6 ; Get size of string + MOVL 8(AP),R7 ; Get address of descriptor + MOVL 4(R7),R7 ; Get address of string + MOVC5 R6,(R7),#32,#12,OLDUSE ; Get old username string + $CMKRNL_S ROUTIN=20$ ; Must run in kernel mode + TSTL R0 ; If old username is checks with + BEQL 2$ ; present process name, change + MOVL #2,R0 ; to new username, else flagM + RET ; error and returnG +2$: $CMKRNL_S ROUTIN=10$ ; Must run in kernel mode +5$: RETB +10$: .WORD ^M<> ; Entry mask + MOVL SCH$GL_CURPCB,R7 ; Address of current process + MOVL PCB$L_JIB(R7),R7 ; Address of Job Info Blocki + ; NOTE: MOVC destroys r0-r5; + MOVC3 #12,NEWUSE,JIB$T_USERNAME(R7) ; change username JIBu + MOVC3 #12,NEWUSE,CTL$T_USERNAME ; change username in P1 + MOVZWL #SS$_NORMAL,R0 ; Normal ending + RET +20$: .WORD ^M<> ; Entry maskl + MOVL SCH$GL_CURPCB,R7 ; Address of current process + MOVL PCB$L_JIB(R7),R7 ; Address of Job Info Block� + ; NOTE: MOVC destroys r0-r5M + CMPC R6,OLDUSE,JIB$T_USERNAME(R7) ; change username JIBC + RET + .END diff --git a/decus/vax85c/bulletin/useropen.mar b/decus/vax85c/bulletin/useropen.mar index 10df081..eff725a 100644 --- a/decus/vax85c/bulletin/useropen.mar +++ b/decus/vax85c/bulletin/useropen.mar @@ -1,154 +1,154 @@ -�;------------------------------------------------------------------------------ -�; -�; Name: USER_OPEN -�; -�; Type: Multilple Function (MACRO) -�; -�; Author: T.W.Fredian -�; MIT Plasma Fusion Center -�; -�; Date: January 26, 1983 -�; -�; Version: -�; -�; Purpose: Used to permit qio access to files with fortran. -�; Returns channel and file size information and -�; provides file truncation capability. Files opened -�; with these useopens cannot be accessed using fortran- -�; reads and writes and the dispose= keyword on the -�; close of the file will have no effect. To make then -�; logical unit reuseable for normal RMS access you must -�; deassign the channel using SYS$DASSGN(%VAL(channel))� -�; and then use the close (unit= ) statement.d -�;e -�; Types of useropens provided: -�;s -�; USER_OPEN$OLD - open old file -�; USER_OPEN$NEW - open new file -�; USER_OPEN$TRUNCATE - open old file and truncate it -�; to the size specified by the -�; INITIALSIZE keyword of the open -�; -�; To receive the channel, open RMS status and size of the filei -�; include a common USER_OPEN as follows:e -�;o -�; Common /USER_OPEN/ CHANNEL,STATUS,SIZE- -�; Integer*4 CHANNEL - I/O channel assigned to the filei -�; Integer*4 STATUS - RMS status return of open -�; Integer*4 SIZE - Size of the file opened in blocks -�;i -�;------------------------------------------------------------------------------h -�;n -�; Call seqence: NONE - USEROPEN keyword of fortran OPEN statements -�; for example: -�;a -�; External USER_OPEN$NEW -�; .C -�; . -�; .Z -�; OPEN (UNIT=lun,FILE=filename,....,USEROPEN=USER_OPEN$NEW)i -�; -�;------------------------------------------------------------------------------r -�;Z -�; Description:f -�;p -�; Entry mask for USER_OPEN$OLD -�; Get the FAB address- -�; Set the user file open bit -�; Open old file -�; Save the channel -�; Save the size -�; Save the statusm -�; Return -� -�; Entry mask for USER_OPEN$NEW -�; Get the FAB addressE -�; Set the user file open bit -�; Open new file -�; Save the channel -�; Save the sizen -�; Save the statusS -�; Return -� -�; Entry mask for USER_OPEN$TRUNCATE- -�; Get the FAB address- -�; Get the RAB address- -�; Save the sizes -�; Open old file� -�; Connect file to record stream -�; Load the size of the file in the RAB -�; Set the access mode to relative file address -�; Find the last record in the file -�; Place the end of file marker at this locationN -�; Mark the file to be truncated on close -�; Close the file -�; Return -� -�; Enda -�;e -�;+-----------------------------------------------------------------------------f -� -� .TITLE USER_OPEN� -� .IDENT /V_830128/ -� -�; -�;------------------------------------------------------------------------------d -�;a -�; Global variables:f -�;f -� .PSECT USER_OPEN LONG,PIC,OVR,GBL,SHR,NOEXE -� -�CHANNEL: .BLKL 1 ; Channel numberi -�STATUS: .BLKL 1 ; Status return of open -�SIZE: .BLKL 1 ; Size of file -� -�;n -�;------------------------------------------------------------------------------- -�;- -�; Executable:- -�;- -� .PSECT $CODE LONG,PIC,USR,CON,REL,LCL,SHR,EXE,RD,NOWRT,NOVEC� -� -� .ENTRY USER_OPEN$OLD,^M<R2> ; Entry mask for USER_OPEN$OLD -� MOVL 4(AP),R2 ; Get the FAB addressa -� INSV #1,#FAB$V_UFO,#1,FAB$L_FOP(R2) ; Set the user file open bitS -� $OPEN FAB=(R2) ; Open old fileC -� MOVL FAB$L_STV(R2),CHANNEL ; Save the channel -� MOVL FAB$L_ALQ(R2),SIZE ; Save the size� -� MOVL R0,STATUS ; Save the status- -� RET ; Return- -� -� .ENTRY USER_OPEN$NEW,^M<R2> ; Entry mask for USER_OPEN$NEW -� MOVL 4(AP),R2 ; Get the FAB address -� INSV #1,#FAB$V_UFO,#1,FAB$L_FOP(R2) ; Set the user file open bitD -� INSV #0,#FAB$V_CBT,#1,FAB$L_FOP(R2) ; Disable contiguous best try -� $CREATE FAB=(R2) ; Open new filee -� MOVL FAB$L_STV(R2),CHANNEL ; Save the channel -� MOVL FAB$L_ALQ(R2),SIZE ; Save the sizen -� MOVL R0,STATUS ; Save the statust -� RET ; ReturnS -� -� .ENTRY USER_OPEN$TRUNCATE,^M<R2,R3,R4,R5> ; Entry mask for USER_OPEN$TRUNCATE -� MOVL 4(AP),R2 ; Get the FAB address( -� MOVL 8(AP),R3 ; Get the RAB address -� MOVL FAB$L_ALQ(R2),R4 ; Save the size -� INCL R4 ; Increment the size -� INSV #0,#FAB$V_SQO,#1,FAB$L_FOP(R2) ; Clear the sequential only bit -� $OPEN FAB=(R2) ; Open old fileL -� BLBC R0,CLOSE ; If unsuccessful branch to close -� $CONNECT RAB=@8(AP) ; Connect file to record stream -� BLBC R0,CLOSE ; If unsuccessful branch to closeN -� MOVL R4,RAB$L_RFA0(R3) ; Load the size of the file in the RAB -� MOVW #0,RAB$W_RFA4(R3)A -� MOVB #RAB$C_RFA,RAB$B_RAC(R3) ; Set the access mode to relative file address -� $FIND RAB=(R3) ; Find the last record in the file -� BLBC R0,CLOSE ; If unsuccessful branch to close -� $TRUNCATE RAB=(R3) ; Place the end of file marker at this locationI -� INSV #1,#FAB$V_TEF,#1,FAB$L_FOP(R2) ; Mark the file to be truncated on close -�CLOSE: PUSHL R0 ; Save error status -� $CLOSE FAB=(R2) ; Close the fileR -� POPL R0 ; Restore error status -� MOVL R0,STATUS ; Return the status -� RET ; ReturnR -� -� .END ; Enda +;------------------------------------------------------------------------------ +; +; Name: USER_OPEN +; +; Type: Multilple Function (MACRO) +; +; Author: T.W.Fredian +; MIT Plasma Fusion Center +; +; Date: January 26, 1983 +; +; Version: +; +; Purpose: Used to permit qio access to files with fortran. +; Returns channel and file size information and +; provides file truncation capability. Files opened +; with these useopens cannot be accessed using fortran- +; reads and writes and the dispose= keyword on the +; close of the file will have no effect. To make then +; logical unit reuseable for normal RMS access you must +; deassign the channel using SYS$DASSGN(%VAL(channel))� +; and then use the close (unit= ) statement.d +;e +; Types of useropens provided: +;s +; USER_OPEN$OLD - open old file +; USER_OPEN$NEW - open new file +; USER_OPEN$TRUNCATE - open old file and truncate it +; to the size specified by the +; INITIALSIZE keyword of the open +; +; To receive the channel, open RMS status and size of the filei +; include a common USER_OPEN as follows:e +;o +; Common /USER_OPEN/ CHANNEL,STATUS,SIZE- +; Integer*4 CHANNEL - I/O channel assigned to the filei +; Integer*4 STATUS - RMS status return of open +; Integer*4 SIZE - Size of the file opened in blocks +;i +;------------------------------------------------------------------------------h +;n +; Call seqence: NONE - USEROPEN keyword of fortran OPEN statements +; for example: +;a +; External USER_OPEN$NEW +; .C +; . +; .Z +; OPEN (UNIT=lun,FILE=filename,....,USEROPEN=USER_OPEN$NEW)i +; +;------------------------------------------------------------------------------r +;Z +; Description:f +;p +; Entry mask for USER_OPEN$OLD +; Get the FAB address- +; Set the user file open bit +; Open old file +; Save the channel +; Save the size +; Save the statusm +; Return + +; Entry mask for USER_OPEN$NEW +; Get the FAB addressE +; Set the user file open bit +; Open new file +; Save the channel +; Save the sizen +; Save the statusS +; Return + +; Entry mask for USER_OPEN$TRUNCATE- +; Get the FAB address- +; Get the RAB address- +; Save the sizes +; Open old file� +; Connect file to record stream +; Load the size of the file in the RAB +; Set the access mode to relative file address +; Find the last record in the file +; Place the end of file marker at this locationN +; Mark the file to be truncated on close +; Close the file +; Return + +; Enda +;e +;+-----------------------------------------------------------------------------f + + .TITLE USER_OPEN� + .IDENT /V_830128/ + +; +;------------------------------------------------------------------------------d +;a +; Global variables:f +;f + .PSECT USER_OPEN LONG,PIC,OVR,GBL,SHR,NOEXE + +CHANNEL: .BLKL 1 ; Channel numberi +STATUS: .BLKL 1 ; Status return of open +SIZE: .BLKL 1 ; Size of file + +;n +;------------------------------------------------------------------------------- +;- +; Executable:- +;- + .PSECT $CODE LONG,PIC,USR,CON,REL,LCL,SHR,EXE,RD,NOWRT,NOVEC� + + .ENTRY USER_OPEN$OLD,^M<R2> ; Entry mask for USER_OPEN$OLD + MOVL 4(AP),R2 ; Get the FAB addressa + INSV #1,#FAB$V_UFO,#1,FAB$L_FOP(R2) ; Set the user file open bitS + $OPEN FAB=(R2) ; Open old fileC + MOVL FAB$L_STV(R2),CHANNEL ; Save the channel + MOVL FAB$L_ALQ(R2),SIZE ; Save the size� + MOVL R0,STATUS ; Save the status- + RET ; Return- + + .ENTRY USER_OPEN$NEW,^M<R2> ; Entry mask for USER_OPEN$NEW + MOVL 4(AP),R2 ; Get the FAB address + INSV #1,#FAB$V_UFO,#1,FAB$L_FOP(R2) ; Set the user file open bitD + INSV #0,#FAB$V_CBT,#1,FAB$L_FOP(R2) ; Disable contiguous best try + $CREATE FAB=(R2) ; Open new filee + MOVL FAB$L_STV(R2),CHANNEL ; Save the channel + MOVL FAB$L_ALQ(R2),SIZE ; Save the sizen + MOVL R0,STATUS ; Save the statust + RET ; ReturnS + + .ENTRY USER_OPEN$TRUNCATE,^M<R2,R3,R4,R5> ; Entry mask for USER_OPEN$TRUNCATE + MOVL 4(AP),R2 ; Get the FAB address( + MOVL 8(AP),R3 ; Get the RAB address + MOVL FAB$L_ALQ(R2),R4 ; Save the size + INCL R4 ; Increment the size + INSV #0,#FAB$V_SQO,#1,FAB$L_FOP(R2) ; Clear the sequential only bit + $OPEN FAB=(R2) ; Open old fileL + BLBC R0,CLOSE ; If unsuccessful branch to close + $CONNECT RAB=@8(AP) ; Connect file to record stream + BLBC R0,CLOSE ; If unsuccessful branch to closeN + MOVL R4,RAB$L_RFA0(R3) ; Load the size of the file in the RAB + MOVW #0,RAB$W_RFA4(R3)A + MOVB #RAB$C_RFA,RAB$B_RAC(R3) ; Set the access mode to relative file address + $FIND RAB=(R3) ; Find the last record in the file + BLBC R0,CLOSE ; If unsuccessful branch to close + $TRUNCATE RAB=(R3) ; Place the end of file marker at this locationI + INSV #1,#FAB$V_TEF,#1,FAB$L_FOP(R2) ; Mark the file to be truncated on close +CLOSE: PUSHL R0 ; Save error status + $CLOSE FAB=(R2) ; Close the fileR + POPL R0 ; Restore error status + MOVL R0,STATUS ; Return the status + RET ; ReturnR + + .END ; Enda -- GitLab