0
|
1 ********************************************************************
|
|
2 * Mfree - Show free memory
|
|
3 *
|
|
4 * $Id$
|
|
5 *
|
|
6 * Ed. Comments Who YY/MM/DD
|
|
7 * ------------------------------------------------------------------
|
|
8 * 2 Original Tandy/Microware version
|
|
9
|
|
10 nam Mfree
|
|
11 ttl Show free memory
|
|
12
|
|
13 * Disassembled 98/09/11 12:07:32 by Disasm v1.6 (C) 1988 by RML
|
|
14
|
|
15 ifp1
|
|
16 use defsfile
|
|
17 endc
|
|
18
|
|
19 tylg set Prgrm+Objct
|
|
20 atrv set ReEnt+rev
|
|
21 rev set $01
|
|
22 edition set 2
|
|
23
|
|
24 mod eom,name,tylg,atrv,start,size
|
|
25
|
|
26 u0000 rmb 1
|
|
27 u0001 rmb 1
|
|
28 u0002 rmb 2
|
|
29 u0004 rmb 1
|
|
30 u0005 rmb 1
|
|
31 u0006 rmb 1
|
|
32 u0007 rmb 1
|
|
33 u0008 rmb 1
|
|
34 u0009 rmb 1
|
|
35 u000A rmb 1
|
|
36 u000B rmb 2
|
|
37 u000D rmb 80
|
|
38 u005D rmb 7
|
|
39 u0064 rmb 132
|
|
40 u00E8 rmb 1135
|
|
41 size equ .
|
|
42
|
|
43 name fcs /Mfree/
|
|
44 fcb edition
|
|
45
|
|
46 L0013 fcs " Blk Begin End Blks Size"
|
|
47 fcs " --- ------ ------ ---- ------"
|
|
48 L004E fcs " ==== ======"
|
|
49 fcc " Total:"
|
|
50 fcb $A0
|
|
51
|
|
52 start leax u000D,u
|
|
53 stx <u0009
|
|
54 stx <u000B
|
|
55 lbsr L016E
|
|
56 leay <L0013,pcr
|
|
57 lbsr L0183
|
|
58 lbsr L016E
|
|
59 lbsr L0183
|
|
60 lbsr L016E
|
|
61 clr <u0000
|
|
62 clr <u0001
|
|
63 leax <u005D,u
|
|
64 os9 F$GBlkMp
|
|
65 sty <u0002
|
|
66 sta <u0004
|
|
67 ldy #$0000
|
|
68 L00AA ldu #$0000
|
|
69 L00AD tst ,x+
|
|
70 beq L00BA
|
|
71 leay $01,y
|
|
72 cmpy <u0002
|
|
73 bcs L00AD
|
|
74 bra L0109
|
|
75 L00BA tfr y,d
|
|
76 bsr L0123
|
|
77 lda <u0004
|
|
78 pshs y,a
|
|
79 clra
|
|
80 clrb
|
|
81 L00C4 addd $01,s
|
|
82 dec ,s
|
|
83 bne L00C4
|
|
84 leas $03,s
|
|
85 std <u0006
|
|
86 clr <u0008
|
|
87 bsr L0133
|
|
88 L00D2 leau u0001,u
|
|
89 leay $01,y
|
|
90 cmpy <u0002
|
|
91 beq L0109
|
|
92 tst ,x+
|
|
93 beq L00D2
|
|
94 lda <u0004
|
|
95 pshs y,a
|
|
96 clra
|
|
97 clrb
|
|
98 L00E5 addd $01,s
|
|
99 dec ,s
|
|
100 bne L00E5
|
|
101 leas $03,s
|
|
102 subd #$0001
|
|
103 std <u0006
|
|
104 lda #$FF
|
|
105 sta <u0008
|
|
106 bsr L0133
|
|
107 leax -$01,x
|
|
108 tfr u,d
|
|
109 bsr L0123
|
|
110 lbsr L0199
|
|
111 addd <u0000
|
|
112 std <u0000
|
|
113 bsr L016E
|
|
114 bra L00AA
|
|
115 L0109 leay >L004E,pcr
|
|
116 bsr L0183
|
|
117 bsr L016E
|
|
118 bsr L0183
|
|
119 tfr u,d
|
|
120 addd <u0000
|
|
121 std <u0000
|
|
122 bsr L0123
|
|
123 bsr L0199
|
|
124 bsr L016E
|
|
125 clrb
|
|
126 os9 F$Exit
|
|
127 L0123 pshs b,a
|
|
128 clr <u0005
|
|
129 bsr L0145
|
|
130 tfr b,a
|
|
131 bsr L0145
|
|
132 lda #$20
|
|
133 bsr L0164
|
|
134 puls pc,b,a
|
|
135 L0133 clr <u0005
|
|
136 lda <u0006
|
|
137 bsr L0145
|
|
138 lda <u0007
|
|
139 bsr L0145
|
|
140 lda <u0008
|
|
141 bsr L0145
|
|
142 lda #$20
|
|
143 bra L0164
|
|
144 L0145 pshs a
|
|
145 lsra
|
|
146 lsra
|
|
147 lsra
|
|
148 lsra
|
|
149 bsr L014F
|
|
150 puls a
|
|
151 L014F anda #$0F
|
|
152 tsta
|
|
153 beq L0156
|
|
154 sta <u0005
|
|
155 L0156 tst <u0005
|
|
156 bne L015C
|
|
157 lda #$F0
|
|
158 L015C adda #$30
|
|
159 cmpa #$3A
|
|
160 bcs L0164
|
|
161 adda #$07
|
|
162 L0164 pshs x
|
|
163 ldx <u000B
|
|
164 sta ,x+
|
|
165 stx <u000B
|
|
166 puls pc,x
|
|
167 L016E pshs y,x,a
|
|
168 lda #$0D
|
|
169 bsr L0164
|
|
170 ldx <u0009
|
|
171 stx <u000B
|
|
172 ldy #$0050
|
|
173 lda #$01
|
|
174 os9 I$WritLn
|
|
175 puls pc,y,x,a
|
|
176 L0183 lda ,y
|
|
177 anda #$7F
|
|
178 bsr L0164
|
|
179 tst ,y+
|
|
180 bpl L0183
|
|
181 rts
|
|
182 L018E fdb $2710,$03e8,$0064,$000a,$0001
|
|
183 fcb $ff
|
|
184 L0199 pshs y,x,b,a
|
|
185 lda <u0004
|
|
186 pshs a
|
|
187 lda $01,s
|
|
188 lsr ,s
|
|
189 lsr ,s
|
|
190 bra L01A9
|
|
191 L01A7 lslb
|
|
192 rola
|
|
193 L01A9 lsr ,s
|
|
194 bne L01A7
|
|
195 leas 1,s
|
|
196 leax <L018E,pcr
|
|
197 ldy #$2F20
|
|
198 L01B6 leay >$0100,y
|
|
199 subd ,x
|
|
200 bcc L01B6
|
|
201 addd ,x++
|
|
202 pshs b,a
|
|
203 tfr y,d
|
|
204 tst ,x
|
|
205 bmi L01DE
|
|
206 ldy #$2F30
|
|
207 cmpd #$3020
|
|
208 bne L01D8
|
|
209 ldy #$2F20
|
|
210 lda #$20
|
|
211 L01D8 bsr L0164
|
|
212 puls b,a
|
|
213 bra L01B6
|
|
214 L01DE bsr L0164
|
|
215 lda #$6B
|
|
216 bsr L0164
|
|
217 leas $02,s
|
|
218 puls pc,y,x,b,a
|
|
219
|
|
220 emod
|
|
221 eom equ *
|
|
222 end
|