1
0
mirror of https://github.com/PDP-10/its.git synced 2026-03-03 02:08:00 +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

View File

@@ -183,6 +183,7 @@ A list of [known ITS machines](doc/machines.md).
- NAME, Shows logged in users and locations, aka FINGER.
- NETIME, network time dragon.
- NICNAM/NICWHO, look up someone in the ARPAnet directory.
- NUDIR, create user directory.
- NWATCH, small watch display.
- OBS, observe system activities.
- OS, realtime TTY spy.

View File

@@ -1179,6 +1179,10 @@ respond "*" "nlinks+14/ A,,646471\r"
type ":pdump sys1;ts prufd\r"
respond "*" ":kill\r"
# udir
respond "*" ":midas sys3;ts nudir_sysen3; nudir\r"
expect ":KILL"
# STY
respond "*" ":midas sys1;ts sty_sysen2;sty\r"
expect ":KILL"

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