annotate level2/cmds/mfree.asm @ 1500:b00cf13c9f61

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