1
0
mirror of https://github.com/PDP-10/its.git synced 2026-01-30 05:34:01 +00:00

NUDIR - create a user directory.

This commit is contained in:
Lars Brinkhoff
2017-02-16 15:31:05 +01:00
parent 53f2a2eba9
commit 1b7ff86cdc
3 changed files with 99 additions and 0 deletions

94
src/sysen3/nudir.1 Normal file
View File

@@ -0,0 +1,94 @@
TITLE NUDIR - new user directory
a=1
b=2
c=3
d=4
chn==5
sname: 0
uname: 0
go: .break 12,[..rjcl,,jcl]
move a,jcl
cain a,0 ;Empty JCL?
jrst usage
camn a,[15_29.] ;Just a CR
jrst usage
move a,[-6,,0] ;Convert JCL to sixbit
move b,[440700,,jcl]
move c,[440600,,sname]
loop: ildb d,b
caig d,40
movei d,40 ;Control characters to space
cail d,140
subi d,40 ;Lower case to upper
subi d,40
idpb d,c
aobjn a,loop
.call [setz ;Create directory
sixbit /open/
[.uai,,chn]
[sixbit /dsk/]
[sixbit /..new./]
[sixbit /(udir)/]
sname
%clerr,,a ((setz))]
jrst [caie a,%ensfl
.lose
jrst .+1]
.close chn,
.call [setz ;Create -READ- -THIS- file
sixbit /open/
[.uao,,chn]
[sixbit /dsk/]
[sixbit /-read-/]
[sixbit /-this-/]
sname ((setz))]
.lose
move a,[440700,,[ascii /Created by /]]
movei b,11.
.call [setz
sixbit /siot/
movei chn
move a
setz b]
.lose
.suset [.rxuna,,a] ;Record which user created the directory
uout: move b,a
lsh b,-30.
addi b,40
.iot chn,b
lsh a,6
jumpn a,uout
done: .close chn,
.logout 1,
usage: .call [setz
sixbit /open/
move [.uao,,chn]
setz [sixbit /tty/]]
.lose
move a,[440700,,[ascii /Usage: :UDIR <name>/]]
movei b,19.
.call [setz
sixbit /siot/
movei chn
move a
setz b]
.lose
jrst done
jcl: block 10
end go