Fixed stat so it works.
This commit is contained in:
+2
-2
@@ -11,8 +11,8 @@
|
|||||||
# Contents of each directory ends with a $ on a line by itself
|
# Contents of each directory ends with a $ on a line by itself
|
||||||
# Format was inspired by 6th Edition mkfs
|
# Format was inspired by 6th Edition mkfs
|
||||||
#
|
#
|
||||||
dd drw-- -1 4
|
dd drwr- -1 4
|
||||||
system drw-- -1 3
|
system drwr- -1 3
|
||||||
ttyin irwr- -1 6
|
ttyin irwr- -1 6
|
||||||
keyboard irwr- -1 7
|
keyboard irwr- -1 7
|
||||||
pptin irwr- -1 8
|
pptin irwr- -1 8
|
||||||
|
|||||||
+9
-4
@@ -12,7 +12,7 @@ main:
|
|||||||
dac name
|
dac name
|
||||||
|
|
||||||
lac statbufptr " Get the file's details into the statbuf
|
lac statbufptr " Get the file's details into the statbuf
|
||||||
sys status; statfile:0; 0
|
sys status; curdir; statfile:0
|
||||||
spa
|
spa
|
||||||
jmp badfile
|
jmp badfile
|
||||||
|
|
||||||
@@ -32,15 +32,16 @@ main:
|
|||||||
sys write; l; 1 " Yes, print an l
|
sys write; l; 1 " Yes, print an l
|
||||||
jmp 2f
|
jmp 2f
|
||||||
1: lac fd1
|
1: lac fd1
|
||||||
sys write; minus; 1 " Not a dir, not large, print an s
|
sys write; s; 1 " Not a dir, not large, print an s
|
||||||
|
|
||||||
2: lac s.perm " Readable by owner?
|
2: lac s.perm " Readable by owner?
|
||||||
and ureadmask
|
and ureadmask
|
||||||
sna
|
sna
|
||||||
jmp 1f
|
jmp 1f
|
||||||
lac fd1
|
lac fd1
|
||||||
1: sys write; r; 1 " Yes, print an r
|
sys write; r; 1 " Yes, print an r
|
||||||
jmp 2f
|
jmp 2f
|
||||||
|
1: lac fd1
|
||||||
sys write; minus; 1 " No, print a - sign
|
sys write; minus; 1 " No, print a - sign
|
||||||
|
|
||||||
2: lac s.perm " Writable by owner?
|
2: lac s.perm " Writable by owner?
|
||||||
@@ -77,6 +78,9 @@ main:
|
|||||||
sys write; space; 1 " Print a space
|
sys write; space; 1 " Print a space
|
||||||
|
|
||||||
lac s.nlinks " Print the number of links out
|
lac s.nlinks " Print the number of links out
|
||||||
|
" but first make it positive
|
||||||
|
cma
|
||||||
|
tad d1
|
||||||
jms octal; -2
|
jms octal; -2
|
||||||
lac s.uid " Print the user-id out
|
lac s.uid " Print the user-id out
|
||||||
jms octal; -3
|
jms octal; -3
|
||||||
@@ -139,7 +143,7 @@ octal: 0
|
|||||||
jmp octal i " and return from subroutine
|
jmp octal i " and return from subroutine
|
||||||
|
|
||||||
longopt: 0 " User set the -l option when this is 1
|
longopt: 0 " User set the -l option when this is 1
|
||||||
fd1: 1 " File descriptor 1, stdout
|
d1: fd1: 1 " File descriptor 1, stdout
|
||||||
d4: 4
|
d4: 4
|
||||||
d5: 5
|
d5: 5
|
||||||
d8: 8
|
d8: 8
|
||||||
@@ -177,3 +181,4 @@ w: 0167
|
|||||||
minus: 055
|
minus: 055
|
||||||
space: 040
|
space: 040
|
||||||
newline: 012
|
newline: 012
|
||||||
|
curdir: <. 040; 040040; 040040; 040040 " i.e. "."
|
||||||
|
|||||||
Reference in New Issue
Block a user