forked from dspinellis/unix-history-repo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
chmod.s
77 lines (72 loc) · 784 Bytes
/
chmod.s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
" chmode
lac 017777 i
sad d4
jmp error
lac 017777
tad d4
dac 8
tad d1
dac name
dzm octal
dzm nchar
-8
dac c1
1:
lac nchar
dzm nchar
sza
jmp 2f
lac 8 i
lmq
and o177
dac nchar
lacq
lrss 9
2:
sad o40
jmp 3f
tad om60
lmq
lac octal
cll; als 3
omq
dac octal
3:
isz c1
jmp 1b
loop:
lac 017777 i
sad d8
sys exit
tad dm4
dac 017777 i
lac name
tad d4
dac name
lac octal
sys chmode; name:0
sma
jmp loop
lac name
dac 1f
lac d1
sys write; 1:0; 4
lac d1
sys write; 1f; 2
jmp loop
1:
040;077012
error:
lac d1
sys write; 1b+1; 1
sys exit
om60: -060
o40: 040
d1: 1
d8: 8
dm4: -4
d4: 4
o177: 0177
nchar: .=.+1
c1: .=.+1
octal: .=.+1