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