annotate level2/cmds/mfree.asm @ 1020:c1a5613ffe7b

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