2824
|
1 * Disassembly by Os9disasm of popen.r
|
|
2
|
|
3 * class D external label equates
|
|
4
|
|
5 D0000 equ $0000
|
|
6 D000d equ $000d
|
|
7
|
|
8 section bss
|
|
9
|
|
10 * Uninitialized data (class B)
|
|
11 B0000 rmb 32
|
|
12 * Initialized Data (class G)
|
|
13
|
|
14 endsect
|
|
15
|
|
16 section code
|
|
17
|
|
18 popen: pshs u
|
|
19 leas -14,s
|
|
20 ldu 18,s
|
|
21 ldb [20,s]
|
|
22 cmpb #$77
|
|
23 bne L0012
|
|
24 clra
|
|
25 clrb
|
|
26 bra L0015
|
|
27 L0012 ldd #1
|
|
28 L0015 std 6,s
|
|
29 ldd #3
|
|
30 pshs d
|
|
31 leax L01fb,pcr
|
|
32 pshs x
|
|
33 lbsr open
|
|
34 leas 4,s
|
|
35 std 4,s
|
|
36 cmpd #-1
|
|
37 lbeq L019d
|
|
38 ldd 4,s
|
|
39 std 2,s
|
|
40 ldd 6,s
|
|
41 pshs d
|
|
42 lbsr dup
|
|
43 leas 2,s
|
|
44 std ,s
|
|
45 cmpd #-1
|
|
46 beq L0070
|
|
47 ldd 6,s
|
|
48 pshs d
|
|
49 lbsr close
|
|
50 leas 2,s
|
|
51 ldd 4,s
|
|
52 pshs d
|
|
53 lbsr dup
|
|
54 leas 2,s
|
|
55 cmpd #-1
|
|
56 bne L0080
|
|
57 ldd ,s
|
|
58 pshs d
|
|
59 lbsr dup
|
|
60 leas 2,s
|
|
61 ldd ,s
|
|
62 pshs d
|
|
63 lbsr close
|
|
64 leas 2,s
|
|
65 L0070 ldd 4,s
|
|
66 pshs d
|
|
67 lbsr close
|
|
68 leas 2,s
|
|
69 lbra L019d
|
|
70 bra L0080
|
|
71 L007e leau 1,u
|
|
72 L0080 ldb ,u
|
|
73 cmpb #$20
|
|
74 beq L008a
|
|
75 ldb ,u
|
|
76 bne L007e
|
|
77 L008a ldb ,u
|
|
78 cmpb #$20
|
|
79 bne L0092
|
|
80 leau 1,u
|
|
81 L0092 pshs u
|
|
82 lbsr strlen
|
|
83 leas 2,s
|
|
84 std 8,s
|
|
85 addd #2
|
|
86 pshs d
|
|
87 lbsr malloc
|
|
88 leas 2,s
|
|
89 std 12,s
|
|
90 pshs u
|
|
91 ldd 14,s
|
|
92 pshs d
|
|
93 lbsr strcpy
|
|
94 leas 4,s
|
|
95 leax L0201,pcr
|
|
96 pshs x
|
|
97 ldd 14,s
|
|
98 pshs d
|
|
99 lbsr strcat
|
|
100 leas 4,s
|
|
101 ldd 2,s
|
|
102 lslb
|
|
103 rola
|
|
104 leax B0000,y
|
|
105 leax d,x
|
|
106 pshs x
|
|
107 clra
|
|
108 clrb
|
|
109 pshs d
|
|
110 ldd #1
|
|
111 pshs d
|
|
112 ldd #1
|
|
113 pshs d
|
|
114 ldd 20,s
|
|
115 pshs d
|
|
116 ldd 18,s
|
|
117 addd #1
|
|
118 pshs d
|
|
119 ldd 30,s
|
|
120 pshs d
|
|
121 lbsr os9fork
|
|
122 leas 12,s
|
|
123 std [,s++]
|
|
124 cmpd #-1
|
|
125 bne L012a
|
|
126 ldd 12,s
|
|
127 pshs d
|
|
128 lbsr free
|
|
129 leas 2,s
|
|
130 ldd 6,s
|
|
131 pshs d
|
|
132 lbsr close
|
|
133 leas 2,s
|
|
134 ldd ,s
|
|
135 pshs d
|
|
136 lbsr dup
|
|
137 leas 2,s
|
|
138 ldd ,s
|
|
139 pshs d
|
|
140 lbsr close
|
|
141 leas 2,s
|
|
142 ldd 4,s
|
|
143 pshs d
|
|
144 lbsr close
|
|
145 leas 2,s
|
|
146 lbra L018f
|
|
147 L012a ldd 12,s
|
|
148 pshs d
|
|
149 lbsr free
|
|
150 leas 2,s
|
|
151 ldd 6,s
|
|
152 pshs d
|
|
153 lbsr close
|
|
154 leas 2,s
|
|
155 ldd ,s
|
|
156 pshs d
|
|
157 lbsr dup
|
|
158 leas 2,s
|
|
159 ldd ,s
|
|
160 pshs d
|
|
161 lbsr close
|
|
162 leas 2,s
|
|
163 ldd 20,s
|
|
164 pshs d
|
|
165 ldd 6,s
|
|
166 pshs d
|
|
167 lbsr fdopen
|
|
168 leas 4,s
|
|
169 std 10,s
|
|
170 bne L01a1
|
|
171 ldd 4,s
|
|
172 pshs d
|
|
173 lbsr close
|
|
174 leas 2,s
|
|
175 L0169 clra
|
|
176 clrb
|
|
177 pshs d
|
|
178 lbsr wait
|
|
179 leas 2,s
|
|
180 std 8,s
|
|
181 pshs d
|
|
182 ldd 4,s
|
|
183 lslb
|
|
184 rola
|
|
185 leax B0000,y
|
|
186 leax d,x
|
|
187 ldd ,x
|
|
188 cmpd ,s++
|
|
189 beq L018f
|
|
190 ldd 8,s
|
|
191 cmpd #-1
|
|
192 bne L0169
|
|
193 L018f ldd 2,s
|
|
194 lslb
|
|
195 rola
|
|
196 leax B0000,y
|
|
197 leax d,x
|
|
198 clra
|
|
199 clrb
|
|
200 std ,x
|
|
201 L019d clra
|
|
202 clrb
|
|
203 bra L01a3
|
|
204 L01a1 ldd 10,s
|
|
205 L01a3 leas 14,s
|
|
206 puls u,pc
|
|
207 pclose: pshs d,x,u
|
|
208 ldx 8,s
|
|
209 ldd 8,x
|
|
210 std 2,s
|
|
211 ldd 8,s
|
|
212 pshs d
|
|
213 lbsr fclose
|
|
214 leas 2,s
|
|
215 L01b8 leax ,s
|
|
216 pshs x
|
|
217 lbsr wait
|
|
218 leas 2,s
|
|
219 tfr d,u
|
|
220 pshs u
|
|
221 ldd 4,s
|
|
222 lslb
|
|
223 rola
|
|
224 leax B0000,y
|
|
225 leax d,x
|
|
226 ldd ,x
|
|
227 cmpd ,s++
|
|
228 beq L01dc
|
|
229 cmpu #-1
|
|
230 bne L01b8
|
|
231 L01dc ldd 2,s
|
|
232 lslb
|
|
233 rola
|
|
234 leax B0000,y
|
|
235 leax d,x
|
|
236 clra
|
|
237 clrb
|
|
238 std ,x
|
|
239 cmpu #-1
|
|
240 bne L01f5
|
|
241 ldd #-1
|
|
242 bra L01f7
|
|
243 L01f5 ldd ,s
|
|
244 L01f7 leas 4,s
|
|
245 puls u,pc
|
|
246 *L01fb ble L026d
|
|
247 * rol -16,s
|
|
248 * fcb $65
|
|
249 * neg D000d
|
|
250 *L0201 equ *-1
|
|
251 * fcb $00
|
|
252
|
|
253 endsect
|
|
254
|