annotate level2/cmds/smap.asm @ 3073:cf06f1860f9f

level 1/2 makefiles: Cosmetics, make more consistent
author Tormod Volden <debian.tormod@gmail.com>
date Sun, 22 Feb 2015 14:38:34 +0100
parents 457765ff46f9
children 147d2267d9b8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
1 *******************************************************************
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
2 * SMap - Show System Memory Map
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
3 *
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
4 * $Id$
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
5 *
1255
bf6f854a4299 Changed revisions to 0
boisy
parents: 965
diff changeset
6 * Edt/Rev YYYY/MM/DD Modified by
bf6f854a4299 Changed revisions to 0
boisy
parents: 965
diff changeset
7 * Comment
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
8 * ------------------------------------------------------------------
1255
bf6f854a4299 Changed revisions to 0
boisy
parents: 965
diff changeset
9 * 1 ????/??/??
bf6f854a4299 Changed revisions to 0
boisy
parents: 965
diff changeset
10 * Original version.
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
11
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
12 nam SMap
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
13 ttl Show System Memory Map
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
14
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
15 * Disassembled 02/05/12 22:05:11 by Disasm v1.6 (C) 1988 by RML
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
16
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
17 ifp1
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
18 use defsfile
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
19 endc
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
20
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
21 tylg set Prgrm+Objct
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
22 atrv set ReEnt+rev
1255
bf6f854a4299 Changed revisions to 0
boisy
parents: 965
diff changeset
23 rev set $00
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
24 edition set 1
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
25
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
26 mod eom,name,tylg,atrv,start,size
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
27
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
28 u0000 rmb 1
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
29 decbuff rmb 3 decimal buffer (100, 10, 1s place)
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
30 free rmb 1 number of free 256 byte pages in system memory
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
31 u0005 rmb 1
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
32 u0006 rmb 1
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
33 wrbuf rmb 1
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
34 u0008 rmb 6
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
35 u000E rmb 1
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
36 memmap rmb 256
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
37 rmb 200
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
38 size equ .
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
39
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
40 name fcs /SMap/
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
41 fcb edition
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
42
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
43 H1 fcc " 0 1 2 3 4 5 6 7 8 9 A B C D E F"
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
44 CrRt fcb C$CR
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
45 H1L equ *-H1
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
46 H2 fcc " # = = = = = = = = = = = = = = = ="
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
47 * fcb C$CR
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
48 H2L equ *-H2
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
49 SysDat fcb $00,$00,$00,$00
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
50
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
51 start lbsr WriteCR Write a carriage return to standard out
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
52 leax <H1,pcr point to header 1
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
53 lda #$01
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
54 ldy #H1L
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
55 os9 I$WritLn and write it to standard out
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
56 leax <H2,pcr same with header 2
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
57 ldy #H2L
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
58 os9 I$Write
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
59 leax <SysDat,pcr
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
60 tfr x,d
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
61 ldx #D.SysMem point to System Memory global
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
62 ldy #$0002 get 2 byte pointer into system RAM
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
63 pshs u save statics
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
64 leau memmap,u point to destination
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
65 os9 F$CpyMem get it
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
66 puls u restore statics
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
67 lbcs L013F branch if error
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
68 ldx memmap,u get pointer into system memory table in system space
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
69 ldy #256 all 256 bytes
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
70 pshs u save statics
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
71 leau memmap,u point to destination
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
72 os9 F$CpyMem copy memory
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
73 puls u restore statics
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
74 lbcs L013F branch if error
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
75 clr <u000E
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
76 clr <free clear free counter
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
77 leax memmap,u
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
78 lda #$30
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
79 sta <u0005
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
80 clr ,-s
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
81 L00B2 lda ,s
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
82 bita #$0F
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
83 bne L00DF
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
84 pshs x
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
85 lbsr WriteCR
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
86 leax u0006,u
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
87 ldy #$0004
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
88 lda <u0005
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
89 cmpa #':
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
90 bne L00CD
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
91 lda #'A
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
92 sta <u0005
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
93 L00CD sta <wrbuf
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
94 inc <u0005
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
95 ldd #C$SPAC*256+C$SPAC
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
96 sta <u0006
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
97 std <u0008
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
98 lda #$01
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
99 os9 I$Write
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
100 puls x
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
101 L00DF ldb ,x+
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
102 beq L00ED
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
103 bmi L00E9
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
104 ldb #'U
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
105 bra L00F1
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
106 L00E9 ldb #'.
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
107 bra L00F1
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
108 L00ED ldb #'_
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
109 inc <free increment free page counter
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
110 L00F1 stb <wrbuf
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
111 ldb #C$SPAC
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
112 stb <u0008
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
113 pshs x
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
114 leax wrbuf,u
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
115 ldy #$0002
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
116 lda #$01
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
117 os9 I$Write
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
118 puls x
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
119 dec ,s
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
120 lbhi L00B2
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
121 puls a
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
122 bsr WriteCR
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
123 bsr WriteCR
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
124 leax >FreePgs,pcr
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
125 ldy #FreePgsL
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
126 lda #$01
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
127 os9 I$Write
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
128 ldb <free
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
129 clra
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
130 lbsr L0194
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
131 bsr WriteCR
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
132 leax >FreeRAM,pcr
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
133 ldy #FreeRAML
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
134 lda #$01
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
135 os9 I$Write
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
136 ldb <free
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
137 clra
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
138 lsrb
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
139 lsrb
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
140 lbsr L0194
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
141 bsr WriteCR
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
142 clrb
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
143 L013F os9 F$Exit
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
144
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
145 FreePgs fcc " Number of Free Pages: "
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
146 FreePgsL equ *-FreePgs
1385
2bd57e595948 Ram changed to RAM
boisy
parents: 1255
diff changeset
147 FreeRAM fcc " RAM Free in KBytes: "
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
148 FreeRAML equ *-FreeRAM
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
149
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
150 WriteCR pshs x,a
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
151 * lda #C$CR
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
152 * sta <wrbuf
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
153 leax CrRt,pcr
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
154 ldy #$0001
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
155 lda #$01
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
156 os9 I$WritLn
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
157 puls pc,x,a
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
158
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
159 L0183 sta <wrbuf
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
160 pshs x
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
161 leax wrbuf,u
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
162 ldy #$0001
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
163 lda #$01
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
164 os9 I$Write
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
165 puls pc,x
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
166
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
167 L0194 leax decbuff,u
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
168 clr <u0000
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
169 clr ,x
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
170 clr $01,x
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
171 clr $02,x
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
172 L019E inc ,x
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
173 subd #100
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
174 bcc L019E
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
175 addd #100
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
176 L01A8 inc $01,x
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
177 subd #10
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
178 bcc L01A8
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
179 L01AF addd #10
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
180 incb
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
181 stb $02,x
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
182 bsr L01BF
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
183 bsr L01BF
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
184 L01B9 lda ,x+
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
185 adda #$2F
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
186 bra L0183
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
187 L01BF tst <u0000
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
188 bne L01B9
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
189 ldb ,x
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
190 inc <u0000
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
191 decb
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
192 bne L01B9
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
193 clr <u0000
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
194 lda #C$SPAC
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
195 leax 1,x
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
196 bra L0183
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
197
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
198 emod
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
199 eom equ *
1633
457765ff46f9 minor optimizations
boisy
parents: 1385
diff changeset
200 end
965
53553cdc265c New commands added to standard CMDS
boisy
parents:
diff changeset
201