mirror of
https://github.com/PDP-10/its.git
synced 2026-01-23 10:59:24 +00:00
45 lines
904 B
Plaintext
45 lines
904 B
Plaintext
; Wednesday Feb 11,1981 1:46 NM+7D.0H.24M.10S. -*- .Fasl -*-
|
|
|
|
.fasl
|
|
|
|
if1,[
|
|
.insrt sys:.fasl defs
|
|
.insrt syseng;fsdefs
|
|
]
|
|
|
|
verprt DIRSIZE
|
|
|
|
; (DIRECTORY-SIZE directory-name) gives you the size of that directory.
|
|
; No overhead from buffering arrays, file objects, consing up lists
|
|
; and symbols from calling DIRECTORY, etc. Just opens the image dir,
|
|
; and gets the number-of-blocks allocated number.
|
|
|
|
.entry DIRECTORY-SIZE SUBR 002
|
|
push p,cfix1
|
|
pushj p,sixmak
|
|
movei f,1(fxp)
|
|
jsp t,0push-<udblks+1>
|
|
hrli f,<-<udblks+1>>
|
|
push fxp,inhibit
|
|
setom inhibit
|
|
.call [setz ? sixbit |OPEN| ? movei 0 ? movsi .bii
|
|
move [sixbit |DSK|]
|
|
move [sixbit |.FILE.|]
|
|
move [sixbit |(DIR)|]
|
|
setz tt]
|
|
jrst oh.foo
|
|
.iot 0,f
|
|
.close 0,
|
|
pushj p,intrel
|
|
pop fxp,tt
|
|
hrrzs tt
|
|
sub fxp,[udblks,,udblks]
|
|
popj p,
|
|
|
|
oh.foo: movni tt,1
|
|
pushj p,intrel
|
|
sub fxp,[<udblks+1>,,<udblks+1>]
|
|
popj p,
|
|
|
|
fasend
|