335
|
1 ********************************************************************
|
|
2 * Procs - Show process information
|
|
3 *
|
|
4 * $Id$
|
|
5 *
|
|
6 * Ed. Comments Who YY/MM/DD
|
|
7 * ------------------------------------------------------------------
|
843
|
8 * 14 Original Tandy/Microware version
|
|
9 * 15 Changed e to -e BGP 03/01/14
|
335
|
10
|
|
11 nam Procs
|
|
12 ttl program module
|
|
13
|
|
14 * Disassembled 98/09/11 17:07:20 by Disasm v1.6 (C) 1988 by RML
|
|
15
|
|
16 ifp1
|
|
17 use defsfile
|
|
18 endc
|
|
19
|
|
20 tylg set Prgrm+Objct
|
|
21 atrv set ReEnt+rev
|
|
22 rev set $01
|
843
|
23 edition set 15
|
335
|
24
|
|
25 mod eom,name,tylg,atrv,start,size
|
|
26
|
843
|
27 showall rmb 1
|
335
|
28 u0001 rmb 1
|
843
|
29 narrow rmb 1
|
335
|
30 u0003 rmb 1
|
|
31 u0004 rmb 1
|
|
32 u0005 rmb 1
|
|
33 u0006 rmb 2
|
|
34 u0008 rmb 1
|
|
35 u0009 rmb 1
|
|
36 u000A rmb 32
|
|
37 u002A rmb 58
|
|
38 u0064 rmb 22
|
|
39 u007A rmb 110
|
|
40 u00E8 rmb 1164
|
|
41 size equ .
|
|
42
|
|
43 name fcs /Procs/
|
|
44 fcb edition
|
843
|
45 header1 fcs " User Mem Stack"
|
|
46 header2 fcs "Id PId Number Pty Age Sts Signl Siz Ptr Primary Module"
|
|
47 header3 fcs "--- --- ------- --- --- --- ----- --- ----- ----------------"
|
|
48 sheader1 fcs "Id PId User# Pty Age Sts"
|
|
49 sheader2 fcs " Sigl Mem StPtr Primary"
|
|
50 sheader3 fcs "============================="
|
|
51 ItsDead fcs "DEAD"
|
335
|
52
|
843
|
53 start clr <showall
|
|
54 clr <narrow assume wide screen
|
335
|
55 lda #$01
|
|
56 sta <u0001
|
843
|
57 ldd ,x+
|
|
58 andb #$DF
|
|
59 cmpd #$2D45 -e?
|
|
60 bne L0122 branch if nnot
|
|
61 inc <showall
|
335
|
62 L0122 leax <u002A,u
|
|
63 stx <u0006
|
|
64 leax <u007A,u
|
|
65 os9 F$GBlkMp
|
|
66 tfr a,b
|
|
67 nega
|
|
68 sta <u0008
|
|
69 lda #$FE
|
|
70 L0134 inca
|
|
71 lsrb
|
|
72 bne L0134
|
|
73 sta <u0009
|
|
74 os9 F$ID
|
|
75 sty <u0003
|
|
76 lbsr L024F
|
|
77 lda #$01
|
|
78 ldb #SS.ScSiz
|
843
|
79 os9 I$GetStt get window size
|
|
80 bcc L0154 branch if gotten
|
|
81 cmpb #E$UnkSvc unknown service?
|
|
82 lbne L0241 if not, erroor
|
|
83 bra L017B else assume wide screen
|
|
84 L0154 cmpx #60 at least this wide?
|
|
85 bge L017B branch if so
|
|
86 inc <narrow else set narrow flag
|
|
87 leay >sheader1,pcr
|
335
|
88 lbsr L0244
|
|
89 lbsr L024F
|
843
|
90 leay >sheader2,pcr
|
335
|
91 lbsr L0244
|
|
92 lbsr L024F
|
843
|
93 leay >sheader3,pcr
|
335
|
94 lbsr L0244
|
|
95 lbsr L024F
|
|
96 bra L0199
|
843
|
97 L017B leay >header1,pcr
|
335
|
98 lbsr L0244
|
|
99 lbsr L024F
|
843
|
100 leay >header2,pcr
|
335
|
101 lbsr L0244
|
|
102 lbsr L024F
|
843
|
103 leay >header3,pcr
|
335
|
104 lbsr L0244
|
|
105 lbsr L024F
|
|
106 L0199 inc <u0001
|
|
107 lbeq L0240
|
|
108 lda <u0001
|
|
109 leax <u007A,u
|
|
110 os9 F$GPrDsc
|
|
111 bcs L0199
|
|
112 ldd <u0003
|
|
113 cmpd $08,x
|
|
114 beq L01B4
|
843
|
115 tst <showall
|
335
|
116 beq L0199
|
|
117 L01B4 ldb ,x
|
|
118 lbsr L026F
|
|
119 lbsr L0292
|
|
120 ldb $01,x
|
|
121 lbsr L026F
|
|
122 lbsr L0292
|
|
123 ldd $08,x
|
|
124 lbsr L02C3
|
|
125 lbsr L0292
|
|
126 lbsr L0292
|
|
127 lbsr L0292
|
|
128 ldb $0A,x
|
|
129 lbsr L026F
|
|
130 lbsr L0292
|
843
|
131 tst <narrow
|
335
|
132 beq L01E1
|
|
133 lbsr L0292
|
|
134 L01E1 ldb $0B,x
|
|
135 lbsr L026F
|
|
136 lbsr L0292
|
843
|
137 tst <narrow
|
335
|
138 beq L01F0
|
|
139 lbsr L0292
|
|
140 L01F0 lda #$24
|
|
141 lbsr L0296
|
|
142 lda $0C,x
|
|
143 lbsr L02A0
|
|
144 clra
|
843
|
145 tst <narrow
|
335
|
146 beq L0202
|
|
147 lbsr L024F
|
|
148 L0202 ldb <$19,x
|
|
149 lbsr L02C3
|
|
150 lbsr L0292
|
|
151 lbsr L0292
|
|
152 ldb $07,x
|
|
153 bsr L026F
|
|
154 bsr L0292
|
843
|
155 tst <narrow
|
335
|
156 beq L021E
|
|
157 bsr L0292
|
|
158 bsr L0292
|
|
159 bsr L0292
|
|
160 L021E lda #$24
|
|
161 bsr L0296
|
|
162 lda $04,x
|
|
163 bsr L02A0
|
|
164 lda $05,x
|
|
165 bsr L02A0
|
|
166 bsr L0292
|
843
|
167 tst <narrow
|
335
|
168 beq L0234
|
|
169 bsr L0292
|
|
170 bsr L0292
|
|
171 L0234 lbsr L02FA
|
|
172 bsr L0244
|
|
173 bsr L0292
|
|
174 bsr L024F
|
|
175 lbra L0199
|
|
176 L0240 clrb
|
|
177 L0241 os9 F$Exit
|
|
178 L0244 lda ,y
|
|
179 anda #$7F
|
|
180 bsr L0296
|
|
181 lda ,y+
|
|
182 bpl L0244
|
|
183 rts
|
|
184 L024F pshs y,x,a
|
|
185 lda #C$CR
|
|
186 bsr L0296
|
|
187 leax <u002A,u
|
|
188 stx <u0006
|
843
|
189 tst <narrow
|
335
|
190 beq L0264
|
|
191 ldy #$0020
|
|
192 bra L0268
|
|
193 L0264 ldy #80
|
|
194 L0268 lda #$01
|
|
195 os9 I$WritLn
|
|
196 puls pc,y,x,a
|
|
197 L026F clr <u0005
|
|
198 lda #$FF
|
|
199 L0273 inca
|
|
200 subb #$64
|
|
201 bcc L0273
|
|
202 bsr L0289
|
|
203 lda #$0A
|
|
204 L027C deca
|
|
205 addb #$0A
|
|
206 bcc L027C
|
|
207 bsr L0289
|
|
208 tfr b,a
|
|
209 adda #$30
|
|
210 bra L0296
|
|
211 L0289 tsta
|
|
212 beq L028E
|
|
213 sta <u0005
|
|
214 L028E tst <u0005
|
|
215 bne L0294
|
|
216 L0292 lda #$F0
|
|
217 L0294 adda #$30
|
|
218 L0296 pshs x
|
|
219 ldx <u0006
|
|
220 sta ,x+
|
|
221 stx <u0006
|
|
222 puls pc,x
|
|
223 L02A0 pshs a
|
|
224 anda #$F0
|
|
225 lsra
|
|
226 lsra
|
|
227 lsra
|
|
228 lsra
|
|
229 bsr L02AE
|
|
230 puls a
|
|
231 anda #$0F
|
|
232 L02AE adda #$30
|
|
233 cmpa #$39
|
|
234 bls L0296
|
|
235 adda #$07
|
|
236 bra L0296
|
|
237 L02B8 fdb $2710,$03e8,$0064,$000a
|
|
238 fcb $00,$01,$ff
|
|
239
|
|
240 L02C3 pshs y,x,b,a
|
|
241 leax <L02B8,pcr
|
|
242 ldy #$2F20
|
|
243 L02CC leay >$0100,y
|
|
244 subd ,x
|
|
245 bcc L02CC
|
|
246 addd ,x++
|
|
247 pshs b,a
|
|
248 tfr y,d
|
|
249 tst ,x
|
|
250 bmi L02F4
|
|
251 ldy #$2F30
|
|
252 cmpd #$3020
|
|
253 bne L02EE
|
|
254 ldy #$2F20
|
|
255 lda #$20
|
|
256 L02EE bsr L0296
|
|
257 puls b,a
|
|
258 bra L02CC
|
|
259 L02F4 bsr L0296
|
|
260 leas $02,s
|
|
261 puls pc,y,x,b,a
|
|
262 L02FA pshs u,x
|
843
|
263 leay >ItsDead,pcr
|
335
|
264 lda $0C,x
|
|
265 bita #$01
|
|
266 bne L0330
|
|
267 leay <$40,x
|
|
268 tfr y,d
|
|
269 ldx <$11,x
|
|
270 ldy #$0009
|
|
271 leau u000A,u
|
|
272 os9 F$CpyMem
|
|
273 pshs b,a
|
|
274 ldd u0004,u
|
|
275 leax d,x
|
|
276 puls b,a
|
|
277 ldy #$0020
|
|
278 os9 F$CpyMem
|
|
279 leay ,u
|
|
280 lda <$1F,y
|
|
281 ora #$80
|
|
282 sta <$1F,y
|
|
283 L0330 puls pc,u,x
|
|
284
|
|
285 emod
|
|
286 eom equ *
|
|
287 end
|
|
288
|