965
|
1 ********************************************************************
|
|
2 * SMap - Show System Memory Map
|
|
3 *
|
|
4 * $Id$
|
|
5 *
|
1255
|
6 * Edt/Rev YYYY/MM/DD Modified by
|
|
7 * Comment
|
965
|
8 * ------------------------------------------------------------------
|
1255
|
9 * 1 ????/??/??
|
|
10 * Original version.
|
965
|
11
|
|
12 nam SMap
|
|
13 ttl Show System Memory Map
|
|
14
|
|
15 * Disassembled 02/05/12 22:05:11 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
|
965
|
24 edition set 1
|
|
25
|
|
26 mod eom,name,tylg,atrv,start,size
|
|
27
|
|
28 u0000 rmb 1
|
|
29 u0001 rmb 3
|
|
30 u0004 rmb 1
|
|
31 u0005 rmb 1
|
|
32 u0006 rmb 1
|
|
33 u0007 rmb 1
|
|
34 u0008 rmb 6
|
|
35 u000E rmb 1
|
|
36 u000F rmb 456
|
|
37 size equ .
|
|
38
|
|
39 name fcs /SMap/
|
|
40 fcb edition
|
|
41
|
|
42 H1 fcc " 0 1 2 3 4 5 6 7 8 9 A B C D E F"
|
|
43 fcb C$CR
|
|
44 H1L equ *-H1
|
|
45 H2 fcc " # = = = = = = = = = = = = = = = ="
|
|
46 fcb C$CR
|
|
47 H2L equ *-H2
|
|
48 L005A fcb $00,$00,$00,$00
|
|
49
|
|
50 start lbsr L0170
|
|
51 leax >H1,pcr
|
|
52 lda #$01
|
|
53 ldy #H1L
|
|
54 os9 I$WritLn
|
|
55 leax >H2,pcr
|
|
56 ldy #H2L
|
|
57 os9 I$Write
|
|
58 leax >L005A,pcr
|
|
59 tfr x,d
|
|
60 ldx #$004E
|
|
61 ldy #$0002
|
|
62 pshs u
|
|
63 leau u000F,u
|
|
64 os9 F$CpyMem
|
|
65 puls u
|
|
66 lbcs L013F
|
|
67 ldx u000F,u
|
|
68 ldy #$0100
|
|
69 pshs u
|
|
70 leau u000F,u
|
|
71 os9 F$CpyMem
|
|
72 puls u
|
|
73 lbcs L013F
|
|
74 clr <u000E
|
|
75 clr <u0004
|
|
76 leax u000F,u
|
|
77 lda #$30
|
|
78 sta <u0005
|
|
79 clr ,-s
|
|
80 L00B2 lda ,s
|
|
81 bita #$0F
|
|
82 bne L00DF
|
|
83 pshs x
|
|
84 lbsr L0170
|
|
85 leax u0006,u
|
|
86 ldy #$0004
|
|
87 lda <u0005
|
|
88 cmpa #$3A
|
|
89 bne L00CD
|
|
90 lda #$41
|
|
91 sta <u0005
|
|
92 L00CD sta <u0007
|
|
93 inc <u0005
|
|
94 ldd #$2020
|
|
95 sta <u0006
|
|
96 std <u0008
|
|
97 lda #$01
|
|
98 os9 I$Write
|
|
99 puls x
|
|
100 L00DF ldb ,x+
|
|
101 beq L00ED
|
|
102 bmi L00E9
|
|
103 ldb #$55
|
|
104 bra L00F1
|
|
105 L00E9 ldb #$2E
|
|
106 bra L00F1
|
|
107 L00ED ldb #$5F
|
|
108 inc <u0004
|
|
109 L00F1 stb <u0007
|
|
110 ldb #$20
|
|
111 stb <u0008
|
|
112 pshs x
|
|
113 leax u0007,u
|
|
114 ldy #$0002
|
|
115 lda #$01
|
|
116 os9 I$Write
|
|
117 puls x
|
|
118 dec ,s
|
|
119 lbhi L00B2
|
|
120 puls a
|
|
121 bsr L0170
|
|
122 bsr L0170
|
|
123 leax >FreePgs,pcr
|
|
124 ldy #FreePgsL
|
|
125 lda #$01
|
|
126 os9 I$Write
|
|
127 ldb <u0004
|
|
128 clra
|
|
129 lbsr L0194
|
|
130 bsr L0170
|
|
131 leax >FreeRAM,pcr
|
|
132 ldy #FreeRAML
|
|
133 lda #$01
|
|
134 os9 I$Write
|
|
135 ldb <u0004
|
|
136 clra
|
|
137 lsrb
|
|
138 lsrb
|
|
139 lbsr L0194
|
|
140 bsr L0170
|
|
141 clrb
|
|
142 L013F os9 F$Exit
|
|
143
|
|
144 FreePgs fcc " Number of Free Pages: "
|
|
145 FreePgsL equ *-FreePgs
|
1385
|
146 FreeRAM fcc " RAM Free in KBytes: "
|
965
|
147 FreeRAML equ *-FreeRAM
|
|
148
|
|
149 L0170 pshs x,a
|
|
150 lda #C$CR
|
|
151 sta <u0007
|
|
152 leax u0007,u
|
|
153 ldy #$0001
|
|
154 lda #$01
|
|
155 os9 I$WritLn
|
|
156 puls pc,x,a
|
|
157 L0183 sta <u0007
|
|
158 pshs x
|
|
159 leax u0007,u
|
|
160 ldy #$0001
|
|
161 lda #$01
|
|
162 os9 I$Write
|
|
163 L0192 puls pc,x
|
|
164 L0194 leax u0001,u
|
|
165 clr <u0000
|
|
166 clr ,x
|
|
167 clr $01,x
|
|
168 clr $02,x
|
|
169 L019E inc ,x
|
|
170 subd #$0064
|
|
171 bcc L019E
|
|
172 addd #$0064
|
|
173 L01A8 inc $01,x
|
|
174 subd #$000A
|
|
175 bcc L01A8
|
|
176 L01AF addd #$000A
|
|
177 incb
|
|
178 stb $02,x
|
|
179 bsr L01BF
|
|
180 bsr L01BF
|
|
181 L01B9 lda ,x+
|
|
182 adda #$2F
|
|
183 bra L0183
|
|
184 L01BF tst <u0000
|
|
185 bne L01B9
|
|
186 ldb ,x
|
|
187 inc <u0000
|
|
188 decb
|
|
189 bne L01B9
|
|
190 clr <u0000
|
|
191 lda #C$SPAC
|
|
192 leax 1,x
|
|
193 bra L0183
|
|
194
|
|
195 emod
|
|
196 eom equ *
|
|
197 end
|
|
198
|