-
Notifications
You must be signed in to change notification settings - Fork 451
/
s9.s
112 lines (102 loc) · 1.11 KB
/
s9.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
" s9 -- cold boot
. = coldentry+4
" zero i-list
dzm ii
jms copyz; dskbuf; 64
1:
lac ii
jms dskio; 07000
isz ii
-710
tad ii
sza
jmp 1b
" free rest of disk
1:
lac ii
jms free
isz ii
-6400
tad ii
sza
jmp 1b
" read in tapes
dzm ii
1:
dzm sum
jms getw " count
sza
jmp .+3
hlt
jmp 1b " 0 count means pause
dac xx
isz ii
lac ii
jms iget
jms copyz; inode; 12
jms getw " flags
dac i.flags
-1
dac i.uid
jms getw " number links
dac i.nlks
-2
tad xx
dac i.size
lac ii
dac i.uniq
law 4096-1
dac 8
-1
tad i.size
cma
sna
jmp 3f
dac xx
2:
jms getw
dac 8 i
isz xx
jmp 2b
3:
lac sum
dac xx
jms getw " checksum
sad xx
skp
jms halt
lac i.size
dac .+4
cla
jms iwrite; 4096; ..
jms iput
cla
jmp 1b
getw: 0
jms getc
alss 12
lmq
jms getc
alss 6
omq
lmq
jms getc
omq
lmq
add sum
dac sum
lacq
jmp getw i
getc: 0
iof
rsa
rsf
jmp .-1
rrb
sna
jmp getc+1
and o77
ion
jmp getc i
xx: 0
sum: 0